[FFmpeg-cvslog] cabac: fix cabac encoder

Michael Niedermayer git at videolan.org
Wed Sep 21 21:08:31 CEST 2011


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 10 19:18:41 2011 +0200| [db93a5a0c8eb349c4380be61874c477fbcd248a3] | committer: Michael Niedermayer

cabac: fix cabac encoder
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 89653ea728bd59da2b88967ad648cce685950879)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db93a5a0c8eb349c4380be61874c477fbcd248a3
---

 libavcodec/cabac.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 76253af..c94a560 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -161,10 +161,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;
         }
     }



More information about the ffmpeg-cvslog mailing list