comparison mpeg12.c @ 1655:c92147a61d97 libavcodec

rv20 (h263) b frame decoding support
author michael
date Thu, 04 Dec 2003 18:34:47 +0000
parents 835cf346975e
children 30746f429df6
comparison
equal deleted inserted replaced
1654:1c123e036890 1655:c92147a61d97
1107 return -1; 1107 return -1;
1108 } 1108 }
1109 } 1109 }
1110 } else { 1110 } else {
1111 if (mb_type & MB_TYPE_ZERO_MV){ 1111 if (mb_type & MB_TYPE_ZERO_MV){
1112 assert(mb_type & MB_TYPE_PAT); 1112 assert(mb_type & MB_TYPE_CBP);
1113 1113
1114 /* compute dct type */ 1114 /* compute dct type */
1115 if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var? 1115 if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var?
1116 !s->frame_pred_frame_dct) { 1116 !s->frame_pred_frame_dct) {
1117 s->interlaced_dct = get_bits1(&s->gb); 1117 s->interlaced_dct = get_bits1(&s->gb);
1138 motion_type = get_bits(&s->gb, 2); 1138 motion_type = get_bits(&s->gb, 2);
1139 } 1139 }
1140 1140
1141 /* compute dct type */ 1141 /* compute dct type */
1142 if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var? 1142 if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var?
1143 !s->frame_pred_frame_dct && IS_PAT(mb_type)) { 1143 !s->frame_pred_frame_dct && HAS_CBP(mb_type)) {
1144 s->interlaced_dct = get_bits1(&s->gb); 1144 s->interlaced_dct = get_bits1(&s->gb);
1145 } 1145 }
1146 1146
1147 if (IS_QUANT(mb_type)) 1147 if (IS_QUANT(mb_type))
1148 s->qscale = get_qscale(s); 1148 s->qscale = get_qscale(s);
1264 } 1264 }
1265 } 1265 }
1266 1266
1267 s->mb_intra = 0; 1267 s->mb_intra = 0;
1268 1268
1269 if (IS_PAT(mb_type)) { 1269 if (HAS_CBP(mb_type)) {
1270 cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1); 1270 cbp = get_vlc2(&s->gb, mb_pat_vlc.table, MB_PAT_VLC_BITS, 1);
1271 if (cbp < 0){ 1271 if (cbp < 0){
1272 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y); 1272 av_log(s->avctx, AV_LOG_ERROR, "invalid cbp at %d %d\n", s->mb_x, s->mb_y);
1273 return -1; 1273 return -1;
1274 } 1274 }