mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
lavc: remove disabled FF_API_ER cruft.
This commit is contained in:
parent
f326501a65
commit
491f443e1f
@ -1545,21 +1545,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
float b_quant_offset;
|
||||
|
||||
#if FF_API_ER
|
||||
/**
|
||||
* Error recognition; higher values will detect more errors but may
|
||||
* misdetect some more or less valid parts as errors.
|
||||
* - encoding: unused
|
||||
* - decoding: Set by user.
|
||||
*/
|
||||
attribute_deprecated int error_recognition;
|
||||
#define FF_ER_CAREFUL 1
|
||||
#define FF_ER_COMPLIANT 2
|
||||
#define FF_ER_AGGRESSIVE 3
|
||||
#define FF_ER_VERY_AGGRESSIVE 4
|
||||
#define FF_ER_EXPLODE 5
|
||||
#endif /* FF_API_ER */
|
||||
|
||||
/**
|
||||
* Called at the beginning of each frame to get a buffer for it.
|
||||
*
|
||||
|
@ -177,14 +177,6 @@ static const AVOption options[]={
|
||||
{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, V|D|E, "strict"},
|
||||
{"experimental", "allow non standardized experimental things", 0, AV_OPT_TYPE_CONST, {.dbl = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, V|D|E, "strict"},
|
||||
{"b_qoffset", "qp offset between P and B frames", OFFSET(b_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
|
||||
#if FF_API_ER
|
||||
{"er", "set error detection aggressivity", OFFSET(error_recognition), AV_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "er"},
|
||||
{"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, V|D, "er"},
|
||||
{"compliant", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_COMPLIANT }, INT_MIN, INT_MAX, V|D, "er"},
|
||||
{"aggressive", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"},
|
||||
{"very_aggressive", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_VERY_AGGRESSIVE }, INT_MIN, INT_MAX, V|D, "er"},
|
||||
{"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, V|D, "er"},
|
||||
#endif /* FF_API_ER */
|
||||
{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
|
||||
{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, V|D, "err_detect"},
|
||||
{"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, V|D, "err_detect"},
|
||||
|
@ -716,16 +716,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
||||
goto free_and_end;
|
||||
}
|
||||
avctx->frame_number = 0;
|
||||
#if FF_API_ER
|
||||
|
||||
av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition separate: %d; %d\n",
|
||||
avctx->error_recognition, avctx->err_recognition);
|
||||
/* FF_ER_CAREFUL (==1) implies AV_EF_CRCCHECK (== 1<<1 - 1),
|
||||
FF_ER_COMPLIANT (==2) implies AV_EF_{CRCCHECK,BITSTREAM} (== 1<<2 - 1), et cetera} */
|
||||
avctx->err_recognition |= (1<<(avctx->error_recognition-(avctx->error_recognition>=FF_ER_VERY_AGGRESSIVE))) - 1;
|
||||
av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition combined: %d; %d\n",
|
||||
avctx->error_recognition, avctx->err_recognition);
|
||||
#endif
|
||||
|
||||
if (HAVE_THREADS && !avctx->thread_opaque) {
|
||||
ret = ff_thread_init(avctx);
|
||||
|
@ -41,9 +41,6 @@
|
||||
#ifndef FF_API_REQUEST_CHANNELS
|
||||
#define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55)
|
||||
#endif
|
||||
#ifndef FF_API_ER
|
||||
#define FF_API_ER (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
#ifndef FF_API_AVCODEC_INIT
|
||||
#define FF_API_AVCODEC_INIT (LIBAVCODEC_VERSION_MAJOR < 54)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user