[FFmpeg-cvslog] 1000l commit forgotten cabac fix

Michael Niedermayer git at videolan.org
Sat Jan 14 04:50:08 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 14 04:47:27 2012 +0100| [c834c7e39c4ebad0e38adca7a3a9c25fd04548b3] | committer: Michael Niedermayer

1000l commit forgotten cabac fix

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 34ff40c..9b880d2 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -52,6 +52,7 @@ static const uint8_t lps_range[64][4]= {
 
 uint8_t ff_h264_mlps_state[4*64];
 uint8_t ff_h264_lps_range[4*2*64];
+uint8_t ff_h264_lps_state[2*64];
 static uint8_t h264_mps_state[2 * 64];
 
 static const uint8_t mps_state[64]= {
@@ -200,6 +201,7 @@ static void put_cabac(CABACContext *c, uint8_t * const state, int bit){
     }else{
         c->low += c->range - RangeLPS;
         c->range = RangeLPS;
+        *state= ff_h264_lps_state[*state];
     }
 
     renorm_cabac_encoder(c);



More information about the ffmpeg-cvslog mailing list