avcodec/ffv1enc: Add enum for qtable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2024-11-29 20:06:25 +01:00
parent d32dcc07a7
commit 559d435fa3
3 changed files with 20 additions and 2 deletions

View File

@@ -1346,7 +1346,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 }
};

View File

@@ -25,6 +25,12 @@
#include "avcodec.h"
enum {
QTABLE_DEFAULT = -1,
QTABLE_8BIT,
QTABLE_GT8BIT,
};
av_cold int ff_ffv1_encode_init(AVCodecContext *avctx);
av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx);
av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,

View File

@@ -1795,7 +1795,13 @@ static const AVOption vulkan_encode_ffv1_options[] = {
{ "range_tab", "Range with custom table", 0, AV_OPT_TYPE_CONST,
{ .i64 = AC_RANGE_CUSTOM_TAB }, INT_MIN, INT_MAX, VE, .unit = "coder" },
{ "qtable", "Quantization table", OFFSET(ctx.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" },
{ "slices_h", "Number of horizontal slices", OFFSET(num_h_slices), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 1024, VE },