aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/common.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-07-11 12:42:20 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-07-11 12:42:20 +0000
commit6300c80a8889491a2d5c755b7f7cb7d7b7062270 (patch)
tree61d24dc1a900ba78efe7aa3d80b68b6c80729a8e /libavcodec/common.h
parent5ea6f10f722b7d5c63479da591a0d3a2b21d3b2c (diff)
downloadffmpeg-6300c80a8889491a2d5c755b7f7cb7d7b7062270.tar.gz
dont trash table in GET_VLC
Originally committed as revision 741 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.h')
-rw-r--r--libavcodec/common.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 8044880804..13ac0693d7 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -724,7 +724,6 @@ int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
const void *codes, int codes_wrap, int codes_size);
void free_vlc(VLC *vlc);
-//note table will be trashed (pointer increased)
#define GET_VLC(code, name, gb, table, bits, max_depth)\
{\
int n, index, nb_bits;\
@@ -738,9 +737,8 @@ void free_vlc(VLC *vlc);
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
- table += code;\
\
- index= SHOW_UBITS(name, gb, nb_bits);\
+ index= SHOW_UBITS(name, gb, nb_bits) + code;\
code = table[index][0];\
n = table[index][1];\
if(max_depth > 2 && n < 0){\
@@ -748,9 +746,8 @@ void free_vlc(VLC *vlc);
UPDATE_CACHE(name, gb)\
\
nb_bits = -n;\
- table += code;\
\
- index= SHOW_UBITS(name, gb, nb_bits);\
+ index= SHOW_UBITS(name, gb, nb_bits) + code;\
code = table[index][0];\
n = table[index][1];\
}\