# HG changeset patch # User michael # Date 1071418532 0 # Node ID db54bb946ab3bb8a59388ff6d967da8a48f04e3f # Parent 1a2db2073848359bd6cc6aa5455310c3fb01a895 10l (printing qscale before parsing it) diff -r 1a2db2073848 -r db54bb946ab3 mpeg12.c --- a/mpeg12.c Sun Dec 14 02:57:00 2003 +0000 +++ b/mpeg12.c Sun Dec 14 16:15:32 2003 +0000 @@ -2073,17 +2073,6 @@ } *s->current_picture_ptr->pan_scan= s1->pan_scan; - - //printf("%d\n", s->current_picture_ptr->repeat_pict); - - if(s->avctx->debug&FF_DEBUG_PICT_INFO){ - av_log(s->avctx, AV_LOG_DEBUG, "qp:%d fc:%2d%2d%2d%2d %s %s %s %s dc:%d pstruct:%d fdct:%d cmv:%d qtype:%d ivlc:%d rff:%d %s\n", - s->qscale, s->mpeg_f_code[0][0],s->mpeg_f_code[0][1],s->mpeg_f_code[1][0],s->mpeg_f_code[1][1], - s->pict_type == I_TYPE ? "I" : (s->pict_type == P_TYPE ? "P" : (s->pict_type == B_TYPE ? "B" : "S")), - s->progressive_sequence ? "pro" :"", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", - s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, - s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); - } }else{ //second field int i; @@ -2106,11 +2095,22 @@ XVMC_field_start(s,avctx); #endif }//fi(s->first_slice) - s->first_slice = 0; init_get_bits(&s->gb, *buf, buf_size*8); s->qscale = get_qscale(s); + if (s->first_slice && (s->first_field || s->picture_structure==PICT_FRAME)) { + if(s->avctx->debug&FF_DEBUG_PICT_INFO){ + av_log(s->avctx, AV_LOG_DEBUG, "qp:%d fc:%2d%2d%2d%2d %s %s %s %s dc:%d pstruct:%d fdct:%d cmv:%d qtype:%d ivlc:%d rff:%d %s\n", + s->qscale, s->mpeg_f_code[0][0],s->mpeg_f_code[0][1],s->mpeg_f_code[1][0],s->mpeg_f_code[1][1], + s->pict_type == I_TYPE ? "I" : (s->pict_type == P_TYPE ? "P" : (s->pict_type == B_TYPE ? "B" : "S")), + s->progressive_sequence ? "pro" :"", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", + s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, + s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); + } + } + + s->first_slice = 0; if(s->qscale == 0){ av_log(s->avctx, AV_LOG_ERROR, "qscale == 0\n"); return -1;