Commit e5017ab8 authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

h264 - progressive I frame CABAC support patch by (Laurent Aimar <fenrir at via dot ecp dot fr>)

Originally committed as revision 2932 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6fb316d5
......@@ -113,7 +113,7 @@ void ff_init_cabac_states(CABACContext *c, uint8_t const (*lps_range)[4],
c->mps_state[2*i+0]= 2*mps_state[i];
c->mps_state[2*i+1]= 2*mps_state[i]+1;
if(lps_state[i]){
if( i ){
c->lps_state[2*i+0]= 2*lps_state[i];
c->lps_state[2*i+1]= 2*lps_state[i]+1;
}else{
......
......@@ -650,6 +650,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
ff_init_cabac_encoder(c, buf, buf_size);
ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64);
c->lps_state[2] = 1;
c->lps_state[3] = 0;
*p = *pict;
p->pict_type= FF_I_TYPE;
......@@ -954,6 +956,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
ff_init_cabac_decoder(c, buf, buf_size);
ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64);
c->lps_state[2] = 1;
c->lps_state[3] = 0;
p->pict_type= FF_I_TYPE; //FIXME I vs. P
if(get_cabac_bypass(c)){
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment