diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-12-14 16:15:32 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-12-14 16:15:32 +0000 |
commit | a4337a5130aa3d5f1844aba1ceaa6fed66497958 (patch) | |
tree | 58b72a9849d024c070e60505fd527bbb94d08639 /libavcodec/mpeg12.c | |
parent | d50635cd247e17fe16c63219b9ae80d45a8185b1 (diff) | |
download | ffmpeg-a4337a5130aa3d5f1844aba1ceaa6fed66497958.tar.gz |
10l (printing qscale before parsing it)
Originally committed as revision 2608 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 9d4658d0c6..3037c9d8b3 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2073,17 +2073,6 @@ static int mpeg_decode_slice(AVCodecContext *avctx, } *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 @@ static int mpeg_decode_slice(AVCodecContext *avctx, 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; |