summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-06 17:20:57 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-10 03:56:39 +0200
commit42c895ef5cf93e755e338aa01be536ce2bd9106c (patch)
tree4c18943a9f88535aa546efb03e917426ed31d11d /libavcodec/mjpegenc.c
parentdff774042a6f63a5d4fe01c68a7f34e35c2c3c0e (diff)
avcodec/mpegvideo: Deprecate mpeg_quant option for codecs != MPEG-4
mpeg_quant may only be set for MPEG-4 and MPEG-2, yet for the latter it is no option as the code acts as if it were always set. So deprecate the option for all codecs for which it makes no sense. Furthermore, given that the code already errors out if the option is set for a codec that doesn't support it we can restrict the range of the option for all these codecs without breaking something. This means that the checks for whether mpeg_quant is set for these codecs can be removed as soon as AVCodecContext.mpeg_quant is removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r--libavcodec/mjpegenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 3cff50abdb..6c261a1397 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -593,6 +593,9 @@ FF_MPV_COMMON_OPTS
{ "huffman", "Huffman table strategy", OFFSET(huffman), AV_OPT_TYPE_INT, { .i64 = HUFFMAN_TABLE_OPTIMAL }, 0, NB_HUFFMAN_TABLE_OPTION - 1, VE, "huffman" },
{ "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = HUFFMAN_TABLE_DEFAULT }, INT_MIN, INT_MAX, VE, "huffman" },
{ "optimal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = HUFFMAN_TABLE_OPTIMAL }, INT_MIN, INT_MAX, VE, "huffman" },
+#if FF_API_MPEGVIDEO_OPTS
+FF_MPV_DEPRECATED_MPEG_QUANT_OPT
+#endif
{ NULL},
};