The patch number 12014 was added via [email protected]
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Brian Johnson  <[email protected]>
libv4l: drop bad sn9c20x jpeg frames


sn9c20x cams have occasional bad jpeg frames, drop these to avoid the
flickering effect they cause, by: Brian Johnson <[email protected]>

Priority: normal

Signed-off-by: Brian Johnson <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>


---

 v4l2-apps/libv4l/ChangeLog                          |    5 +++++
 v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h |    1 +
 v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c      |    5 ++++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff -r c2e9ae022ea7 -r 23046d73f9a6 v4l2-apps/libv4l/ChangeLog
--- a/v4l2-apps/libv4l/ChangeLog        Fri Mar 13 12:57:33 2009 +0100
+++ b/v4l2-apps/libv4l/ChangeLog        Mon Mar 16 11:27:29 2009 +0100
@@ -1,3 +1,8 @@ libv4l-0.5.9
+libv4l-0.5.10
+-------------
+* sn9c20x cams have occasional bad jpeg frames, drop these to avoid the
+  flickering effect they cause, by: Brian Johnson <[email protected]>
+
 libv4l-0.5.9
 ------------
 * Add support for MR97310A decompression by Kyle Guinn <[email protected]>
diff -r c2e9ae022ea7 -r 23046d73f9a6 
v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h       Fri Mar 13 
12:57:33 2009 +0100
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert-priv.h       Mon Mar 16 
11:27:29 2009 +0100
@@ -90,6 +90,7 @@
 #define V4LCONVERT_ROTATE_90  0x01
 #define V4LCONVERT_ROTATE_180 0x02
 #define V4LCONVERT_IS_UVC     0x04
+#define V4LCONVERT_IS_SN9C20X 0x08
 
 /* Pixformat flags */
 #define V4LCONVERT_COMPRESSED 0x01
diff -r c2e9ae022ea7 -r 23046d73f9a6 
v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c
--- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c    Fri Mar 13 12:57:33 
2009 +0100
+++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c    Mon Mar 16 11:27:29 
2009 +0100
@@ -166,6 +166,8 @@ struct v4lconvert_data *v4lconvert_creat
   if (syscall(SYS_ioctl, fd, VIDIOC_QUERYCAP, &cap) == 0) {
     if (!strcmp((char *)cap.driver, "uvcvideo"))
       data->flags |= V4LCONVERT_IS_UVC;
+    else if (!strcmp((char *)cap.driver, "sn9c20x"))
+      data->flags |= V4LCONVERT_IS_SN9C20X;
   }
 
   return data;
@@ -541,7 +543,8 @@ static int v4lconvert_convert_pixfmt(str
           are best thrown away to avoid flashes in the video stream. Tell
           the upper layer this is an intermediate fault and it should try
           again with a new buffer by setting errno to EAGAIN */
-       if (src_pix_fmt == V4L2_PIX_FMT_PJPG) {
+       if (src_pix_fmt == V4L2_PIX_FMT_PJPG ||
+           data->flags & V4LCONVERT_IS_SN9C20X) {
          V4LCONVERT_ERR("decompressing JPEG: %s",
            tinyjpeg_get_errorstring(data->jdec));
          errno = EAGAIN;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/23046d73f9a6916fd3fe5e26a60945c0312c110c

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to