diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-25 16:30:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-25 16:30:25 +0200 |
commit | ab6fbe820628870be34873c730bc6f8fe5757705 (patch) | |
tree | 4140a5a709e033ebc3e06659cb999948f5fdb213 /libavcodec/cabac.c | |
parent | c3c6999ea1c3fb412af58ebdc3a3da2b1828e68f (diff) | |
download | ffmpeg-ab6fbe820628870be34873c730bc6f8fe5757705.tar.gz |
avcodec/cabac: remove h264_lps_state
The only use case of it was the selftest code, and there the slightly more
complex indexing that is needed after its removial doesnt matter.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r-- | libavcodec/cabac.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 0c02d6c168..29b188bc31 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -73,8 +73,6 @@ static const uint8_t lps_range[64][4]= { { 6, 8, 9, 11}, { 6, 7, 9, 10}, { 6, 7, 8, 9}, { 2, 2, 2, 2}, }; -static uint8_t h264_lps_state[2*64]; - static const uint8_t mps_state[64]= { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16, @@ -153,14 +151,10 @@ void ff_init_cabac_states(void) ff_h264_mlps_state[128 + 2 * i + 1] = 2 * mps_state[i] + 1; if( i ){ - h264_lps_state[2*i+0]= ff_h264_mlps_state[128-2*i-1]= 2*lps_state[i]+0; - h264_lps_state[2*i+1]= ff_h264_mlps_state[128-2*i-2]= 2*lps_state[i]+1; }else{ - h264_lps_state[2*i+0]= ff_h264_mlps_state[128-2*i-1]= 1; - h264_lps_state[2*i+1]= ff_h264_mlps_state[128-2*i-2]= 0; } } @@ -211,7 +205,7 @@ static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ }else{ c->low += c->range - RangeLPS; c->range = RangeLPS; - *state= h264_lps_state[*state]; + *state= ff_h264_mlps_state[127 - *state]; } renorm_cabac_encoder(c); |