huffyuvdec: remove somewhat deprecated code
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Sun, 15 Jun 2014 13:13:16 +0000 (15:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 15 Jun 2014 15:43:47 +0000 (17:43 +0200)
The old code was reserving the 0xFFFF entry to represent an inexisting
entry/codeword. These entries are now detected through their length
being <= 0. As this entry is often used for the residuals (-1,-1), which
should be among the most frequent, it is particularly important to not
reserve it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/huffyuvdec.c

index ca0e363..6691149 100644 (file)
@@ -138,7 +138,6 @@ static int generate_joint_tables(HYuvContext *s)
                     len[i] = len0 + len1;
                     bits[i] = (s->bits[p0][y] << len1) + s->bits[p][u];
                     symbols[i] = (y << 8) + (u & 0xFF);
-                    if(symbols[i] != 0xffff) // reserved to mean "invalid"
                         i++;
                 }
             }