diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2008-01-30 02:07:20 +0100 |
---|---|---|
committer | Oliver Endriss <o.endriss@gmx.de> | 2008-01-30 02:07:20 +0100 |
commit | 21d49a20ae5f4bf8ad0a1e692ac07336a8ee8c95 (patch) | |
tree | 6ff9db14147446d050caef0eda3c92a53925e2e2 /linux/drivers/media | |
parent | c810210ce076544a4e6d34ad44ad9adf8132f349 (diff) | |
download | mediapointer-dvb-s2-21d49a20ae5f4bf8ad0a1e692ac07336a8ee8c95.tar.gz mediapointer-dvb-s2-21d49a20ae5f4bf8ad0a1e692ac07336a8ee8c95.tar.bz2 |
dvb-ttpci: Improved display of still pictures
From: Oliver Endriss <o.endriss@gmx.de>
Improved display of still pictures (VIDEO_STILLPICTURE ioctl).
Ensure that both fields are displayed for progressive frames.
Thanks to Reinhard Nissl and Klaus Schmidinger for finding out
that the FREEZE command does this.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Thanks-to: Reinhard Nissl <rnissl@gmx.de>
Thanks-to: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_av.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_av.c b/linux/drivers/media/dvb/ttpci/av7110_av.c index aef6e36d7..3e6b650fb 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_av.c +++ b/linux/drivers/media/dvb/ttpci/av7110_av.c @@ -966,6 +966,7 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) { int i, n; + int progressive = 0; dprintk(2, "av7110:%p, \n", av7110); @@ -974,6 +975,14 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len return -EBUSY; } + for (i = 0; i < len - 5; i++) { + /* get progressive flag from picture extension */ + if (buf[i] == 0x00 && buf[i+1] == 0x00 && + buf[i+2] == 0x01 && (unsigned char)buf[i+3] == 0xb5 && + (buf[i+4] & 0xf0) == 0x10) + progressive = buf[i+5] & 0x08; + } + /* setting n always > 1, fixes problems when playing stillframes consisting of I- and P-Frames */ n = MIN_IFRAME / len + 1; @@ -985,7 +994,11 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len dvb_play(av7110, buf, len, 0, 1); av7110_ipack_flush(&av7110->ipack[1]); - return 0; + + if (progressive) + return vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1); + else + return 0; } |