# HG changeset patch # User michael # Date 1085600520 0 # Node ID 9629c1180d5ff28162d1888a2f8ac5981a85695b # Parent 6852ecebb82af3a2eb6f2201447675c63131f5c9 10l (interlaced b frame decoding fix) diff -r 6852ecebb82a -r 9629c1180d5f h263.c --- a/h263.c Wed May 26 02:42:41 2004 +0000 +++ b/h263.c Wed May 26 19:42:00 2004 +0000 @@ -5418,6 +5418,8 @@ if (get_bits1(gb) != 0) { /* fixed_vop_rate */ skip_bits(gb, s->time_increment_bits); } + + s->t_frame=0; if (s->shape != BIN_ONLY_SHAPE) { if (s->shape == RECT_SHAPE) { @@ -5691,7 +5693,7 @@ 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,19 +5715,19 @@ 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) av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %f\n", s->current_picture_ptr->pts/(float)AV_TIME_BASE); - + check_marker(gb, "before vop_coded"); /* vop coded */