From 8aedc51d2b568b7d0f11aa9d9ff2437b13ebb3fb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 27 Apr 2004 13:50:41 +0000 Subject: [PATCH] simplify Originally committed as revision 3085 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpeg12.c | 2 +- libavcodec/mpeg12data.h | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index d3ff54a7ab..a85a15d2dc 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -777,7 +777,7 @@ void ff_mpeg1_encode_init(MpegEncContext *s) adiff = ABS(diff); if(diff<0) diff--; - index = vlc_dc_table[adiff]; + index = av_log2(2*adiff); bits= vlc_dc_lum_bits[index] + index; code= (vlc_dc_lum_code[index]<