comparison mpeg12.c @ 2628:511e3afc43e1 libavcodec

Ministry of English Composition, reporting for duty (and the word is "skipped", not "skiped"; "skiped" would rhyme with "hyped")
author melanson
date Sun, 24 Apr 2005 17:21:11 +0000
parents fe4ed09b0f0d
children ef44d24680d1
comparison
equal deleted inserted replaced
2627:bf158d23bbcc 2628:511e3afc43e1
224 if(MPV_encode_init(avctx) < 0) 224 if(MPV_encode_init(avctx) < 0)
225 return -1; 225 return -1;
226 226
227 if(find_frame_rate_index(s) < 0){ 227 if(find_frame_rate_index(s) < 0){
228 if(s->strict_std_compliance >=0){ 228 if(s->strict_std_compliance >=0){
229 av_log(avctx, AV_LOG_ERROR, "MPEG1/2 doesnt support %d/%d fps\n", avctx->frame_rate, avctx->frame_rate_base); 229 av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n", avctx->frame_rate, avctx->frame_rate_base);
230 return -1; 230 return -1;
231 }else{ 231 }else{
232 av_log(avctx, AV_LOG_INFO, "MPEG1/2 doesnt support %d/%d fps, there may be AV sync issues\n", avctx->frame_rate, avctx->frame_rate_base); 232 av_log(avctx, AV_LOG_INFO, "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n", avctx->frame_rate, avctx->frame_rate_base);
233 } 233 }
234 } 234 }
235 235
236 return 0; 236 return 0;
237 } 237 }
1053 int i, j, k, cbp, val, mb_type, motion_type; 1053 int i, j, k, cbp, val, mb_type, motion_type;
1054 const int mb_block_count = 4 + (1<< s->chroma_format); 1054 const int mb_block_count = 4 + (1<< s->chroma_format);
1055 1055
1056 dprintf("decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y); 1056 dprintf("decode_mb: x=%d y=%d\n", s->mb_x, s->mb_y);
1057 1057
1058 assert(s->mb_skiped==0); 1058 assert(s->mb_skipped==0);
1059 1059
1060 if (s->mb_skip_run-- != 0) { 1060 if (s->mb_skip_run-- != 0) {
1061 if(s->pict_type == I_TYPE){ 1061 if(s->pict_type == I_TYPE){
1062 av_log(s->avctx, AV_LOG_ERROR, "skiped MB in I frame at %d %d\n", s->mb_x, s->mb_y); 1062 av_log(s->avctx, AV_LOG_ERROR, "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y);
1063 return -1; 1063 return -1;
1064 } 1064 }
1065 1065
1066 /* skip mb */ 1066 /* skip mb */
1067 s->mb_intra = 0; 1067 s->mb_intra = 0;
1076 s->mv_dir = MV_DIR_FORWARD; 1076 s->mv_dir = MV_DIR_FORWARD;
1077 s->mv[0][0][0] = s->mv[0][0][1] = 0; 1077 s->mv[0][0][0] = s->mv[0][0][1] = 0;
1078 s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0; 1078 s->last_mv[0][0][0] = s->last_mv[0][0][1] = 0;
1079 s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0; 1079 s->last_mv[0][1][0] = s->last_mv[0][1][1] = 0;
1080 s->field_select[0][0]= s->picture_structure - 1; 1080 s->field_select[0][0]= s->picture_structure - 1;
1081 s->mb_skiped = 1; 1081 s->mb_skipped = 1;
1082 s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16; 1082 s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= MB_TYPE_SKIP | MB_TYPE_L0 | MB_TYPE_16x16;
1083 } else { 1083 } else {
1084 int mb_type; 1084 int mb_type;
1085 1085
1086 if(s->mb_x) 1086 if(s->mb_x)
1099 s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]= 1099 s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride ]=
1100 mb_type | MB_TYPE_SKIP; 1100 mb_type | MB_TYPE_SKIP;
1101 // assert(s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride - 1]&(MB_TYPE_16x16|MB_TYPE_16x8)); 1101 // assert(s->current_picture.mb_type[ s->mb_x + s->mb_y*s->mb_stride - 1]&(MB_TYPE_16x16|MB_TYPE_16x8));
1102 1102
1103 if((s->mv[0][0][0]|s->mv[0][0][1]|s->mv[1][0][0]|s->mv[1][0][1])==0) 1103 if((s->mv[0][0][0]|s->mv[0][0][1]|s->mv[1][0][0]|s->mv[1][0][1])==0)
1104 s->mb_skiped = 1; 1104 s->mb_skipped = 1;
1105 } 1105 }
1106 1106
1107 return 0; 1107 return 0;
1108 } 1108 }
1109 1109