The patch number 14306 was added via Hans de Goede <hdego...@redhat.com>
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 <linux-me...@vger.kernel.org>

------

From: Hans de Goede  <hdego...@redhat.com>
libv4l: Skip unknown huffman codes in sonixb decompression


This slightly improves the image when unknown codes are encountered.

Priority: normal

Signed-off-by: Hans de Goede <hdego...@redhat.com>


---

 v4l2-apps/libv4l/libv4lconvert/sn9c10x.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff -r bf7af07e9bbd -r f23c5a878fb1 v4l2-apps/libv4l/libv4lconvert/sn9c10x.c
--- a/v4l2-apps/libv4l/libv4lconvert/sn9c10x.c  Sun Jan 31 17:25:32 2010 +0100
+++ b/v4l2-apps/libv4l/libv4lconvert/sn9c10x.c  Mon Feb 01 13:32:46 2010 +0100
@@ -38,9 +38,6 @@
 static code_table_t table[256];
 static int init_done = 0;
 
-/* global variable */
-static int sonix_unknown = 0;
-
 /*
        sonix_decompress_init
        =====================
@@ -113,7 +110,6 @@
                table[i].unk = unk;
        }
 
-       sonix_unknown = 0;
        init_done = 1;
 }
 
@@ -172,8 +168,10 @@
                        /* update bit position */
                        bitpos += table[code].len;
 
-                       /* update code statistics */
-                       sonix_unknown += table[code].unk;
+                       /* Skip unknown codes (most likely they indicate
+                          a change of the delta's the various codes encode) */
+                       if (table[code].unk)
+                               continue;
 
                        /* calculate pixel value */
                        val = table[code].val;


---

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

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to