diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:27:41 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:27:41 +0100 |
commit | 2630f7f709049113dc03d6b999efad6acc423d67 (patch) | |
tree | d7a217a844f6b7939d3f08da45c027caa9e6761c /libavcodec/ffv1enc.c | |
parent | ec1b95dda4a856ae532a0a27aa6213040e712d68 (diff) | |
parent | be00ec832c519427cd92218abac77dafdc1d5487 (diff) | |
download | ffmpeg-2630f7f709049113dc03d6b999efad6acc423d67.tar.gz |
Merge commit 'be00ec832c519427cd92218abac77dafdc1d5487'
* commit 'be00ec832c519427cd92218abac77dafdc1d5487':
lavc: Deprecate coder_type and its symbols
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r-- | libavcodec/ffv1enc.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index e448212798..6b5c4b24f3 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -700,7 +700,12 @@ static av_cold int encode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } - s->ac = avctx->coder_type > 0 ? AC_RANGE_CUSTOM_TAB : AC_GOLOMB_RICE; +#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; +FF_ENABLE_DEPRECATION_WARNINGS +#endif s->plane_count = 3; switch(avctx->pix_fmt) { @@ -1346,6 +1351,15 @@ static av_cold int encode_close(AVCodecContext *avctx) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { { "slicecrc", "Protect slices with CRCs", OFFSET(ec), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, + { "coder", "Coder type", OFFSET(ac), AV_OPT_TYPE_INT, + { .i64 = AC_GOLOMB_RICE }, 0, 2, VE, "coder" }, + { "rice", "Golomb rice", 0, AV_OPT_TYPE_CONST, + { .i64 = AC_GOLOMB_RICE }, INT_MIN, INT_MAX, VE, "coder" }, + { "range_def", "Range with default table", 0, AV_OPT_TYPE_CONST, + { .i64 = AC_RANGE_DEFAULT_TAB }, INT_MIN, INT_MAX, VE, "coder" }, + { "range_tab", "Range with custom table", 0, AV_OPT_TYPE_CONST, + { .i64 = AC_RANGE_CUSTOM_TAB }, INT_MIN, INT_MAX, VE, "coder" }, + { NULL } }; @@ -1356,10 +1370,12 @@ static const AVClass ffv1_class = { .version = LIBAVUTIL_VERSION_INT, }; +#if FF_API_CODER_TYPE static const AVCodecDefault ffv1_defaults[] = { { "coder", "-1" }, { NULL }, }; +#endif AVCodec ff_ffv1_encoder = { .name = "ffv1", @@ -1385,6 +1401,8 @@ AVCodec ff_ffv1_encoder = { AV_PIX_FMT_NONE }, +#if FF_API_CODER_TYPE .defaults = ffv1_defaults, +#endif .priv_class = &ffv1_class, }; |