Commit 92173052 authored by michael's avatar michael

10l (interlaced b frame decoding fix)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3160 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 690a70d5
......@@ -5419,6 +5419,8 @@ static int decode_vol_header(MpegEncContext *s, GetBitContext *gb){
skip_bits(gb, s->time_increment_bits);
}
s->t_frame=0;
if (s->shape != BIN_ONLY_SHAPE) {
if (s->shape == RECT_SHAPE) {
skip_bits1(gb); /* marker */
......@@ -5691,7 +5693,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
else time_increment= get_bits(gb, s->time_increment_bits);
// printf("%d %X\n", s->time_increment_bits, time_increment);
//printf(" type:%d modulo_time_base:%d increment:%d\n", s->pict_type, time_incr, time_increment);
//av_log(s->avctx, AV_LOG_DEBUG, " type:%d modulo_time_base:%d increment:%d t_frame %d\n", s->pict_type, time_incr, time_increment, s->t_frame);
if(s->pict_type!=B_TYPE){
s->last_time_base= s->time_base;
s->time_base+= time_incr;
......@@ -5713,14 +5715,14 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
return FRAME_SKIPED;
}
if(s->t_frame==0) s->t_frame= s->time - s->last_time_base;
if(s->t_frame==0) s->t_frame= s->pb_time;
if(s->t_frame==0) s->t_frame=1; // 1/0 protection
//printf("%Ld %Ld %d %d\n", s->last_non_b_time, s->time, s->pp_time, s->t_frame); fflush(stdout);
s->pp_field_time= ( ROUNDED_DIV(s->last_non_b_time, s->t_frame)
- ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame))*2;
s->pb_field_time= ( ROUNDED_DIV(s->time, s->t_frame)
- ROUNDED_DIV(s->last_non_b_time - s->pp_time, s->t_frame))*2;
}
//av_log(s->avctx, AV_LOG_DEBUG, "last nonb %Ld last_base %d time %Ld pp %d pb %d t %d ppf %d pbf %d\n", s->last_non_b_time, s->last_time_base, s->time, s->pp_time, s->pb_time, s->t_frame, s->pp_field_time, s->pb_field_time);
s->current_picture_ptr->pts= s->time*(int64_t)AV_TIME_BASE / s->time_increment_resolution;
if(s->avctx->debug&FF_DEBUG_PTS)
......
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