(commit by michael)
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Jan 2002 06:12:35 +0000 (06:12 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Jan 2002 06:12:35 +0000 (06:12 +0000)
new msmpeg4 dequantizer did dequantize too early

Originally committed as revision 261 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/msmpeg4.c

index 2d5d3dd..c8df0c4 100644 (file)
@@ -868,9 +868,10 @@ static int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
                     if (code < 0 || code >= rl->n)
                         return -1;
                     run = rl->table_run[code];
-                    level = rl->table_level[code] * qmul + qadd;
+                    level = rl->table_level[code];
                     last = code >= rl->last;
                     run += rl->max_run[last][level] + run_diff;
+                    level= level * qmul + qadd;
                     if (get_bits1(&s->gb))
                         level = -level;
                 }