[FFmpeg-devel] [PATCH 1/2] avcodec/ffv1enc: Add enum for qtable
Michael Niedermayer
michael at niedermayer.cc
Fri Nov 29 21:33:45 EET 2024
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/ffv1enc.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index c96c71b1096..742db549e5f 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -41,6 +41,12 @@
#include "ffv1.h"
#include "ffv1enc.h"
+enum {
+ QTABLE_DEFAULT = -1,
+ QTABLE_8BIT,
+ QTABLE_GT8BIT,
+};
+
static const int8_t quant5_10bit[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1346,7 +1352,13 @@ static const AVOption options[] = {
{ "context", "Context model", OFFSET(context_model), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, 1, VE },
{ "qtable", "Quantization table", OFFSET(qtable), AV_OPT_TYPE_INT,
- { .i64 = -1 }, -1, 2, VE },
+ { .i64 = -1 }, -1, 2, VE , .unit = "qtable"},
+ { "default", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = QTABLE_DEFAULT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
+ { "8bit", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = QTABLE_8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
+ { "greater8bit", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = QTABLE_GT8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
{ NULL }
};
--
2.47.0
More information about the ffmpeg-devel
mailing list