mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Merge commit '94eed68ace9f2416af8457fcbf142b175928c06b'
* commit '94eed68ace9f2416af8457fcbf142b175928c06b': lavc: Drop deprecated options moved to private contexts Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
bfab430856
@ -774,26 +774,6 @@ typedef struct AVCodecDescriptor {
|
||||
*/
|
||||
#define AV_INPUT_BUFFER_MIN_SIZE 16384
|
||||
|
||||
/**
|
||||
* @ingroup lavc_encoding
|
||||
* motion estimation type.
|
||||
* @deprecated use codec private option instead
|
||||
*/
|
||||
#if FF_API_MOTION_EST
|
||||
enum Motion_Est_ID {
|
||||
ME_ZERO = 1, ///< no search, that is use 0,0 vector whenever one is needed
|
||||
ME_FULL,
|
||||
ME_LOG,
|
||||
ME_PHODS,
|
||||
ME_EPZS, ///< enhanced predictive zonal search
|
||||
ME_X1, ///< reserved for experiments
|
||||
ME_HEX, ///< hexagon based search
|
||||
ME_UMH, ///< uneven multi-hexagon search
|
||||
ME_TESA, ///< transformed exhaustive search algorithm
|
||||
ME_ITER=50, ///< iterative search
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup lavc_decoding
|
||||
*/
|
||||
@ -1716,14 +1696,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
enum AVPixelFormat pix_fmt;
|
||||
|
||||
#if FF_API_MOTION_EST
|
||||
/**
|
||||
* This option does nothing
|
||||
* @deprecated use codec private options instead
|
||||
*/
|
||||
attribute_deprecated int me_method;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If non NULL, 'draw_horiz_band' is called by the libavcodec
|
||||
* decoder to draw a horizontal band. It improves cache usage. Not
|
||||
@ -1783,12 +1755,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
float b_quant_factor;
|
||||
|
||||
#if FF_API_RC_STRATEGY
|
||||
/** @deprecated use codec private option instead */
|
||||
attribute_deprecated int rc_strategy;
|
||||
#define FF_RC_STRATEGY_XVID 1
|
||||
#endif
|
||||
|
||||
#if FF_API_PRIVATE_OPT
|
||||
/** @deprecated use encoder private options instead */
|
||||
attribute_deprecated
|
||||
@ -1991,19 +1957,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int me_range;
|
||||
|
||||
#if FF_API_QUANT_BIAS
|
||||
/**
|
||||
* @deprecated use encoder private option instead
|
||||
*/
|
||||
attribute_deprecated int intra_quant_bias;
|
||||
#define FF_DEFAULT_QUANT_BIAS 999999
|
||||
|
||||
/**
|
||||
* @deprecated use encoder private option instead
|
||||
*/
|
||||
attribute_deprecated int inter_quant_bias;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* slice flags
|
||||
* - encoding: unused
|
||||
@ -2048,20 +2001,6 @@ typedef struct AVCodecContext {
|
||||
int noise_reduction;
|
||||
#endif
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated this field is unused
|
||||
*/
|
||||
attribute_deprecated
|
||||
int me_threshold;
|
||||
|
||||
/**
|
||||
* @deprecated this field is unused
|
||||
*/
|
||||
attribute_deprecated
|
||||
int mb_threshold;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* precision of the intra DC coefficient - 8
|
||||
* - encoding: Set by user.
|
||||
@ -2083,14 +2022,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int skip_bottom;
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
float border_masking;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* minimum MB Lagrange multiplier
|
||||
* - encoding: Set by user.
|
||||
@ -2407,19 +2338,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int max_qdiff;
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
float rc_qsquish;
|
||||
|
||||
attribute_deprecated
|
||||
float rc_qmod_amp;
|
||||
attribute_deprecated
|
||||
int rc_qmod_freq;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* decoder bitstream buffer size
|
||||
* - encoding: Set by user.
|
||||
@ -2435,14 +2353,6 @@ typedef struct AVCodecContext {
|
||||
int rc_override_count;
|
||||
RcOverride *rc_override;
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
const char *rc_eq;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* maximum bitrate
|
||||
* - encoding: Set by user.
|
||||
@ -2457,17 +2367,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int64_t rc_min_rate;
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
float rc_buffer_aggressivity;
|
||||
|
||||
attribute_deprecated
|
||||
float rc_initial_cplx;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
|
||||
* - encoding: Set by user.
|
||||
@ -2507,20 +2406,6 @@ typedef struct AVCodecContext {
|
||||
int context_model;
|
||||
#endif
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int lmin;
|
||||
|
||||
/**
|
||||
* @deprecated use encoder private options instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int lmax;
|
||||
#endif
|
||||
|
||||
#if FF_API_PRIVATE_OPT
|
||||
/** @deprecated use encoder private options instead */
|
||||
attribute_deprecated
|
||||
|
@ -490,12 +490,6 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
|
||||
else
|
||||
ctx->data_offset = 0x280;
|
||||
|
||||
#if FF_API_QUANT_BIAS
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
|
||||
ctx->intra_quant_bias = avctx->intra_quant_bias;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
// XXX tune lbias/cbias
|
||||
if ((ret = dnxhd_init_qmat(ctx, ctx->intra_quant_bias, 0)) < 0)
|
||||
return ret;
|
||||
|
@ -76,9 +76,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if !FF_API_QUANT_BIAS
|
||||
#define FF_DEFAULT_QUANT_BIAS 999999
|
||||
#endif
|
||||
|
||||
#define FF_QSCALE_TYPE_MPEG1 0
|
||||
#define FF_QSCALE_TYPE_MPEG2 1
|
||||
|
@ -581,15 +581,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
enccfg.rc_buf_initial_sz =
|
||||
avctx->rc_initial_buffer_occupancy * 1000LL / avctx->bit_rate;
|
||||
enccfg.rc_buf_optimal_sz = enccfg.rc_buf_sz * 5 / 6;
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->rc_buffer_aggressivity != 1.0) {
|
||||
av_log(avctx, AV_LOG_WARNING, "The rc_buffer_aggressivity option is "
|
||||
"deprecated, use the undershoot-pct private option instead.\n");
|
||||
enccfg.rc_undershoot_pct = lrint(avctx->rc_buffer_aggressivity * 100);
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
if (ctx->rc_undershoot_pct >= 0)
|
||||
enccfg.rc_undershoot_pct = ctx->rc_undershoot_pct;
|
||||
if (ctx->rc_overshoot_pct >= 0)
|
||||
@ -688,15 +679,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, ctx->noise_sensitivity);
|
||||
codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices));
|
||||
}
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->mb_threshold) {
|
||||
av_log(avctx, AV_LOG_WARNING, "The mb_threshold option is deprecated, "
|
||||
"use the static-thresh private option instead.\n");
|
||||
ctx->static_thresh = avctx->mb_threshold;
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
codecctl_int(avctx, VP8E_SET_STATIC_THRESHOLD, ctx->static_thresh);
|
||||
if (ctx->crf >= 0)
|
||||
codecctl_int(avctx, VP8E_SET_CQ_LEVEL, ctx->crf);
|
||||
|
@ -701,24 +701,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
if (x4->nal_hrd >= 0)
|
||||
x4->params.i_nal_hrd = x4->nal_hrd;
|
||||
|
||||
if (x4->motion_est >= 0) {
|
||||
if (x4->motion_est >= 0)
|
||||
x4->params.analyse.i_me_method = x4->motion_est;
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
} else {
|
||||
if (avctx->me_method == ME_EPZS)
|
||||
x4->params.analyse.i_me_method = X264_ME_DIA;
|
||||
else if (avctx->me_method == ME_HEX)
|
||||
x4->params.analyse.i_me_method = X264_ME_HEX;
|
||||
else if (avctx->me_method == ME_UMH)
|
||||
x4->params.analyse.i_me_method = X264_ME_UMH;
|
||||
else if (avctx->me_method == ME_FULL)
|
||||
x4->params.analyse.i_me_method = X264_ME_ESA;
|
||||
else if (avctx->me_method == ME_TESA)
|
||||
x4->params.analyse.i_me_method = X264_ME_TESA;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
if (x4->coder >= 0)
|
||||
x4->params.b_cabac = x4->coder;
|
||||
@ -1003,9 +987,6 @@ static const AVCodecDefault x264_defaults[] = {
|
||||
{ "nr", "-1" },
|
||||
#endif
|
||||
{ "me_range", "-1" },
|
||||
#if FF_API_MOTION_EST
|
||||
{ "me_method", "-1" },
|
||||
#endif
|
||||
{ "subq", "-1" },
|
||||
#if FF_API_PRIVATE_OPT
|
||||
{ "b_strategy", "-1" },
|
||||
|
@ -283,32 +283,6 @@ static av_cold int XAVS_init(AVCodecContext *avctx)
|
||||
if (x4->cplxblur >= 0)
|
||||
x4->params.rc.f_complexity_blur = x4->cplxblur;
|
||||
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (x4->motion_est < 0) {
|
||||
switch (avctx->me_method) {
|
||||
case ME_EPZS:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_DIA;
|
||||
break;
|
||||
case ME_HEX:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_HEX;
|
||||
break;
|
||||
case ME_UMH:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_UMH;
|
||||
break;
|
||||
case ME_FULL:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_ESA;
|
||||
break;
|
||||
case ME_TESA:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_TESA;
|
||||
break;
|
||||
default:
|
||||
x4->params.analyse.i_me_method = XAVS_ME_HEX;
|
||||
}
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
x4->params.i_bframe = avctx->max_b_frames;
|
||||
/* cabac is not included in AVS JiZhun Profile */
|
||||
x4->params.b_cabac = 0;
|
||||
|
@ -418,30 +418,6 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)
|
||||
case 1:
|
||||
x->me_flags |= XVID_ME_ADVANCEDDIAMOND16 |
|
||||
XVID_ME_HALFPELREFINE16;
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
break;
|
||||
default:
|
||||
switch (avctx->me_method) {
|
||||
case ME_FULL: /* Quality 6 */
|
||||
x->me_flags |= XVID_ME_EXTSEARCH16 |
|
||||
XVID_ME_EXTSEARCH8;
|
||||
case ME_EPZS: /* Quality 4 */
|
||||
x->me_flags |= XVID_ME_ADVANCEDDIAMOND8 |
|
||||
XVID_ME_HALFPELREFINE8 |
|
||||
XVID_ME_CHROMA_PVOP |
|
||||
XVID_ME_CHROMA_BVOP;
|
||||
case ME_LOG: /* Quality 2 */
|
||||
case ME_PHODS:
|
||||
case ME_X1:
|
||||
x->me_flags |= XVID_ME_ADVANCEDDIAMOND16 |
|
||||
XVID_ME_HALFPELREFINE16;
|
||||
case ME_ZERO: /* Quality 0 */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Decide how we should decide blocks */
|
||||
|
@ -313,26 +313,6 @@ int ff_init_me(MpegEncContext *s){
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if FF_API_MOTION_EST
|
||||
//special case of snow is needed because snow uses its own iterative ME code
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (s->motion_est == FF_ME_EPZS) {
|
||||
if (s->me_method == ME_ZERO)
|
||||
s->motion_est = FF_ME_ZERO;
|
||||
else if (s->me_method == ME_EPZS)
|
||||
s->motion_est = FF_ME_EPZS;
|
||||
else if (s->me_method == ME_X1)
|
||||
s->motion_est = FF_ME_XONE;
|
||||
else if (s->avctx->codec_id != AV_CODEC_ID_SNOW) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"me_method is only allowed to be set to zero and epzs; "
|
||||
"for hex,umh,full and others see dia_size\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
c->avctx= s->avctx;
|
||||
|
||||
if(s->codec_id == AV_CODEC_ID_H261)
|
||||
|
@ -252,9 +252,6 @@ typedef struct MpegEncContext {
|
||||
int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding
|
||||
uint8_t (*p_field_select_table[2]);
|
||||
uint8_t (*b_field_select_table[2][2]);
|
||||
#if FF_API_MOTION_EST
|
||||
int me_method; ///< ME algorithm
|
||||
#endif
|
||||
int motion_est; ///< ME algorithm
|
||||
int me_penalty_compensation;
|
||||
int me_pre; ///< prepass for motion estimation
|
||||
|
@ -415,22 +415,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
s->intra_only = 0;
|
||||
}
|
||||
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
s->me_method = avctx->me_method;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
/* Fixed QSCALE */
|
||||
s->fixed_qscale = !!(avctx->flags & AV_CODEC_FLAG_QSCALE);
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->border_masking != 0.0)
|
||||
s->border_masking = avctx->border_masking;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
s->adaptive_quant = (s->avctx->lumi_masking ||
|
||||
s->avctx->dark_masking ||
|
||||
s->avctx->temporal_cplx_masking ||
|
||||
@ -760,15 +747,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
#if FF_API_QUANT_BIAS
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->intra_quant_bias != FF_DEFAULT_QUANT_BIAS)
|
||||
s->intra_quant_bias = avctx->intra_quant_bias;
|
||||
if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
|
||||
s->inter_quant_bias = avctx->inter_quant_bias;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
av_log(avctx, AV_LOG_DEBUG, "intra_quant_bias = %d inter_quant_bias = %d\n",s->intra_quant_bias,s->inter_quant_bias);
|
||||
|
||||
if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
|
||||
@ -1043,20 +1021,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
31, 0);
|
||||
}
|
||||
|
||||
#if FF_API_RC_STRATEGY
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (!s->rc_strategy)
|
||||
s->rc_strategy = s->avctx->rc_strategy;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
if (ff_rate_control_init(s) < 0)
|
||||
return -1;
|
||||
|
||||
#if FF_API_RC_STRATEGY
|
||||
av_assert0(MPV_RC_STRATEGY_XVID == FF_RC_STRATEGY_XVID);
|
||||
#endif
|
||||
|
||||
if ((s->avctx->flags & AV_CODEC_FLAG_PASS2) && s->rc_strategy == MPV_RC_STRATEGY_XVID) {
|
||||
#if CONFIG_LIBXVID
|
||||
ret = ff_xvid_rate_control_init(s);
|
||||
@ -1069,32 +1036,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->rc_qsquish != 0.0)
|
||||
s->rc_qsquish = avctx->rc_qsquish;
|
||||
if (avctx->rc_qmod_amp != 0.0)
|
||||
s->rc_qmod_amp = avctx->rc_qmod_amp;
|
||||
if (avctx->rc_qmod_freq)
|
||||
s->rc_qmod_freq = avctx->rc_qmod_freq;
|
||||
if (avctx->rc_buffer_aggressivity != 1.0)
|
||||
s->rc_buffer_aggressivity = avctx->rc_buffer_aggressivity;
|
||||
if (avctx->rc_initial_cplx != 0.0)
|
||||
s->rc_initial_cplx = avctx->rc_initial_cplx;
|
||||
if (avctx->lmin)
|
||||
s->lmin = avctx->lmin;
|
||||
if (avctx->lmax)
|
||||
s->lmax = avctx->lmax;
|
||||
|
||||
if (avctx->rc_eq) {
|
||||
av_freep(&s->rc_eq);
|
||||
s->rc_eq = av_strdup(avctx->rc_eq);
|
||||
if (!s->rc_eq)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
#if FF_API_PRIVATE_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->brd_scale)
|
||||
|
@ -76,21 +76,6 @@ static const AVOption avcodec_options[] = {
|
||||
{"export_mvs", "export motion vectors through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_EXPORT_MVS}, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
{"skip_manual", "do not skip samples and export skip information as frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_SKIP_MANUAL}, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
{"ass_ro_flush_noop", "do not reset ASS ReadOrder field on flush", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_RO_FLUSH_NOOP}, INT_MIN, INT_MAX, S|D, "flags2"},
|
||||
#if FF_API_MOTION_EST
|
||||
{"me_method", "set motion estimation method", OFFSET(me_method), AV_OPT_TYPE_INT, {.i64 = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method"},
|
||||
{"zero", "zero motion estimation (fastest)", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ZERO }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"full", "full motion estimation (slowest)", 0, AV_OPT_TYPE_CONST, {.i64 = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"epzs", "EPZS motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"esa", "esa motion estimation (alias for full)", 0, AV_OPT_TYPE_CONST, {.i64 = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"tesa", "tesa motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_TESA }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"dia", "diamond motion estimation (alias for EPZS)", 0, AV_OPT_TYPE_CONST, {.i64 = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"log", "log motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_LOG }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"phods", "phods motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_PHODS }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"x1", "X1 motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_X1 }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"hex", "hex motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_HEX }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"umh", "umh motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_UMH }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
{"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" },
|
||||
#endif
|
||||
{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX},
|
||||
{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E},
|
||||
{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E},
|
||||
@ -108,9 +93,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_RC_STRATEGY
|
||||
{"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
#endif
|
||||
#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},
|
||||
@ -164,27 +146,13 @@ static const AVOption avcodec_options[] = {
|
||||
#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
|
||||
#if FF_API_MPV_OPT
|
||||
{"qsquish", "deprecated, use encoder private options instead", OFFSET(rc_qsquish), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, 0, 99, V|E},
|
||||
{"rc_qmod_amp", "deprecated, use encoder private options instead", OFFSET(rc_qmod_amp), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E},
|
||||
{"rc_qmod_freq", "deprecated, use encoder private options instead", OFFSET(rc_qmod_freq), 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},
|
||||
#if FF_API_MPV_OPT
|
||||
{"rc_eq", "deprecated, use encoder private options instead", OFFSET(rc_eq), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, V|E},
|
||||
#endif
|
||||
{"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.",
|
||||
OFFSET(rc_min_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
|
||||
{"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|V|E},
|
||||
#if FF_API_MPV_OPT
|
||||
{"rc_buf_aggressivity", "deprecated, use encoder private options instead", OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E},
|
||||
#endif
|
||||
{"i_qfactor", "QP factor between P- and I-frames", OFFSET(i_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX, V|E},
|
||||
{"i_qoffset", "QP offset between P- and I-frames", OFFSET(i_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX, V|E},
|
||||
#if FF_API_MPV_OPT
|
||||
{"rc_init_cplx", "deprecated, use encoder private options instead", OFFSET(rc_initial_cplx), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E},
|
||||
#endif
|
||||
{"dct", "DCT algorithm", OFFSET(dct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E, "dct"},
|
||||
{"auto", "autoselect a good one", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
{"fastint", "fast integer", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"},
|
||||
@ -280,10 +248,6 @@ static const AVOption avcodec_options[] = {
|
||||
{"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},
|
||||
#if FF_API_QUANT_BIAS
|
||||
{"ibias", "intra quant bias", OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
|
||||
{"pbias", "inter quant bias", OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, V|E},
|
||||
#endif
|
||||
{"global_quality", NULL, OFFSET(global_quality), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
|
||||
#if FF_API_CODER_TYPE
|
||||
{"coder", NULL, OFFSET(coder_type), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E, "coder"},
|
||||
@ -306,10 +270,6 @@ static const AVOption avcodec_options[] = {
|
||||
#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_MPV_OPT
|
||||
{"lmin", "deprecated, use encoder private options instead", OFFSET(lmin), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|E},
|
||||
{"lmax", "deprecated, use encoder private options instead", OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 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
|
||||
@ -317,10 +277,6 @@ static const AVOption avcodec_options[] = {
|
||||
{"flags2", NULL, OFFSET(flags2), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT}, 0, UINT_MAX, V|A|E|D, "flags2"},
|
||||
{"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"},
|
||||
#if FF_API_MPV_OPT
|
||||
{"me_threshold", "motion estimation threshold", OFFSET(me_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
{"mb_threshold", "macroblock threshold", OFFSET(mb_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||
#endif
|
||||
{"dc", "intra_dc_precision", OFFSET(intra_dc_precision), AV_OPT_TYPE_INT, {.i64 = 0 }, -8, 16, V|E},
|
||||
{"nssew", "nsse weight", OFFSET(nsse_weight), AV_OPT_TYPE_INT, {.i64 = 8 }, INT_MIN, INT_MAX, V|E},
|
||||
{"skip_top", "number of macroblock rows at the top which are skipped", OFFSET(skip_top), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D},
|
||||
@ -356,9 +312,6 @@ static const AVOption avcodec_options[] = {
|
||||
{"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
|
||||
#if FF_API_MPV_OPT
|
||||
{"border_mask", "deprecated, use encoder private options instead", OFFSET(border_masking), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E},
|
||||
#endif
|
||||
{"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
|
||||
|
@ -52,12 +52,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
av_log(avctx, AV_LOG_ERROR, "The 9/7 wavelet is incompatible with lossless mode.\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (avctx->me_method == ME_ITER)
|
||||
s->motion_est = FF_ME_ITER;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
s->spatial_decomposition_type= s->pred; //FIXME add decorrelator type r transform_type
|
||||
|
||||
@ -1675,11 +1669,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
s->m.b8_stride= 2*s->m.mb_width+1;
|
||||
s->m.f_code=1;
|
||||
s->m.pict_type = pic->pict_type;
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
s->m.me_method= s->avctx->me_method;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
s->m.motion_est= s->motion_est;
|
||||
s->m.me.scene_change_score=0;
|
||||
s->m.me.dia_size = avctx->dia_size;
|
||||
|
@ -283,19 +283,6 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane,
|
||||
s->m.b8_stride = 2 * s->m.mb_width + 1;
|
||||
s->m.f_code = 1;
|
||||
s->m.pict_type = s->pict_type;
|
||||
#if FF_API_MOTION_EST
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
s->m.me_method = s->avctx->me_method;
|
||||
if (s->motion_est == FF_ME_EPZS) {
|
||||
if (s->avctx->me_method == ME_ZERO)
|
||||
s->motion_est = FF_ME_ZERO;
|
||||
else if (s->avctx->me_method == ME_EPZS)
|
||||
s->motion_est = FF_ME_EPZS;
|
||||
else if (s->avctx->me_method == ME_X1)
|
||||
s->motion_est = FF_ME_XONE;
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
s->m.motion_est = s->motion_est;
|
||||
s->m.me.scene_change_score = 0;
|
||||
// s->m.out_format = FMT_H263;
|
||||
|
@ -60,24 +60,12 @@
|
||||
#ifndef FF_API_AVCTX_TIMEBASE
|
||||
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_MPV_OPT
|
||||
#define FF_API_MPV_OPT (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_STREAM_CODEC_TAG
|
||||
#define FF_API_STREAM_CODEC_TAG (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_QUANT_BIAS
|
||||
#define FF_API_QUANT_BIAS (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_RC_STRATEGY
|
||||
#define FF_API_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_CODED_FRAME
|
||||
#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
#ifndef FF_API_MOTION_EST
|
||||
#define FF_API_MOTION_EST (LIBAVCODEC_VERSION_MAJOR < 58)
|
||||
#endif
|
||||
#ifndef FF_API_SIDEDATA_ONLY_PKT
|
||||
#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user