diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 18:42:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-24 18:42:22 +0000 |
commit | 449d1442a62dda3815cb322d67be740db8f20c1b (patch) | |
tree | 01dc8ce66ef849ec7989b768926714a2ce7047da | |
parent | 7abc860323cc92b81bdc1e7c83bc8f7144f3b45d (diff) | |
download | ffmpeg-449d1442a62dda3815cb322d67be740db8f20c1b.tar.gz |
a[b-1] -> (a-1)[b].
Helps gcc not to add seperate -1 instructions.
Originally committed as revision 21432 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264_cavlc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index d00cbeb25c..2c34d7fe28 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -478,9 +478,9 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in zeros_left=0; else{ if(n == CHROMA_DC_BLOCK_INDEX) - zeros_left= get_vlc2(gb, chroma_dc_total_zeros_vlc[ total_coeff-1 ].table, CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 1); + zeros_left= get_vlc2(gb, (chroma_dc_total_zeros_vlc-1)[ total_coeff ].table, CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 1); else - zeros_left= get_vlc2(gb, total_zeros_vlc[ total_coeff-1 ].table, TOTAL_ZEROS_VLC_BITS, 1); + zeros_left= get_vlc2(gb, (total_zeros_vlc-1)[ total_coeff ].table, TOTAL_ZEROS_VLC_BITS, 1); } coeff_num = zeros_left + total_coeff - 1; @@ -491,7 +491,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in if(zeros_left <= 0) run_before = 0; else if(zeros_left < 7){ - run_before= get_vlc2(gb, run_vlc[zeros_left-1].table, RUN_VLC_BITS, 1); + run_before= get_vlc2(gb, (run_vlc-1)[zeros_left].table, RUN_VLC_BITS, 1); }else{ run_before= get_vlc2(gb, run7_vlc.table, RUN7_VLC_BITS, 2); } @@ -507,7 +507,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in if(zeros_left <= 0) run_before = 0; else if(zeros_left < 7){ - run_before= get_vlc2(gb, run_vlc[zeros_left-1].table, RUN_VLC_BITS, 1); + run_before= get_vlc2(gb, (run_vlc-1)[zeros_left].table, RUN_VLC_BITS, 1); }else{ run_before= get_vlc2(gb, run7_vlc.table, RUN7_VLC_BITS, 2); } |