Mercurial > libavcodec.hg
comparison mpeg12.c @ 7831:8195c970d077 libavcodec
Rename error_resilience to error_recognition.
author | michael |
---|---|
date | Mon, 08 Sep 2008 18:18:49 +0000 |
parents | 681a05d9b04f |
children | 21df17686936 |
comparison
equal
deleted
inserted
replaced
7830:3da762190370 | 7831:8195c970d077 |
---|---|
1342 | 1342 |
1343 vbv_delay= get_bits(&s->gb, 16); | 1343 vbv_delay= get_bits(&s->gb, 16); |
1344 if (s->pict_type == FF_P_TYPE || s->pict_type == FF_B_TYPE) { | 1344 if (s->pict_type == FF_P_TYPE || s->pict_type == FF_B_TYPE) { |
1345 s->full_pel[0] = get_bits1(&s->gb); | 1345 s->full_pel[0] = get_bits1(&s->gb); |
1346 f_code = get_bits(&s->gb, 3); | 1346 f_code = get_bits(&s->gb, 3); |
1347 if (f_code == 0 && avctx->error_resilience >= FF_ER_COMPLIANT) | 1347 if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) |
1348 return -1; | 1348 return -1; |
1349 s->mpeg_f_code[0][0] = f_code; | 1349 s->mpeg_f_code[0][0] = f_code; |
1350 s->mpeg_f_code[0][1] = f_code; | 1350 s->mpeg_f_code[0][1] = f_code; |
1351 } | 1351 } |
1352 if (s->pict_type == FF_B_TYPE) { | 1352 if (s->pict_type == FF_B_TYPE) { |
1353 s->full_pel[1] = get_bits1(&s->gb); | 1353 s->full_pel[1] = get_bits1(&s->gb); |
1354 f_code = get_bits(&s->gb, 3); | 1354 f_code = get_bits(&s->gb, 3); |
1355 if (f_code == 0 && avctx->error_resilience >= FF_ER_COMPLIANT) | 1355 if (f_code == 0 && avctx->error_recognition >= FF_ER_COMPLIANT) |
1356 return -1; | 1356 return -1; |
1357 s->mpeg_f_code[1][0] = f_code; | 1357 s->mpeg_f_code[1][0] = f_code; |
1358 s->mpeg_f_code[1][1] = f_code; | 1358 s->mpeg_f_code[1][1] = f_code; |
1359 } | 1359 } |
1360 s->current_picture.pict_type= s->pict_type; | 1360 s->current_picture.pict_type= s->pict_type; |
1774 int is_d10= s->chroma_format==2 && s->pict_type==FF_I_TYPE && avctx->profile==0 && avctx->level==5 | 1774 int is_d10= s->chroma_format==2 && s->pict_type==FF_I_TYPE && avctx->profile==0 && avctx->level==5 |
1775 && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0 | 1775 && s->intra_dc_precision == 2 && s->q_scale_type == 1 && s->alternate_scan == 0 |
1776 && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; | 1776 && s->progressive_frame == 0 /* vbv_delay == 0xBBB || 0xE10*/; |
1777 | 1777 |
1778 if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) | 1778 if(left < 0 || (left && show_bits(&s->gb, FFMIN(left, 23)) && !is_d10) |
1779 || (avctx->error_resilience >= FF_ER_AGGRESSIVE && left>8)){ | 1779 || (avctx->error_recognition >= FF_ER_AGGRESSIVE && left>8)){ |
1780 av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23))); | 1780 av_log(avctx, AV_LOG_ERROR, "end mismatch left=%d %0X\n", left, show_bits(&s->gb, FFMIN(left, 23))); |
1781 return -1; | 1781 return -1; |
1782 }else | 1782 }else |
1783 goto eos; | 1783 goto eos; |
1784 } | 1784 } |
1945 if (width <= 0 || height <= 0) | 1945 if (width <= 0 || height <= 0) |
1946 return -1; | 1946 return -1; |
1947 s->aspect_ratio_info= get_bits(&s->gb, 4); | 1947 s->aspect_ratio_info= get_bits(&s->gb, 4); |
1948 if (s->aspect_ratio_info == 0) { | 1948 if (s->aspect_ratio_info == 0) { |
1949 av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); | 1949 av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n"); |
1950 if (avctx->error_resilience >= FF_ER_COMPLIANT) | 1950 if (avctx->error_recognition >= FF_ER_COMPLIANT) |
1951 return -1; | 1951 return -1; |
1952 } | 1952 } |
1953 s->frame_rate_index = get_bits(&s->gb, 4); | 1953 s->frame_rate_index = get_bits(&s->gb, 4); |
1954 if (s->frame_rate_index == 0 || s->frame_rate_index > 13) | 1954 if (s->frame_rate_index == 0 || s->frame_rate_index > 13) |
1955 return -1; | 1955 return -1; |