You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
simplify
Originally committed as revision 8699 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -232,13 +232,12 @@ int ff_lzw_encode(LZWEncodeState * s, const uint8_t * inbuf, int insize)
|
|||||||
for (i = 0; i < insize; i++) {
|
for (i = 0; i < insize; i++) {
|
||||||
uint8_t c = *inbuf++;
|
uint8_t c = *inbuf++;
|
||||||
int code = findCode(s, c, code_prefix);
|
int code = findCode(s, c, code_prefix);
|
||||||
if (s->tab[code].hash_prefix != LZW_PREFIX_FREE) {
|
if (s->tab[code].hash_prefix == LZW_PREFIX_FREE) {
|
||||||
code_prefix = s->tab[code].code;
|
|
||||||
} else {
|
|
||||||
writeCode(s, code_prefix);
|
writeCode(s, code_prefix);
|
||||||
addCode(s, c, code_prefix, code);
|
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) {
|
if (s->tabsize >= s->maxcode - 1) {
|
||||||
clearTable(s);
|
clearTable(s);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user