[FFmpeg-devel] [PATCH 10/87] avcodec: Remove private options from AVCodecContext
James Almer
jamrial at gmail.com
Mon Apr 19 17:09:07 EEST 2021
From: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Several options that were too codec-specific were deprecated between
0e6c8532215790bbe560a9eea4f3cc82bb55cf92 and
0e9c4fe254073b209970df3e3cb84531bc388e99.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
doc/codecs.texi | 100 ---------------------------------
libavcodec/alacenc.c | 26 ---------
libavcodec/avcodec.h | 112 -------------------------------------
libavcodec/ffv1enc.c | 10 ----
libavcodec/flacenc.c | 36 ------------
libavcodec/huffyuvenc.c | 26 ---------
libavcodec/j2kenc.c | 7 ---
libavcodec/jpeglsenc.c | 7 ---
libavcodec/libvpxenc.c | 12 ----
libavcodec/libx264.c | 33 -----------
libavcodec/libxavs.c | 28 ----------
libavcodec/libxvid.c | 7 ---
libavcodec/ljpegenc.c | 14 -----
libavcodec/mpeg12dec.c | 7 ---
libavcodec/mpeg12enc.c | 7 ---
libavcodec/mpegvideo_enc.c | 71 -----------------------
libavcodec/options_table.h | 48 ----------------
libavcodec/pngenc.c | 9 ---
libavcodec/qsvenc.c | 6 --
libavcodec/qsvenc_h264.c | 3 -
libavcodec/qsvenc_hevc.c | 3 -
libavcodec/qsvenc_mpeg2.c | 3 -
libavcodec/snowenc.c | 14 -----
libavcodec/utvideoenc.c | 28 ----------
libavcodec/version.h | 3 -
25 files changed, 620 deletions(-)
diff --git a/doc/codecs.texi b/doc/codecs.texi
index 702caa2a1d..5e10020900 100644
--- a/doc/codecs.texi
+++ b/doc/codecs.texi
@@ -144,12 +144,6 @@ Default value is 0.
@item b_qfactor @var{float} (@emph{encoding,video})
Set qp factor between P and B frames.
- at item b_strategy @var{integer} (@emph{encoding,video})
-Set strategy to choose between I/P/B-frames.
-
- at item ps @var{integer} (@emph{encoding,video})
-Set RTP payload size in bytes.
-
@item codec_tag @var{integer}
@item bug @var{flags} (@emph{decoding,video})
Workaround not auto detected encoder bugs.
@@ -239,9 +233,6 @@ consider things that a sane encoder should not do as an error
@item block_align @var{integer}
- at item mpeg_quant @var{integer} (@emph{encoding,video})
-Use MPEG quantizers instead of H.263.
-
@item rc_override_count @var{integer}
@item maxrate @var{integer} (@emph{encoding,audio,video})
@@ -347,19 +338,6 @@ favor predicting from the previous frame instead of the current
@item bits_per_coded_sample @var{integer}
- at item pred @var{integer} (@emph{encoding,video})
-Set prediction method.
-
-Possible values:
- at table @samp
- at item left
-
- at item plane
-
- at item median
-
- at end table
-
@item aspect @var{rational number} (@emph{encoding,video})
Set sample aspect ratio.
@@ -576,9 +554,6 @@ sab diamond motion estimation
@item last_pred @var{integer} (@emph{encoding,video})
Set amount of motion predictors from the previous frame.
- at item preme @var{integer} (@emph{encoding,video})
-Set pre motion estimation.
-
@item precmp @var{integer} (@emph{encoding,video})
Set pre motion estimation compare function.
@@ -627,9 +602,6 @@ Set limit motion vectors range (1023 for DivX player).
@item global_quality @var{integer} (@emph{encoding,audio,video})
- at item context @var{integer} (@emph{encoding,video})
-Set context model.
-
@item slice_flags @var{integer}
@item mbd @var{integer} (@emph{encoding,video})
@@ -645,12 +617,6 @@ use fewest bits
use best rate distortion
@end table
- at item sc_threshold @var{integer} (@emph{encoding,video})
-Set scene change threshold.
-
- at item nr @var{integer} (@emph{encoding,video})
-Set noise reduction.
-
@item rc_init_occupancy @var{integer} (@emph{encoding,video})
Set number of bits which should be loaded into the rc buffer before
decoding starts.
@@ -738,64 +704,12 @@ Possible values:
@item lowres @var{integer} (@emph{decoding,audio,video})
Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
- at item skip_threshold @var{integer} (@emph{encoding,video})
-Set frame skip threshold.
-
- at item skip_factor @var{integer} (@emph{encoding,video})
-Set frame skip factor.
-
- at item skip_exp @var{integer} (@emph{encoding,video})
-Set frame skip exponent.
-Negative values behave identical to the corresponding positive ones, except
-that the score is normalized.
-Positive values exist primarily for compatibility reasons and are not so useful.
-
- at item skipcmp @var{integer} (@emph{encoding,video})
-Set frame skip compare function.
-
-Possible values:
- at table @samp
- at item sad
-sum of absolute differences, fast (default)
- at item sse
-sum of squared errors
- at item satd
-sum of absolute Hadamard transformed differences
- at item dct
-sum of absolute DCT transformed differences
- at item psnr
-sum of squared quantization errors (avoid, low quality)
- at item bit
-number of bits needed for the block
- at item rd
-rate distortion optimal, slow
- at item zero
-0
- at item vsad
-sum of absolute vertical differences
- at item vsse
-sum of squared vertical differences
- at item nsse
-noise preserving sum of squared differences
- at item w53
-5/3 wavelet, only used in snow
- at item w97
-9/7 wavelet, only used in snow
- at item dctmax
-
- at item chroma
-
- at end table
-
@item mblmin @var{integer} (@emph{encoding,video})
Set min macroblock lagrange factor (VBR).
@item mblmax @var{integer} (@emph{encoding,video})
Set max macroblock lagrange factor (VBR).
- at item mepc @var{integer} (@emph{encoding,video})
-Set motion estimation bitrate penalty compensation (1.0 = 256).
-
@item skip_loop_filter @var{integer} (@emph{decoding,video})
@item skip_idct @var{integer} (@emph{decoding,video})
@item skip_frame @var{integer} (@emph{decoding,video})
@@ -835,31 +749,17 @@ Default value is @samp{default}.
@item bidir_refine @var{integer} (@emph{encoding,video})
Refine the two motion vectors used in bidirectional macroblocks.
- at item brd_scale @var{integer} (@emph{encoding,video})
-Downscale frames for dynamic B-frame decision.
-
@item keyint_min @var{integer} (@emph{encoding,video})
Set minimum interval between IDR-frames.
@item refs @var{integer} (@emph{encoding,video})
Set reference frames to consider for motion compensation.
- at item chromaoffset @var{integer} (@emph{encoding,video})
-Set chroma qp offset from luma.
-
@item trellis @var{integer} (@emph{encoding,audio,video})
Set rate-distortion optimal quantization.
@item mv0_threshold @var{integer} (@emph{encoding,video})
- at item b_sensitivity @var{integer} (@emph{encoding,video})
-Adjust sensitivity of b_frame_strategy 1.
-
@item compression_level @var{integer} (@emph{encoding,audio,video})
- at item min_prediction_order @var{integer} (@emph{encoding,audio})
- at item max_prediction_order @var{integer} (@emph{encoding,audio})
- at item timecode_frame_start @var{integer} (@emph{encoding,video})
-Set GOP timecode frame start number, in non drop frame format.
-
@item bits_per_raw_sample @var{integer}
@item channel_layout @var{integer} (@emph{decoding/encoding,audio})
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index ecdd46cac3..7c7a35c002 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -557,32 +557,6 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
AV_WB8(alac_extradata+20, s->rc.k_modifier);
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->min_prediction_order >= 0) {
- if (avctx->min_prediction_order < MIN_LPC_ORDER ||
- avctx->min_prediction_order > ALAC_MAX_LPC_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n",
- avctx->min_prediction_order);
- return AVERROR(EINVAL);
- }
-
- s->min_prediction_order = avctx->min_prediction_order;
- }
-
- if (avctx->max_prediction_order >= 0) {
- if (avctx->max_prediction_order < MIN_LPC_ORDER ||
- avctx->max_prediction_order > ALAC_MAX_LPC_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n",
- avctx->max_prediction_order);
- return AVERROR(EINVAL);
- }
-
- s->max_prediction_order = avctx->max_prediction_order;
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->max_prediction_order < s->min_prediction_order) {
av_log(avctx, AV_LOG_ERROR,
"invalid prediction orders: min=%d max=%d\n",
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b468ee7c6f..696025ceda 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -804,12 +804,6 @@ typedef struct AVCodecContext {
*/
float b_quant_factor;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int b_frame_strategy;
-#endif
-
/**
* qscale offset between IP and B-frames
* - encoding: Set by user.
@@ -825,12 +819,6 @@ typedef struct AVCodecContext {
*/
int has_b_frames;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int mpeg_quant;
-#endif
-
/**
* qscale factor between P- and I-frames
* If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
@@ -889,15 +877,6 @@ typedef struct AVCodecContext {
*/
int slice_count;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int prediction_method;
-#define FF_PRED_LEFT 0
-#define FF_PRED_PLANE 1
-#define FF_PRED_MEDIAN 2
-#endif
-
/**
* slice offsets in the frame in bytes
* - encoding: Set/allocated by libavcodec.
@@ -970,12 +949,6 @@ typedef struct AVCodecContext {
*/
int last_predictor_count;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int pre_me;
-#endif
-
/**
* motion estimation prepass comparison function
* - encoding: Set by user.
@@ -1044,16 +1017,6 @@ typedef struct AVCodecContext {
*/
uint16_t *inter_matrix;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int scenechange_threshold;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int noise_reduction;
-#endif
-
/**
* precision of the intra DC coefficient - 8
* - encoding: Set by user.
@@ -1089,26 +1052,12 @@ typedef struct AVCodecContext {
*/
int mb_lmax;
-#if FF_API_PRIVATE_OPT
- /**
- * @deprecated use encoder private options instead
- */
- attribute_deprecated
- int me_penalty_compensation;
-#endif
-
/**
* - encoding: Set by user.
* - decoding: unused
*/
int bidir_refine;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int brd_scale;
-#endif
-
/**
* minimum GOP size
* - encoding: Set by user.
@@ -1123,12 +1072,6 @@ typedef struct AVCodecContext {
*/
int refs;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int chromaoffset;
-#endif
-
/**
* Note: Value depends upon the compare function used for fullpel ME.
* - encoding: Set by user.
@@ -1136,12 +1079,6 @@ typedef struct AVCodecContext {
*/
int mv0_threshold;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int b_sensitivity;
-#endif
-
/**
* Chromaticity coordinates of the source primaries.
* - encoding: Set by user
@@ -1443,30 +1380,6 @@ typedef struct AVCodecContext {
*/
int rc_initial_buffer_occupancy;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int context_model;
-#endif
-
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int frame_skip_threshold;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int frame_skip_factor;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int frame_skip_exp;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int frame_skip_cmp;
-#endif /* FF_API_PRIVATE_OPT */
-
/**
* trellis RD quantization
* - encoding: Set by user.
@@ -1474,20 +1387,6 @@ typedef struct AVCodecContext {
*/
int trellis;
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int min_prediction_order;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int max_prediction_order;
-
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int64_t timecode_frame_start;
-#endif
-
#if FF_API_RTP_CALLBACK
/**
* @deprecated unused
@@ -1502,17 +1401,6 @@ typedef struct AVCodecContext {
void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
#endif
-#if FF_API_PRIVATE_OPT
- /** @deprecated use encoder private options instead */
- attribute_deprecated
- int rtp_payload_size; /* The size of the RTP payload: the coder will */
- /* do its best to deliver a chunk with size */
- /* below rtp_payload_size, the chunk will start */
- /* with a start code on some codecs like H.263. */
- /* This doesn't take account of any particular */
- /* headers inside the transmitted RTP payload. */
-#endif
-
/**
* pass1 encoding statistics output buffer
* - encoding: Set by libavcodec.
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index de28ac44f1..b610d5d65e 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -696,16 +696,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->ac = AC_RANGE_CUSTOM_TAB;
}
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->context_model)
- s->context_model = avctx->context_model;
- if (avctx->context_model > 1U) {
- av_log(avctx, AV_LOG_ERROR, "Invalid context model %d, valid values are 0 and 1\n", avctx->context_model);
- return AVERROR(EINVAL);
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (s->ac == AC_RANGE_CUSTOM_TAB) {
for (i = 1; i < 256; i++)
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 38571ec9c9..9460b1afc8 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -339,42 +339,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
if (s->options.max_partition_order < 0)
s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level];
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->min_prediction_order >= 0) {
- if (s->options.lpc_type == FF_LPC_TYPE_FIXED) {
- if (avctx->min_prediction_order > MAX_FIXED_ORDER) {
- av_log(avctx, AV_LOG_WARNING,
- "invalid min prediction order %d, clamped to %d\n",
- avctx->min_prediction_order, MAX_FIXED_ORDER);
- avctx->min_prediction_order = MAX_FIXED_ORDER;
- }
- } else if (avctx->min_prediction_order < MIN_LPC_ORDER ||
- avctx->min_prediction_order > MAX_LPC_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid min prediction order: %d\n",
- avctx->min_prediction_order);
- return AVERROR(EINVAL);
- }
- s->options.min_prediction_order = avctx->min_prediction_order;
- }
- if (avctx->max_prediction_order >= 0) {
- if (s->options.lpc_type == FF_LPC_TYPE_FIXED) {
- if (avctx->max_prediction_order > MAX_FIXED_ORDER) {
- av_log(avctx, AV_LOG_WARNING,
- "invalid max prediction order %d, clamped to %d\n",
- avctx->max_prediction_order, MAX_FIXED_ORDER);
- avctx->max_prediction_order = MAX_FIXED_ORDER;
- }
- } else if (avctx->max_prediction_order < MIN_LPC_ORDER ||
- avctx->max_prediction_order > MAX_LPC_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid max prediction order: %d\n",
- avctx->max_prediction_order);
- return AVERROR(EINVAL);
- }
- s->options.max_prediction_order = avctx->max_prediction_order;
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (s->options.lpc_type == FF_LPC_TYPE_NONE) {
s->options.min_prediction_order = 0;
s->options.max_prediction_order = 0;
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 2882433db5..218e57600d 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -227,12 +227,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
avctx->coded_frame->key_frame = 1;
FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->context_model == 1)
- s->context = avctx->context_model;
-FF_ENABLE_DEPRECATION_WARNINGS
#endif
s->bps = desc->comp[0].depth;
@@ -309,12 +303,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->bits_per_coded_sample = s->bitstream_bpp;
s->decorrelate = s->bitstream_bpp >= 24 && !s->yuv && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->predictor = avctx->prediction_method;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->interlaced = avctx->flags & AV_CODEC_FLAG_INTERLACED_ME ? 1 : 0;
if (s->context) {
if (s->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) {
@@ -332,20 +320,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
"vcodec=ffvhuff or format=422p\n");
return AVERROR(EINVAL);
}
-#if FF_API_PRIVATE_OPT
- if (s->context) {
- av_log(avctx, AV_LOG_ERROR,
- "Error: per-frame huffman tables are not supported "
- "by huffyuv; use vcodec=ffvhuff\n");
- return AVERROR(EINVAL);
- }
- if (s->version > 2) {
- av_log(avctx, AV_LOG_ERROR,
- "Error: ver>2 is not supported "
- "by huffyuv; use vcodec=ffvhuff\n");
- return AVERROR(EINVAL);
- }
-#endif
if (s->interlaced != ( s->height > 288 ))
av_log(avctx, AV_LOG_INFO,
"using huffyuv 2.2.0 or newer interlacing flag\n");
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index e3c5a32188..40ba965cdb 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -1727,13 +1727,6 @@ static av_cold int j2kenc_init(AVCodecContext *avctx)
s->compression_rate_enc = 0;
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->pred = avctx->prediction_method;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && (s->pred != FF_DWT97_INT || s->format != CODEC_JP2)) {
av_log(s->avctx, AV_LOG_WARNING, "Forcing lossless jp2 for pal8\n");
s->pred = FF_DWT97_INT;
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index d03ce32f41..0f109c1304 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -282,13 +282,6 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
int i, size, ret;
int comps;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- ctx->pred = avctx->prediction_method;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8 ||
avctx->pix_fmt == AV_PIX_FMT_GRAY16)
comps = 1;
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 3f36943c12..76013a74d3 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -921,12 +921,6 @@ static av_cold int vpx_init(AVCodecContext *avctx,
}
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->frame_skip_threshold)
- ctx->drop_threshold = avctx->frame_skip_threshold;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
enccfg.rc_dropframe_thresh = ctx->drop_threshold;
//0-100 (0 => CBR, 100 => VBR)
@@ -1066,12 +1060,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
codecctl_int(avctx, VP8E_SET_SHARPNESS, ctx->sharpness);
if (CONFIG_LIBVPX_VP8_ENCODER && avctx->codec_id == AV_CODEC_ID_VP8) {
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->noise_reduction)
- ctx->noise_sensitivity = avctx->noise_reduction;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, ctx->noise_sensitivity);
codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices));
}
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 6d945fc3fb..4e7097e569 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -680,12 +680,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
if (avctx->b_quant_factor > 0)
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->chromaoffset)
- x4->chroma_offset = avctx->chromaoffset;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (x4->chroma_offset)
x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset;
@@ -694,12 +688,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (avctx->max_b_frames >= 0)
x4->params.i_bframe = avctx->max_b_frames;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->scenechange_threshold >= 0)
- x4->scenechange_threshold = avctx->scenechange_threshold;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (x4->scenechange_threshold >= 0)
x4->params.i_scenecut_threshold = x4->scenechange_threshold;
@@ -729,22 +717,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.analyse.i_trellis = avctx->trellis;
if (avctx->me_range >= 0)
x4->params.analyse.i_me_range = avctx->me_range;
-#if FF_API_PRIVATE_OPT
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->noise_reduction >= 0)
- x4->noise_reduction = avctx->noise_reduction;
- FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (x4->noise_reduction >= 0)
x4->params.analyse.i_noise_reduction = x4->noise_reduction;
if (avctx->me_subpel_quality >= 0)
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->b_frame_strategy >= 0)
- x4->b_frame_strategy = avctx->b_frame_strategy;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (avctx->keyint_min >= 0)
x4->params.i_keyint_min = avctx->keyint_min;
if (avctx->me_cmp >= 0)
@@ -1155,18 +1131,9 @@ static const AVCodecDefault x264_defaults[] = {
{ "qcomp", "-1" },
// { "rc_lookahead", "-1" },
{ "refs", "-1" },
-#if FF_API_PRIVATE_OPT
- { "sc_threshold", "-1" },
-#endif
{ "trellis", "-1" },
-#if FF_API_PRIVATE_OPT
- { "nr", "-1" },
-#endif
{ "me_range", "-1" },
{ "subq", "-1" },
-#if FF_API_PRIVATE_OPT
- { "b_strategy", "-1" },
-#endif
{ "keyint_min", "-1" },
{ "cmp", "-1" },
{ "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index a83b93b836..0f22016731 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -288,13 +288,6 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
/* cabac is not included in AVS JiZhun Profile */
x4->params.b_cabac = 0;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->b_frame_strategy)
- x4->b_frame_strategy = avctx->b_frame_strategy;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
x4->params.i_bframe_adaptive = x4->b_frame_strategy;
avctx->has_b_frames = !!avctx->max_b_frames;
@@ -305,13 +298,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (x4->params.i_keyint_min > x4->params.i_keyint_max)
x4->params.i_keyint_min = x4->params.i_keyint_max;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->scenechange_threshold)
- x4->scenechange_threshold = avctx->scenechange_threshold;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
x4->params.i_scenecut_threshold = x4->scenechange_threshold;
// x4->params.b_deblocking_filter = avctx->flags & AV_CODEC_FLAG_LOOP_FILTER;
@@ -343,13 +329,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.analyse.i_trellis = avctx->trellis;
-#if FF_API_PRIVATE_OPT
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->noise_reduction >= 0)
- x4->noise_reduction = avctx->noise_reduction;
- FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
x4->params.analyse.i_noise_reduction = x4->noise_reduction;
if (avctx->level > 0)
@@ -371,13 +350,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->chromaoffset)
- x4->chroma_offset = avctx->chromaoffset;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
x4->params.analyse.i_chroma_qp_offset = x4->chroma_offset;
x4->params.analyse.b_psnr = avctx->flags & AV_CODEC_FLAG_PSNR;
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index cb9135436a..22582680a0 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -617,13 +617,6 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
x->intra_matrix =
x->inter_matrix = NULL;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->mpeg_quant)
- x->mpeg_quant = avctx->mpeg_quant;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (x->mpeg_quant)
x->vol_flags |= XVID_VOL_MPEGQUANT;
if ((avctx->intra_matrix || avctx->inter_matrix)) {
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 74a2cdcc46..9a107e85ce 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -72,13 +72,6 @@ static int ljpeg_encode_bgr(AVCodecContext *avctx, PutBitContext *pb,
int left[4], top[4], topleft[4];
int x, y, i;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->pred = avctx->prediction_method + 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
for (i = 0; i < 4; i++)
buffer[0][i] = 1 << (9 - 1);
@@ -203,13 +196,6 @@ static int ljpeg_encode_yuv(AVCodecContext *avctx, PutBitContext *pb,
const int mb_height = (avctx->height + s->vsample[0] - 1) / s->vsample[0];
int mb_x, mb_y;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->pred = avctx->prediction_method + 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
for (mb_y = 0; mb_y < mb_height; mb_y++) {
if (put_bytes_left(pb, 0) <
mb_width * 4 * 3 * s->hsample[0] * s->vsample[0]) {
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 2d2b7517ad..c4d89e10ce 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -49,7 +49,6 @@
#include "mpegvideodata.h"
#include "profiles.h"
#include "thread.h"
-#include "version.h"
#include "xvmc_internal.h"
#define A53_MAX_CC_COUNT 2000
@@ -2440,12 +2439,6 @@ static void mpeg_decode_gop(AVCodecContext *avctx,
tc = s-> timecode_frame_start = get_bits(&s->gb, 25);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->timecode_frame_start = tc;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->closed_gop = get_bits1(&s->gb);
/* broken_link indicates that after editing the
* reference frames of the first B-Frames after GOP I-Frame
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index dccb11b222..fd3e7de94a 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -220,13 +220,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->timecode_frame_start)
- s->timecode_frame_start = avctx->timecode_frame_start;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->tc_opt_str) {
AVRational rate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
int ret = av_timecode_init_from_string(&s->tc, rate, s->tc_opt_str, s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index e1864f2afb..f0490a39cc 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -325,17 +325,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
avctx->bits_per_raw_sample = av_clip(avctx->bits_per_raw_sample, 0, 8);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->rtp_payload_size)
- s->rtp_payload_size = avctx->rtp_payload_size;
- if (avctx->me_penalty_compensation)
- s->me_penalty_compensation = avctx->me_penalty_compensation;
- if (avctx->pre_me)
- s->me_pre = avctx->pre_me;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->bit_rate = avctx->bit_rate;
s->width = avctx->width;
s->height = avctx->height;
@@ -561,20 +550,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR(EINVAL);
}
-#if FF_API_PRIVATE_OPT
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->mpeg_quant)
- s->mpeg_quant = 1;
- FF_ENABLE_DEPRECATION_WARNINGS
-
- if (s->mpeg_quant && ( s->codec_id != AV_CODEC_ID_MPEG4
- && s->codec_id != AV_CODEC_ID_MPEG2VIDEO)) {
- av_log(avctx, AV_LOG_ERROR,
- "mpeg2 style quantization not supported by codec\n");
- return AVERROR(EINVAL);
- }
-#endif
-
if ((s->mpv_flags & FF_MPV_FLAG_CBP_RD) && !avctx->trellis) {
av_log(avctx, AV_LOG_ERROR, "CBP RD needs trellis quant\n");
return AVERROR(EINVAL);
@@ -595,13 +570,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR(EINVAL);
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->scenechange_threshold)
- s->scenechange_threshold = avctx->scenechange_threshold;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->scenechange_threshold < 1000000000 &&
(avctx->flags & AV_CODEC_FLAG_CLOSED_GOP)) {
av_log(avctx, AV_LOG_ERROR,
@@ -657,15 +625,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR_PATCHWELCOME;
}
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->b_frame_strategy)
- s->b_frame_strategy = avctx->b_frame_strategy;
- if (avctx->b_sensitivity != 40)
- s->b_sensitivity = avctx->b_sensitivity;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) {
av_log(avctx, AV_LOG_INFO,
"notice: b_frame_strategy only affects the first pass\n");
@@ -855,13 +814,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
return AVERROR(EINVAL);
}
-#if FF_API_PRIVATE_OPT
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->noise_reduction)
- s->noise_reduction = avctx->noise_reduction;
- FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
avctx->has_b_frames = !s->low_delay;
s->encoding = 1;
@@ -918,19 +870,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->quant_precision = 5;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->frame_skip_threshold)
- s->frame_skip_threshold = avctx->frame_skip_threshold;
- if (avctx->frame_skip_factor)
- s->frame_skip_factor = avctx->frame_skip_factor;
- if (avctx->frame_skip_exp)
- s->frame_skip_exp = avctx->frame_skip_exp;
- if (avctx->frame_skip_cmp != FF_CMP_DCTMAX)
- s->frame_skip_cmp = avctx->frame_skip_cmp;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp);
ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp);
@@ -983,16 +922,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if ((ret = ff_rate_control_init(s)) < 0)
return ret;
-#if FF_API_PRIVATE_OPT
- FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->brd_scale)
- s->brd_scale = avctx->brd_scale;
-
- if (avctx->prediction_method)
- s->pred = avctx->prediction_method + 1;
- FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->b_frame_strategy == 2) {
for (i = 0; i < s->max_b_frames + 2; i++) {
s->tmp_frames[i] = av_frame_alloc();
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 9b77428a50..313150eb73 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -101,10 +101,6 @@ static const AVOption avcodec_options[] = {
{"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E},
{"bf", "set maximum number of B-frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
{"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
-#if FF_API_PRIVATE_OPT
-{"b_strategy", "strategy to choose between I/P/B-frames", OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, V|E},
-{"ps", "RTP payload size in bytes", OFFSET(rtp_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"codec_tag", NULL, OFFSET(codec_tag), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
{"bug", "work around not autodetected encoder bugs", OFFSET(workaround_bugs), AV_OPT_TYPE_FLAGS, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"},
{"autodetect", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_BUG_AUTODETECT }, INT_MIN, INT_MAX, V|D, "bug"},
@@ -140,9 +136,6 @@ static const AVOption avcodec_options[] = {
{"aggressive", "consider things that a sane encoder should not do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
{"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
-#if FF_API_PRIVATE_OPT
-{"mpeg_quant", "use MPEG quantizers instead of H.263", OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"rc_override_count", NULL, OFFSET(rc_override_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
{"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E},
{"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.",
@@ -183,12 +176,6 @@ static const AVOption avcodec_options[] = {
{"deblock", "use strong deblock filter for damaged MBs", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_DEBLOCK }, INT_MIN, INT_MAX, V|D, "ec"},
{"favor_inter", "favor predicting from the previous frame", 0, AV_OPT_TYPE_CONST, {.i64 = FF_EC_FAVOR_INTER }, INT_MIN, INT_MAX, V|D, "ec"},
{"bits_per_coded_sample", NULL, OFFSET(bits_per_coded_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
-#if FF_API_PRIVATE_OPT
-{"pred", "prediction method", OFFSET(prediction_method), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "pred"},
-{"left", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_LEFT }, INT_MIN, INT_MAX, V|E, "pred"},
-{"plane", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"},
-{"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"},
-#endif
{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E},
{"sar", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E},
{"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"},
@@ -209,27 +196,15 @@ static const AVOption avcodec_options[] = {
{"nomc", "skip motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_NOMC }, INT_MIN, INT_MAX, V|A|D, "debug"},
{"dia_size", "diamond type & size for motion estimation", OFFSET(dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"last_pred", "amount of motion predictors from the previous frame", OFFSET(last_predictor_count), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#if FF_API_PRIVATE_OPT
-{"preme", "pre motion estimation", OFFSET(pre_me), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"pre_dia_size", "diamond type & size for motion estimation pre-pass", OFFSET(pre_dia_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E},
{"me_range", "limit motion vectors range (1023 for DivX player)", OFFSET(me_range), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
-#if FF_API_PRIVATE_OPT
-{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"slice_flags", NULL, OFFSET(slice_flags), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
{"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 2, V|E, "mbd"},
{"simple", "use mbcmp", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_SIMPLE }, INT_MIN, INT_MAX, V|E, "mbd"},
{"bits", "use fewest bits", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_BITS }, INT_MIN, INT_MAX, V|E, "mbd"},
{"rd", "use best rate distortion", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MB_DECISION_RD }, INT_MIN, INT_MAX, V|E, "mbd"},
-#if FF_API_PRIVATE_OPT
-{"sc_threshold", "scene change threshold", OFFSET(scenechange_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
-#if FF_API_PRIVATE_OPT
-{"nr", "noise reduction", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"rc_init_occupancy", "number of bits which should be loaded into the rc buffer before decoding starts", OFFSET(rc_initial_buffer_occupancy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
{"threads", "set the number of threads", OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|A|E|D, "threads"},
{"auto", "autodetect a suitable number of threads to use", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, V|E|D, "threads"},
@@ -243,12 +218,6 @@ static const AVOption avcodec_options[] = {
{"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.level"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.level"},
{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D},
-#if FF_API_PRIVATE_OPT
-{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"},
-#endif
{"cmp", "full-pel ME compare function", OFFSET(me_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"subcmp", "sub-pel ME compare function", OFFSET(me_sub_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"mbcmp", "macroblock compare function", OFFSET(mb_cmp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "cmp_func"},
@@ -274,9 +243,6 @@ static const AVOption avcodec_options[] = {
{"msad", "sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, V|E, "cmp_func"},
{"mblmin", "minimum macroblock Lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E},
{"mblmax", "maximum macroblock Lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E},
-#if FF_API_PRIVATE_OPT
-{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, V|E},
-#endif
{"skip_loop_filter", "skip loop filtering process for the selected frames", OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
{"skip_idct" , "skip IDCT/dequantization for the selected frames", OFFSET(skip_idct), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
{"skip_frame" , "skip decoding for the selected frames", OFFSET(skip_frame), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"},
@@ -288,25 +254,11 @@ static const AVOption avcodec_options[] = {
{"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"},
{"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"},
{"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E},
-#if FF_API_PRIVATE_OPT
-{"brd_scale", "downscale frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 10, V|E},
-#endif
{"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E},
{"refs", "reference frames to consider for motion compensation", OFFSET(refs), AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX, V|E},
-#if FF_API_PRIVATE_OPT
-{"chromaoffset", "chroma QP offset from luma", OFFSET(chromaoffset), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
-#endif
{"trellis", "rate-distortion optimal quantization", OFFSET(trellis), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
{"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.i64 = 256 }, 0, INT_MAX, V|E},
-#if FF_API_PRIVATE_OPT
-{"b_sensitivity", "adjust sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, V|E},
-#endif
{"compression_level", NULL, OFFSET(compression_level), AV_OPT_TYPE_INT, {.i64 = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E},
-#if FF_API_PRIVATE_OPT
-{"min_prediction_order", NULL, OFFSET(min_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
-{"max_prediction_order", NULL, OFFSET(max_prediction_order), AV_OPT_TYPE_INT, {.i64 = -1 }, INT_MIN, INT_MAX, A|E},
-{"timecode_frame_start", "GOP timecode frame start number, in non-drop-frame format", OFFSET(timecode_frame_start), AV_OPT_TYPE_INT64, {.i64 = -1 }, -1, INT64_MAX, V|E},
-#endif
{"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"},
{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"},
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index eebb164440..e2636b7daf 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1017,15 +1017,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
ff_llvidencdsp_init(&s->llvidencdsp);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->filter_type = av_clip(avctx->prediction_method,
- PNG_FILTER_VALUE_NONE,
- PNG_FILTER_VALUE_MIXED);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (avctx->pix_fmt == AV_PIX_FMT_MONOBLACK)
s->filter_type = PNG_FILTER_VALUE_NONE;
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index d30c289fce..6281e63a54 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -716,12 +716,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->extco2.LookAheadDS = q->look_ahead_downsampling;
q->extco2.RepeatPPS = q->repeat_pps ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->b_frame_strategy >= 0)
- q->b_strategy = avctx->b_frame_strategy;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (q->b_strategy >= 0)
q->extco2.BRefType = q->b_strategy ? MFX_B_REF_PYRAMID : MFX_B_REF_OFF;
if (q->adaptive_i >= 0)
diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c
index df70f30271..06b49c46ee 100644
--- a/libavcodec/qsvenc_h264.c
+++ b/libavcodec/qsvenc_h264.c
@@ -171,9 +171,6 @@ static const AVCodecDefault qsv_enc_defaults[] = {
{ "qmax", "-1" },
{ "trellis", "-1" },
{ "flags", "+cgop" },
-#if FF_API_PRIVATE_OPT
- { "b_strategy", "-1" },
-#endif
{ NULL },
};
diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index 347f30655e..fc10459628 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -267,9 +267,6 @@ static const AVCodecDefault qsv_enc_defaults[] = {
{ "qmax", "-1" },
{ "trellis", "-1" },
{ "flags", "+cgop" },
-#if FF_API_PRIVATE_OPT
- { "b_strategy", "-1" },
-#endif
{ NULL },
};
diff --git a/libavcodec/qsvenc_mpeg2.c b/libavcodec/qsvenc_mpeg2.c
index 0e34bb75dc..538b937f74 100644
--- a/libavcodec/qsvenc_mpeg2.c
+++ b/libavcodec/qsvenc_mpeg2.c
@@ -89,9 +89,6 @@ static const AVCodecDefault qsv_enc_defaults[] = {
{ "bf", "3" },
{ "trellis", "-1" },
{ "flags", "+cgop" },
-#if FF_API_PRIVATE_OPT
- { "b_strategy", "-1" },
-#endif
{ NULL },
};
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 1c1080ac76..fc0e5230a9 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -41,13 +41,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
int plane_index, ret;
int i;
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if (avctx->prediction_method)
- s->pred = avctx->prediction_method;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if(s->pred == DWT_97
&& (avctx->flags & AV_CODEC_FLAG_QSCALE)
&& avctx->global_quality == 0){
@@ -1759,13 +1752,6 @@ redo_frame:
}
predict_plane(s, s->spatial_idwt_buffer, plane_index, 0);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- if(s->avctx->scenechange_threshold)
- s->scenechange_threshold = s->avctx->scenechange_threshold;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if( plane_index==0
&& pic->pict_type == AV_PICTURE_TYPE_P
&& !(avctx->flags&AV_CODEC_FLAG_PASS2)
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index 32c204a898..8c8a9535a1 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -43,12 +43,6 @@ typedef struct HuffEntry {
uint32_t code;
} HuffEntry;
-#if FF_API_PRIVATE_OPT
-static const int ut_pred_order[5] = {
- PRED_LEFT, PRED_MEDIAN, PRED_MEDIAN, PRED_NONE, PRED_GRADIENT
-};
-#endif
-
/* Compare huffman tree nodes */
static int ut_huff_cmp_len(const void *a, const void *b)
{
@@ -140,28 +134,6 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
ff_bswapdsp_init(&c->bdsp);
ff_llvidencdsp_init(&c->llvidencdsp);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- /* Check the prediction method, and error out if unsupported */
- if (avctx->prediction_method < 0 || avctx->prediction_method > 4) {
- av_log(avctx, AV_LOG_WARNING,
- "Prediction method %d is not supported in Ut Video.\n",
- avctx->prediction_method);
- return AVERROR_OPTION_NOT_FOUND;
- }
-
- if (avctx->prediction_method == FF_PRED_PLANE) {
- av_log(avctx, AV_LOG_ERROR,
- "Plane prediction is not supported in Ut Video.\n");
- return AVERROR_OPTION_NOT_FOUND;
- }
-
- /* Convert from libavcodec prediction type to Ut Video's */
- if (avctx->prediction_method)
- c->frame_pred = ut_pred_order[avctx->prediction_method];
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (c->frame_pred == PRED_GRADIENT) {
av_log(avctx, AV_LOG_ERROR, "Gradient prediction is not supported.\n");
return AVERROR_OPTION_NOT_FOUND;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 5e122847ac..2cca9839e2 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -66,9 +66,6 @@
#ifndef FF_API_VBV_DELAY
#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
-#ifndef FF_API_PRIVATE_OPT
-#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
#ifndef FF_API_ASS_TIMING
#define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
--
2.31.1
More information about the ffmpeg-devel
mailing list