[SCM] libav/experimental: simplify
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:58:47 UTC 2013
The following commit has been merged in the experimental branch:
commit adf6640c8c8c1745ab5b6c969764db5793f31e41
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Mon Apr 9 22:18:09 2007 +0000
simplify
Originally committed as revision 8699 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/lzwenc.c b/libavcodec/lzwenc.c
index 5b44895..6b9b8d4 100644
--- a/libavcodec/lzwenc.c
+++ b/libavcodec/lzwenc.c
@@ -232,13 +232,12 @@ int ff_lzw_encode(LZWEncodeState * s, const uint8_t * inbuf, int insize)
for (i = 0; i < insize; i++) {
uint8_t c = *inbuf++;
int code = findCode(s, c, code_prefix);
- if (s->tab[code].hash_prefix != LZW_PREFIX_FREE) {
- code_prefix = s->tab[code].code;
- } else {
+ if (s->tab[code].hash_prefix == LZW_PREFIX_FREE) {
writeCode(s, code_prefix);
addCode(s, c, code_prefix, code);
- code_prefix = s->tab[hash(0, c)].code;
+ code= hash(0, c);
}
+ code_prefix = s->tab[code].code;
if (s->tabsize >= s->maxcode - 1) {
clearTable(s);
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list