aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2008-01-29 23:07:20 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-02-18 09:15:11 -0500
commit0ed4a6ea9dbd9f5b77ce594f7f46be022d2c49ec (patch)
tree5d773187b739be938268807b05e8815492c2a3db /drivers
parent251130bf266000fe6e9fdccda50fe4b5c1d6cb24 (diff)
V4L/DVB (7118): dvb-ttpci: Improved display of still pictures
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. Thanks-to: Reinhard Nissl <rnissl@gmx.de> Thanks-to: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index aef6e36d7c5c..3e6b650fbb81 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -966,6 +966,7 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x
966static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) 966static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock)
967{ 967{
968 int i, n; 968 int i, n;
969 int progressive = 0;
969 970
970 dprintk(2, "av7110:%p, \n", av7110); 971 dprintk(2, "av7110:%p, \n", av7110);
971 972
@@ -974,6 +975,14 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
974 return -EBUSY; 975 return -EBUSY;
975 } 976 }
976 977
978 for (i = 0; i < len - 5; i++) {
979 /* get progressive flag from picture extension */
980 if (buf[i] == 0x00 && buf[i+1] == 0x00 &&
981 buf[i+2] == 0x01 && (unsigned char)buf[i+3] == 0xb5 &&
982 (buf[i+4] & 0xf0) == 0x10)
983 progressive = buf[i+5] & 0x08;
984 }
985
977 /* setting n always > 1, fixes problems when playing stillframes 986 /* setting n always > 1, fixes problems when playing stillframes
978 consisting of I- and P-Frames */ 987 consisting of I- and P-Frames */
979 n = MIN_IFRAME / len + 1; 988 n = MIN_IFRAME / len + 1;
@@ -985,7 +994,11 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
985 dvb_play(av7110, buf, len, 0, 1); 994 dvb_play(av7110, buf, len, 0, 1);
986 995
987 av7110_ipack_flush(&av7110->ipack[1]); 996 av7110_ipack_flush(&av7110->ipack[1]);
988 return 0; 997
998 if (progressive)
999 return vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1);
1000 else
1001 return 0;
989} 1002}
990 1003
991 1004