diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-09 21:14:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-09 21:14:16 +0000 |
commit | 7822e1c1ffaa054728075d5189345c8c3618daa1 (patch) | |
tree | 039fe41c6e80cedf24280295e77a078d98327285 /libavcodec/cabac.c | |
parent | ef0090a9989062416aa734abffe4658e09b254a8 (diff) | |
download | ffmpeg-7822e1c1ffaa054728075d5189345c8c3618daa1.tar.gz |
reverse remainder of the failed attempt to optimize *state=c->mps_state[s]
Originally committed as revision 6609 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r-- | libavcodec/cabac.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index f69b100d60..01efcdb65c 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -125,26 +125,26 @@ void ff_init_cabac_states(CABACContext *c, uint8_t const (*lps_range)[4], for(i=0; i<state_count; i++){ for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save - c->lps_range[2*i+2][j+4]= - c->lps_range[2*i+3][j+4]= lps_range[i][j]; + c->lps_range[2*i+0][j+4]= + c->lps_range[2*i+1][j+4]= lps_range[i][j]; } - c->mps_state[2*i+2]= 2*mps_state[i]+2; - c->mps_state[2*i+3]= 2*mps_state[i]+3; + c->mps_state[2*i+0]= 2*mps_state[i]+0; + c->mps_state[2*i+1]= 2*mps_state[i]+1; if( i ){ #ifdef BRANCHLESS_CABAD - c->mps_state[-2*i-3]= 2*lps_state[i]+2; //FIXME yes this is not valid C but iam lazy, cleanup welcome - c->mps_state[-2*i-4]= 2*lps_state[i]+3; + c->mps_state[-2*i-1]= 2*lps_state[i]+0; //FIXME yes this is not valid C but iam lazy, cleanup welcome + c->mps_state[-2*i-2]= 2*lps_state[i]+1; }else{ - c->mps_state[-2*i-3]= 3; - c->mps_state[-2*i-4]= 2; + c->mps_state[-2*i-1]= 1; + c->mps_state[-2*i-2]= 0; #else - c->lps_state[2*i+2]= 2*lps_state[i]+2; - c->lps_state[2*i+3]= 2*lps_state[i]+3; + c->lps_state[2*i+0]= 2*lps_state[i]+0; + c->lps_state[2*i+1]= 2*lps_state[i]+1; }else{ - c->lps_state[2*i+2]= 3; - c->lps_state[2*i+3]= 2; + c->lps_state[2*i+0]= 1; + c->lps_state[2*i+1]= 0; #endif } } |