This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-utils.git tree:
Subject: libv4lconvert: Fix se401 decompression Author: Hans de Goede <[email protected]> Date: Sun Jul 17 18:05:27 2011 +0200 Somehow I've managed to commit a non working version. Signed-off-by: Hans de Goede <[email protected]> lib/libv4lconvert/se401.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) --- http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=b5bf1620b30925fc38e66f7e4065f8314209d817 diff --git a/lib/libv4lconvert/se401.c b/lib/libv4lconvert/se401.c index ccfcda0..b38ef38 100644 --- a/lib/libv4lconvert/se401.c +++ b/lib/libv4lconvert/se401.c @@ -46,9 +46,9 @@ static void wr_pixel(int p, uint8_t **dest, int pitch, int *x) } enum decode_state { - get_len, - sign_bit, - other_bits, + get_len, + sign_bit, + other_bits, }; static int decode_JangGu(const uint8_t *data, int bits, int plen, int pixels, @@ -79,17 +79,20 @@ static int decode_JangGu(const uint8_t *data, int bits, int plen, int pixels, } } break; - case sign_bit: - if (!bit) + case sign_bit: + if (bit) + value = 0; + else value = -(1 << len) + 1; - /* fall through for positive number and - len == 1 handling */ - case other_bits: + state = other_bits; + /* fall through for positive number and + len == 1 handling */ + case other_bits: len--; value += bit << len; if (len == 0) { - /* Done write pixel and get bit len of - the next one */ + /* Done write pixel and get bit len of + the next one */ state = get_len; wr_pixel(value, dest, pitch, x); if (!--pixels) _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
