History

avcodec/ffv1enc: Add enum for qtable

Michael Niedermayer committed 1 year ago

Commit 559d4351 parent d32dcc03 files · +20 −2Browse files

Unified · Split

3 files
  1. libavcodec/ffv1enc.c +7 −1
  2. libavcodec/ffv1enc.h +6 −0
  3. libavcodec/ffv1enc_vulkan.c +7 −1
libavcodec/ffv1enc.c+7−1
@@ -1346,7 +1346,13 @@ static const AVOption options[] = { · 1345 unmodified lines
13461346 { "context", "Context model", OFFSET(context_model), AV_OPT_TYPE_INT,
13471347 { .i64 = 0 }, 0, 1, VE },
13481348 { "qtable", "Quantization table", OFFSET(qtable), AV_OPT_TYPE_INT,
1349− { .i64 = -1 }, -1, 2, VE },
1349+ { .i64 = -1 }, -1, 2, VE , .unit = "qtable"},
1350+ { "default", NULL, 0, AV_OPT_TYPE_CONST,
1351+ { .i64 = QTABLE_DEFAULT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
1352+ { "8bit", NULL, 0, AV_OPT_TYPE_CONST,
1353+ { .i64 = QTABLE_8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
1354+ { "greater8bit", NULL, 0, AV_OPT_TYPE_CONST,
1355+ { .i64 = QTABLE_GT8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
13501356
13511357 { NULL }
13521358 };
libavcodec/ffv1enc.h+6−0
@@ -25,6 +25,12 @@ · 24 unmodified lines
2525
2626 #include "avcodec.h"
2727
28+enum {
29+ QTABLE_DEFAULT = -1,
30+ QTABLE_8BIT,
31+ QTABLE_GT8BIT,
32+};
33+
2834 av_cold int ff_ffv1_encode_init(AVCodecContext *avctx);
2935 av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx);
3036 av_cold int ff_ffv1_encode_setup_plane_info(AVCodecContext *avctx,
libavcodec/ffv1enc_vulkan.c+7−1
@@ -1795,7 +1795,13 @@ static const AVOption vulkan_encode_ffv1_options[] = { · 1794 unmodified lines
17951795 { "range_tab", "Range with custom table", 0, AV_OPT_TYPE_CONST,
17961796 { .i64 = AC_RANGE_CUSTOM_TAB }, INT_MIN, INT_MAX, VE, .unit = "coder" },
17971797 { "qtable", "Quantization table", OFFSET(ctx.qtable), AV_OPT_TYPE_INT,
1798− { .i64 = -1 }, -1, 2, VE },
1798+ { .i64 = -1 }, -1, 2, VE , .unit = "qtable"},
1799+ { "default", NULL, 0, AV_OPT_TYPE_CONST,
1800+ { .i64 = QTABLE_DEFAULT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
1801+ { "8bit", NULL, 0, AV_OPT_TYPE_CONST,
1802+ { .i64 = QTABLE_8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
1803+ { "greater8bit", NULL, 0, AV_OPT_TYPE_CONST,
1804+ { .i64 = QTABLE_GT8BIT }, INT_MIN, INT_MAX, VE, .unit = "qtable" },
17991805
18001806 { "slices_h", "Number of horizontal slices", OFFSET(num_h_slices), AV_OPT_TYPE_INT,
18011807 { .i64 = -1 }, -1, 1024, VE },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t