diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-10 19:18:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-10 20:05:45 +0200 |
commit | 89653ea728bd59da2b88967ad648cce685950879 (patch) | |
tree | 676f3da2ffe844d7b8495e08e51573579895ea51 /libavcodec/cabac.c | |
parent | 824f98f442996eaee9204b132752cf5114fc94cf (diff) | |
download | ffmpeg-89653ea728bd59da2b88967ad648cce685950879.tar.gz |
cabac: fix cabac encoder
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r-- | libavcodec/cabac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 5632bf811e..81bba51370 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -150,10 +150,14 @@ void ff_init_cabac_states(CABACContext *c){ ff_h264_mps_state[2*i+1]= 2*mps_state[i]+1; if( i ){ + ff_h264_lps_state[2*i+0]= ff_h264_mlps_state[128-2*i-1]= 2*lps_state[i]+0; + ff_h264_lps_state[2*i+1]= ff_h264_mlps_state[128-2*i-2]= 2*lps_state[i]+1; }else{ + ff_h264_lps_state[2*i+0]= ff_h264_mlps_state[128-2*i-1]= 1; + ff_h264_lps_state[2*i+1]= ff_h264_mlps_state[128-2*i-2]= 0; } } |