mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
lavc: Drop deprecated options moved to private contexts
Deprecated in 10/2014 and 07/2015.
This commit is contained in:
parent
c43a96fe16
commit
94eed68ace
@ -657,25 +657,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
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup lavc_decoding
|
||||
*/
|
||||
@ -1412,14 +1393,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
|
||||
@ -1479,12 +1452,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
|
||||
@ -1684,19 +1651,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
|
||||
@ -1741,20 +1695,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.
|
||||
@ -1776,14 +1716,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.
|
||||
@ -2096,19 +2028,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.
|
||||
@ -2124,14 +2043,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.
|
||||
@ -2146,17 +2057,6 @@ typedef struct AVCodecContext {
|
||||
*/
|
||||
int 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.
|
||||
@ -2196,20 +2096,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
|
||||
|
@ -343,12 +343,6 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
|
||||
|
||||
ctx->m.mb_num = ctx->m.mb_height * ctx->m.mb_width;
|
||||
|
||||
#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;
|
||||
|
@ -73,9 +73,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if !FF_API_QUANT_BIAS
|
||||
#define FF_DEFAULT_QUANT_BIAS 999999
|
||||
#endif
|
||||
|
||||
#define FF_SANE_NB_CHANNELS 63U
|
||||
|
||||
|
@ -362,15 +362,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);
|
||||
codecctl_int(avctx, VP8E_SET_CQ_LEVEL, ctx->crf);
|
||||
|
||||
|
@ -547,24 +547,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;
|
||||
@ -803,9 +787,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" },
|
||||
|
@ -285,32 +285,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;
|
||||
|
@ -432,30 +432,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 */
|
||||
|
@ -310,25 +310,6 @@ int ff_init_me(MpegEncContext *s){
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if FF_API_MOTION_EST
|
||||
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 {
|
||||
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(cache_size < 2*dia_size && !c->stride){
|
||||
|
@ -247,9 +247,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
|
||||
|
@ -335,22 +335,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 ||
|
||||
@ -583,15 +570,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
s->inter_quant_bias = -(1 << (QUANT_BIAS_SHIFT - 2));
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
|
||||
s->avctx->time_base.den > (1 << 16) - 1) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
@ -874,32 +852,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
if (ff_rate_control_init(s) < 0)
|
||||
return -1;
|
||||
|
||||
#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)
|
||||
|
@ -192,16 +192,6 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
|
||||
dest->rc_override = NULL;
|
||||
dest->subtitle_header = NULL;
|
||||
dest->hw_frames_ctx = NULL;
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
dest->rc_eq = NULL;
|
||||
if (src->rc_eq) {
|
||||
dest->rc_eq = av_strdup(src->rc_eq);
|
||||
if (!dest->rc_eq)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
#define alloc_and_copy_or_fail(obj, size, pad) \
|
||||
if (src->obj && size > 0) { \
|
||||
@ -236,11 +226,6 @@ fail:
|
||||
av_freep(&dest->inter_matrix);
|
||||
av_freep(&dest->extradata);
|
||||
av_buffer_unref(&dest->hw_frames_ctx);
|
||||
#if FF_API_MPV_OPT
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
av_freep(&dest->rc_eq);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
#endif
|
||||
|
@ -67,20 +67,6 @@ static const AVOption avcodec_options[] = {
|
||||
{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
|
||||
{"ignorecrop", "ignore cropping information from sps", 1, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_IGNORE_CROP }, INT_MIN, INT_MAX, V|D, "flags2"},
|
||||
{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "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 (default)", 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" },
|
||||
#endif
|
||||
{"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
|
||||
{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, 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},
|
||||
@ -99,9 +85,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", "use 'frames' 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},
|
||||
@ -150,27 +133,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", "Set maximum bitrate tolerance (in bits/s). Requires bufsize to be set.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E},
|
||||
{"minrate", "Set minimum bitrate tolerance (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.",
|
||||
OFFSET(rc_min_rate), AV_OPT_TYPE_INT, {.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 (default)", 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"},
|
||||
@ -248,10 +217,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"},
|
||||
@ -274,10 +239,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
|
||||
@ -285,10 +246,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", NULL, OFFSET(thread_count), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, V|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 }, INT_MIN, INT_MAX, 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},
|
||||
@ -319,9 +276,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
|
||||
|
@ -272,19 +272,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;
|
||||
|
@ -47,24 +47,12 @@
|
||||
* the public API and may change, break or disappear at any time.
|
||||
*/
|
||||
|
||||
#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 < 58)
|
||||
#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