summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2016-04-23 10:55:01 +0200
committerThomas Reufer <thomas@reufer.ch>2016-04-23 10:58:16 +0200
commitc33e07c17fae270ef4fa3fbc9906ee8d542124df (patch)
tree95fa73d7c3639600e4adc7cd0bbc8695dbe05d20
parent50691fe22f264e06c921f6acb7cb0cd346f7ba88 (diff)
downloadvdr-plugin-rpihddevice-c33e07c17fae270ef4fa3fbc9906ee8d542124df.tar.gz
vdr-plugin-rpihddevice-c33e07c17fae270ef4fa3fbc9906ee8d542124df.tar.bz2
re-enable advanced deinterlacer for SD streams, requires recent firmware
-rw-r--r--HISTORY2
-rw-r--r--omx.c1
-rw-r--r--omxdevice.c28
3 files changed, 19 insertions, 12 deletions
diff --git a/HISTORY b/HISTORY
index 08b730c..a9acf89 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3,6 +3,8 @@ VDR Plugin 'rpihddevice' Revision History
2016-04-23: Version 1.0.3
-------------------------
+- new:
+ - re-enable advanced deinterlacer for SD streams, requires recent firmware
- fixed:
- don't ignore audio frames for slow trick speeds to keep clock in sync
diff --git a/omx.c b/omx.c
index 7e6c33a..3881c14 100644
--- a/omx.c
+++ b/omx.c
@@ -364,7 +364,6 @@ void cOmx::HandlePortSettingsChanged(unsigned int portId)
{
bool fastDeinterlace = portdef.format.video.nFrameWidth *
portdef.format.video.nFrameHeight > 576 * 720;
- fastDeinterlace = true;
filterparam.nNumParams = 4;
filterparam.nParams[0] = 3;
diff --git a/omxdevice.c b/omxdevice.c
index c9c2255..684f68d 100644
--- a/omxdevice.c
+++ b/omxdevice.c
@@ -235,20 +235,26 @@ void cOmxDevice::StillPicture(const uchar *Data, int Length)
m_hasVideo = false;
m_omx->StopClock();
- int length = pesPacket ? pesLength : Length;
- const uchar *data = pesPacket ? pesPacket : Data;
-
- // play every single PES packet, rise ENDOFFRAME flag on last
- while (PesLongEnough(length))
+ // since the stream might be interlaced, we send each frame twice, so
+ // the advanced deinterlacer is able to render an output picture
+ int repeat = 2;
+ while (repeat--)
{
- int pktLen = PesHasLength(data) ? PesLength(data) : length;
+ int length = pesPacket ? pesLength : Length;
+ const uchar *data = pesPacket ? pesPacket : Data;
+
+ // play every single PES packet, rise ENDOFFRAME flag on last
+ while (PesLongEnough(length))
+ {
+ int pktLen = PesHasLength(data) ? PesLength(data) : length;
- // skip non-video packets as they may occur in PES recordings
- if ((data[3] & 0xf0) == 0xe0)
- PlayVideo(data, pktLen, pktLen == length);
+ // skip non-video packets as they may occur in PES recordings
+ if ((data[3] & 0xf0) == 0xe0)
+ PlayVideo(data, pktLen, pktLen == length);
- data += pktLen;
- length -= pktLen;
+ data += pktLen;
+ length -= pktLen;
+ }
}
if (pesPacket)
free(pesPacket);