Commit 96aa21da authored by michael's avatar michael

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2932 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 03c0c29a
...@@ -113,7 +113,7 @@ void ff_init_cabac_states(CABACContext *c, uint8_t const (*lps_range)[4], ...@@ -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+0]= 2*mps_state[i];
c->mps_state[2*i+1]= 2*mps_state[i]+1; 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+0]= 2*lps_state[i];
c->lps_state[2*i+1]= 2*lps_state[i]+1; c->lps_state[2*i+1]= 2*lps_state[i]+1;
}else{ }else{
......
...@@ -650,6 +650,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, ...@@ -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_encoder(c, buf, buf_size);
ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); 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;
p->pict_type= FF_I_TYPE; p->pict_type= FF_I_TYPE;
...@@ -954,6 +956,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 ...@@ -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_decoder(c, buf, buf_size);
ff_init_cabac_states(c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64); 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 p->pict_type= FF_I_TYPE; //FIXME I vs. P
if(get_cabac_bypass(c)){ 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