diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 1d04292faf..25ddb0377b 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -74,7 +74,6 @@ static const uint8_t lps_range[64][4]= { }; static uint8_t h264_lps_state[2*64]; -static uint8_t h264_mps_state[2*64]; static const uint8_t mps_state[64]= { 1, 2, 3, 4, 5, 6, 7, 8, @@ -146,11 +145,8 @@ void ff_init_cabac_states(void) ff_h264_lps_range[j*2*64+2*i+0]= ff_h264_lps_range[j*2*64+2*i+1]= lps_range[i][j]; } - - ff_h264_mlps_state[128+2*i+0]= - h264_mps_state[2 * i + 0] = 2 * mps_state[i] + 0; - ff_h264_mlps_state[128+2*i+1]= - h264_mps_state[2 * i + 1] = 2 * mps_state[i] + 1; + ff_h264_mlps_state[128 + 2 * i + 0] = 2 * mps_state[i] + 0; + ff_h264_mlps_state[128 + 2 * i + 1] = 2 * mps_state[i] + 1; if( i ){ h264_lps_state[2*i+0]= @@ -205,7 +201,7 @@ static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ if(bit == ((*state)&1)){ c->range -= RangeLPS; - *state = h264_mps_state[*state]; + *state = ff_h264_mlps_state[128 + *state]; }else{ c->low += c->range - RangeLPS; c->range = RangeLPS;