Mercurial > libavcodec.hg
comparison mpeg12.c @ 1690:db54bb946ab3 libavcodec
10l (printing qscale before parsing it)
author | michael |
---|---|
date | Sun, 14 Dec 2003 16:15:32 +0000 |
parents | 7b810155650f |
children | 7d8af3b5699a |
comparison
equal
deleted
inserted
replaced
1689:1a2db2073848 | 1690:db54bb946ab3 |
---|---|
2071 s->current_picture_ptr->repeat_pict = 1; | 2071 s->current_picture_ptr->repeat_pict = 1; |
2072 } | 2072 } |
2073 } | 2073 } |
2074 | 2074 |
2075 *s->current_picture_ptr->pan_scan= s1->pan_scan; | 2075 *s->current_picture_ptr->pan_scan= s1->pan_scan; |
2076 | |
2077 //printf("%d\n", s->current_picture_ptr->repeat_pict); | |
2078 | |
2079 if(s->avctx->debug&FF_DEBUG_PICT_INFO){ | |
2080 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", | |
2081 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], | |
2082 s->pict_type == I_TYPE ? "I" : (s->pict_type == P_TYPE ? "P" : (s->pict_type == B_TYPE ? "B" : "S")), | |
2083 s->progressive_sequence ? "pro" :"", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", | |
2084 s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, | |
2085 s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); | |
2086 } | |
2087 }else{ //second field | 2076 }else{ //second field |
2088 int i; | 2077 int i; |
2089 | 2078 |
2090 if(!s->current_picture_ptr){ | 2079 if(!s->current_picture_ptr){ |
2091 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n"); | 2080 av_log(s->avctx, AV_LOG_ERROR, "first field missing\n"); |
2104 // but we need to call it on every field | 2093 // but we need to call it on every field |
2105 if(s->avctx->xvmc_acceleration) | 2094 if(s->avctx->xvmc_acceleration) |
2106 XVMC_field_start(s,avctx); | 2095 XVMC_field_start(s,avctx); |
2107 #endif | 2096 #endif |
2108 }//fi(s->first_slice) | 2097 }//fi(s->first_slice) |
2098 | |
2099 init_get_bits(&s->gb, *buf, buf_size*8); | |
2100 | |
2101 s->qscale = get_qscale(s); | |
2102 if (s->first_slice && (s->first_field || s->picture_structure==PICT_FRAME)) { | |
2103 if(s->avctx->debug&FF_DEBUG_PICT_INFO){ | |
2104 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", | |
2105 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], | |
2106 s->pict_type == I_TYPE ? "I" : (s->pict_type == P_TYPE ? "P" : (s->pict_type == B_TYPE ? "B" : "S")), | |
2107 s->progressive_sequence ? "pro" :"", s->alternate_scan ? "alt" :"", s->top_field_first ? "top" :"", | |
2108 s->intra_dc_precision, s->picture_structure, s->frame_pred_frame_dct, s->concealment_motion_vectors, | |
2109 s->q_scale_type, s->intra_vlc_format, s->repeat_first_field, s->chroma_420_type ? "420" :""); | |
2110 } | |
2111 } | |
2112 | |
2109 s->first_slice = 0; | 2113 s->first_slice = 0; |
2110 | |
2111 init_get_bits(&s->gb, *buf, buf_size*8); | |
2112 | |
2113 s->qscale = get_qscale(s); | |
2114 if(s->qscale == 0){ | 2114 if(s->qscale == 0){ |
2115 av_log(s->avctx, AV_LOG_ERROR, "qscale == 0\n"); | 2115 av_log(s->avctx, AV_LOG_ERROR, "qscale == 0\n"); |
2116 return -1; | 2116 return -1; |
2117 } | 2117 } |
2118 | 2118 |