Mercurial > libavcodec.hg
comparison h263dec.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 | 9a7770ebed14 |
children | 67171616ead6 |
comparison
equal
deleted
inserted
replaced
2627:bf158d23bbcc | 2628:511e3afc43e1 |
---|---|
197 /* DCT & quantize */ | 197 /* DCT & quantize */ |
198 s->dsp.clear_blocks(s->block[0]); | 198 s->dsp.clear_blocks(s->block[0]); |
199 | 199 |
200 s->mv_dir = MV_DIR_FORWARD; | 200 s->mv_dir = MV_DIR_FORWARD; |
201 s->mv_type = MV_TYPE_16X16; | 201 s->mv_type = MV_TYPE_16X16; |
202 // s->mb_skiped = 0; | 202 // s->mb_skipped = 0; |
203 //printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24)); | 203 //printf("%d %d %06X\n", ret, get_bits_count(&s->gb), show_bits(&s->gb, 24)); |
204 ret= s->decode_mb(s, s->block); | 204 ret= s->decode_mb(s, s->block); |
205 | 205 |
206 if (s->pict_type!=B_TYPE) | 206 if (s->pict_type!=B_TYPE) |
207 ff_h263_update_motion_val(s); | 207 ff_h263_update_motion_val(s); |
449 if(s->codec_id==CODEC_ID_MPEG4){ | 449 if(s->codec_id==CODEC_ID_MPEG4){ |
450 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size); | 450 next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size); |
451 }else if(s->codec_id==CODEC_ID_H263){ | 451 }else if(s->codec_id==CODEC_ID_H263){ |
452 next= h263_find_frame_end(&s->parse_context, buf, buf_size); | 452 next= h263_find_frame_end(&s->parse_context, buf, buf_size); |
453 }else{ | 453 }else{ |
454 av_log(s->avctx, AV_LOG_ERROR, "this codec doesnt support truncated bitstreams\n"); | 454 av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n"); |
455 return -1; | 455 return -1; |
456 } | 456 } |
457 | 457 |
458 if( ff_combine_frame(&s->parse_context, next, &buf, &buf_size) < 0 ) | 458 if( ff_combine_frame(&s->parse_context, next, &buf, &buf_size) < 0 ) |
459 return buf_size; | 459 return buf_size; |
501 ret = flv_h263_decode_picture_header(s); | 501 ret = flv_h263_decode_picture_header(s); |
502 } else { | 502 } else { |
503 ret = h263_decode_picture_header(s); | 503 ret = h263_decode_picture_header(s); |
504 } | 504 } |
505 | 505 |
506 if(ret==FRAME_SKIPED) return get_consumed_bytes(s, buf_size); | 506 if(ret==FRAME_SKIPPED) return get_consumed_bytes(s, buf_size); |
507 | 507 |
508 /* skip if the header was thrashed */ | 508 /* skip if the header was thrashed */ |
509 if (ret < 0){ | 509 if (ret < 0){ |
510 av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); | 510 av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); |
511 return -1; | 511 return -1; |