mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec: Remove deprecated coder type options
Deprecated in be00ec832c
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
6cf0cb8935
commit
78ce00428f
@ -627,20 +627,6 @@ Set limit motion vectors range (1023 for DivX player).
|
|||||||
|
|
||||||
@item global_quality @var{integer} (@emph{encoding,audio,video})
|
@item global_quality @var{integer} (@emph{encoding,audio,video})
|
||||||
|
|
||||||
@item coder @var{integer} (@emph{encoding,video})
|
|
||||||
|
|
||||||
Possible values:
|
|
||||||
@table @samp
|
|
||||||
@item vlc
|
|
||||||
variable length coder / huffman coder
|
|
||||||
@item ac
|
|
||||||
arithmetic coder
|
|
||||||
@item raw
|
|
||||||
raw (no encoding)
|
|
||||||
@item rle
|
|
||||||
run-length coder
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item context @var{integer} (@emph{encoding,video})
|
@item context @var{integer} (@emph{encoding,video})
|
||||||
Set context model.
|
Set context model.
|
||||||
|
|
||||||
|
@ -1443,18 +1443,6 @@ typedef struct AVCodecContext {
|
|||||||
*/
|
*/
|
||||||
int rc_initial_buffer_occupancy;
|
int rc_initial_buffer_occupancy;
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
#define FF_CODER_TYPE_VLC 0
|
|
||||||
#define FF_CODER_TYPE_AC 1
|
|
||||||
#define FF_CODER_TYPE_RAW 2
|
|
||||||
#define FF_CODER_TYPE_RLE 3
|
|
||||||
/**
|
|
||||||
* @deprecated use encoder private options instead
|
|
||||||
*/
|
|
||||||
attribute_deprecated
|
|
||||||
int coder_type;
|
|
||||||
#endif /* FF_API_CODER_TYPE */
|
|
||||||
|
|
||||||
#if FF_API_PRIVATE_OPT
|
#if FF_API_PRIVATE_OPT
|
||||||
/** @deprecated use encoder private options instead */
|
/** @deprecated use encoder private options instead */
|
||||||
attribute_deprecated
|
attribute_deprecated
|
||||||
|
@ -554,13 +554,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (avctx->coder_type != -1)
|
|
||||||
s->ac = avctx->coder_type > 0 ? AC_RANGE_CUSTOM_TAB : AC_GOLOMB_RICE;
|
|
||||||
else
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
|
||||||
if (s->ac == 1) // Compatbility with common command line usage
|
if (s->ac == 1) // Compatbility with common command line usage
|
||||||
s->ac = AC_RANGE_CUSTOM_TAB;
|
s->ac = AC_RANGE_CUSTOM_TAB;
|
||||||
else if (s->ac == AC_RANGE_DEFAULT_TAB_FORCE)
|
else if (s->ac == AC_RANGE_DEFAULT_TAB_FORCE)
|
||||||
@ -1310,13 +1303,6 @@ static const AVClass ffv1_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
static const AVCodecDefault ffv1_defaults[] = {
|
|
||||||
{ "coder", "-1" },
|
|
||||||
{ NULL },
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AVCodec ff_ffv1_encoder = {
|
AVCodec ff_ffv1_encoder = {
|
||||||
.name = "ffv1",
|
.name = "ffv1",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
|
.long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
|
||||||
@ -1350,9 +1336,6 @@ AVCodec ff_ffv1_encoder = {
|
|||||||
AV_PIX_FMT_NONE
|
AV_PIX_FMT_NONE
|
||||||
|
|
||||||
},
|
},
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
.defaults = ffv1_defaults,
|
|
||||||
#endif
|
|
||||||
.priv_class = &ffv1_class,
|
.priv_class = &ffv1_class,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -210,16 +210,6 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE && FF_API_OPENH264_CABAC
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (s->coder < 0 && avctx->coder_type == FF_CODER_TYPE_AC)
|
|
||||||
s->coder = 1;
|
|
||||||
|
|
||||||
if (s->coder < 0)
|
|
||||||
s->coder = s->cabac;
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (s->profile == FF_PROFILE_UNKNOWN && s->coder >= 0)
|
if (s->profile == FF_PROFILE_UNKNOWN && s->coder >= 0)
|
||||||
s->profile = s->coder == 0 ? FF_PROFILE_H264_CONSTRAINED_BASELINE :
|
s->profile = s->coder == 0 ? FF_PROFILE_H264_CONSTRAINED_BASELINE :
|
||||||
#if OPENH264_VER_AT_LEAST(1, 8)
|
#if OPENH264_VER_AT_LEAST(1, 8)
|
||||||
|
@ -747,12 +747,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
#endif
|
#endif
|
||||||
if (avctx->keyint_min >= 0)
|
if (avctx->keyint_min >= 0)
|
||||||
x4->params.i_keyint_min = avctx->keyint_min;
|
x4->params.i_keyint_min = avctx->keyint_min;
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (avctx->coder_type >= 0)
|
|
||||||
x4->coder = avctx->coder_type == FF_CODER_TYPE_AC;
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
|
||||||
if (avctx->me_cmp >= 0)
|
if (avctx->me_cmp >= 0)
|
||||||
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
|
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
|
||||||
|
|
||||||
@ -1174,9 +1168,6 @@ static const AVCodecDefault x264_defaults[] = {
|
|||||||
{ "b_strategy", "-1" },
|
{ "b_strategy", "-1" },
|
||||||
#endif
|
#endif
|
||||||
{ "keyint_min", "-1" },
|
{ "keyint_min", "-1" },
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
{ "coder", "-1" },
|
|
||||||
#endif
|
|
||||||
{ "cmp", "-1" },
|
{ "cmp", "-1" },
|
||||||
{ "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
|
{ "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
|
||||||
{ "thread_type", "0" },
|
{ "thread_type", "0" },
|
||||||
|
@ -216,13 +216,6 @@ static const AVOption avcodec_options[] = {
|
|||||||
{"subq", "sub-pel motion estimation quality", OFFSET(me_subpel_quality), AV_OPT_TYPE_INT, {.i64 = 8 }, 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},
|
{"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},
|
{"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"},
|
|
||||||
{"vlc", "variable length coder / Huffman coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_VLC }, INT_MIN, INT_MAX, V|E, "coder"},
|
|
||||||
{"ac", "arithmetic coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_AC }, INT_MIN, INT_MAX, V|E, "coder"},
|
|
||||||
{"raw", "raw (no encoding)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RAW }, INT_MIN, INT_MAX, V|E, "coder"},
|
|
||||||
{"rle", "run-length coder", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CODER_TYPE_RLE }, INT_MIN, INT_MAX, V|E, "coder"},
|
|
||||||
#endif /* FF_API_CODER_TYPE */
|
|
||||||
#if FF_API_PRIVATE_OPT
|
#if FF_API_PRIVATE_OPT
|
||||||
{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
{"context", "context model", OFFSET(context_model), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
|
||||||
#endif
|
#endif
|
||||||
|
@ -667,12 +667,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
|
|||||||
q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
|
q->extco.RateDistortionOpt = q->rdo > 0 ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
|
||||||
|
|
||||||
if (avctx->codec_id == AV_CODEC_ID_H264) {
|
if (avctx->codec_id == AV_CODEC_ID_H264) {
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (avctx->coder_type >= 0)
|
|
||||||
q->cavlc = avctx->coder_type == FF_CODER_TYPE_VLC;
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
|
||||||
q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
|
q->extco.CAVLC = q->cavlc ? MFX_CODINGOPTION_ON
|
||||||
: MFX_CODINGOPTION_UNKNOWN;
|
: MFX_CODINGOPTION_UNKNOWN;
|
||||||
|
|
||||||
|
@ -169,9 +169,6 @@ static const AVCodecDefault qsv_enc_defaults[] = {
|
|||||||
{ "bf", "3" },
|
{ "bf", "3" },
|
||||||
{ "qmin", "-1" },
|
{ "qmin", "-1" },
|
||||||
{ "qmax", "-1" },
|
{ "qmax", "-1" },
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
{ "coder", "-1" },
|
|
||||||
#endif
|
|
||||||
{ "trellis", "-1" },
|
{ "trellis", "-1" },
|
||||||
{ "flags", "+cgop" },
|
{ "flags", "+cgop" },
|
||||||
#if FF_API_PRIVATE_OPT
|
#if FF_API_PRIVATE_OPT
|
||||||
|
@ -105,13 +105,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
|||||||
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||||
avctx->coded_frame->key_frame = 1;
|
avctx->coded_frame->key_frame = 1;
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
#endif
|
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (avctx->coder_type == FF_CODER_TYPE_RAW)
|
|
||||||
s->rle = 0;
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
width = avctx->width;
|
width = avctx->width;
|
||||||
|
@ -140,22 +140,6 @@ static av_cold int sunrast_encode_init(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
SUNRASTContext *s = avctx->priv_data;
|
SUNRASTContext *s = avctx->priv_data;
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
switch (avctx->coder_type) {
|
|
||||||
case FF_CODER_TYPE_RLE:
|
|
||||||
s->type = RT_BYTE_ENCODED;
|
|
||||||
break;
|
|
||||||
case FF_CODER_TYPE_RAW:
|
|
||||||
s->type = RT_STANDARD;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "invalid coder_type\n");
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
if (s->type != RT_BYTE_ENCODED && s->type != RT_STANDARD)
|
|
||||||
#endif
|
|
||||||
// adjust boolean option to RT equivalent
|
// adjust boolean option to RT equivalent
|
||||||
s->type++;
|
s->type++;
|
||||||
|
|
||||||
@ -224,13 +208,6 @@ static const AVClass sunrast_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
static const AVCodecDefault sunrast_defaults[] = {
|
|
||||||
{ "coder", "rle" },
|
|
||||||
{ NULL },
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AVCodec ff_sunrast_encoder = {
|
AVCodec ff_sunrast_encoder = {
|
||||||
.name = "sunrast",
|
.name = "sunrast",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
|
.long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
|
||||||
@ -239,9 +216,6 @@ AVCodec ff_sunrast_encoder = {
|
|||||||
.priv_data_size = sizeof(SUNRASTContext),
|
.priv_data_size = sizeof(SUNRASTContext),
|
||||||
.init = sunrast_encode_init,
|
.init = sunrast_encode_init,
|
||||||
.encode2 = sunrast_encode_frame,
|
.encode2 = sunrast_encode_frame,
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
.defaults = sunrast_defaults,
|
|
||||||
#endif
|
|
||||||
.priv_class = &sunrast_class,
|
.priv_class = &sunrast_class,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24,
|
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24,
|
||||||
AV_PIX_FMT_PAL8,
|
AV_PIX_FMT_PAL8,
|
||||||
|
@ -152,13 +152,6 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
bpp = pkt->data[16] >> 3;
|
bpp = pkt->data[16] >> 3;
|
||||||
|
|
||||||
|
|
||||||
#if FF_API_CODER_TYPE
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
if (avctx->coder_type == FF_CODER_TYPE_RAW)
|
|
||||||
s->rle = 0;
|
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* try RLE compression */
|
/* try RLE compression */
|
||||||
if (s->rle)
|
if (s->rle)
|
||||||
datasize = targa_encode_rle(out, picsize, p, bpp, avctx->width, avctx->height);
|
datasize = targa_encode_rle(out, picsize, p, bpp, avctx->width, avctx->height);
|
||||||
|
@ -66,9 +66,6 @@
|
|||||||
#ifndef FF_API_VBV_DELAY
|
#ifndef FF_API_VBV_DELAY
|
||||||
#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59)
|
#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||||
#endif
|
#endif
|
||||||
#ifndef FF_API_CODER_TYPE
|
|
||||||
#define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59)
|
|
||||||
#endif
|
|
||||||
#ifndef FF_API_PRIVATE_OPT
|
#ifndef FF_API_PRIVATE_OPT
|
||||||
#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
|
#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user