aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cabac.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-10-08 11:24:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-10-08 11:24:37 +0000
commit99ce10873df41ba650e51c8069280a32a1f57961 (patch)
tree9aa4be055ebd404e039e0a1fc61b1758f52143b4 /libavcodec/cabac.c
parente16c407a817faaa6e5bed445d602f9240f5319fb (diff)
downloadffmpeg-99ce10873df41ba650e51c8069280a32a1f57961.tar.gz
5% faster get_cabac()
Originally committed as revision 6586 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r--libavcodec/cabac.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 86eb4696cb..8dd00a3cd9 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -133,19 +133,19 @@ 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+0][j+4]=
- c->lps_range[2*i+1][j+4]= lps_range[i][j];
+ c->lps_range[2*i+2][j+4]=
+ c->lps_range[2*i+3][j+4]= lps_range[i][j];
}
- c->mps_state[2*i+0]= 2*mps_state[i];
- c->mps_state[2*i+1]= 2*mps_state[i]+1;
+ c->mps_state[2*i+2]= 2*mps_state[i]+2;
+ c->mps_state[2*i+3]= 2*mps_state[i]+3;
if( i ){
- c->lps_state[2*i+0]= 2*lps_state[i];
- c->lps_state[2*i+1]= 2*lps_state[i]+1;
+ c->lps_state[2*i+2]= 2*lps_state[i]+2;
+ c->lps_state[2*i+3]= 2*lps_state[i]+3;
}else{
- c->lps_state[2*i+0]= 1;
- c->lps_state[2*i+1]= 0;
+ c->lps_state[2*i+2]= 3;
+ c->lps_state[2*i+3]= 2;
}
}
}