This adds support for default range coder tables, rather than
only custom ones. Its two lines, as the same code can be used
for both thanks to ffv1enc.c setting f->state_transition properly.
---
libavcodec/ffv1enc_vulkan.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ffv1enc_vulkan.c b/libavcodec/ffv1enc_vulkan.c
index baeadf2b12..a3438e17e9 100644
--- a/libavcodec/ffv1enc_vulkan.c
+++ b/libavcodec/ffv1enc_vulkan.c
@@ -1488,7 +1488,7 @@ static av_cold int vulkan_encode_ffv1_init(AVCodecContext
*avctx)
if (f->version < 4) {
av_log(avctx, AV_LOG_ERROR, "PCM coding only supported by version
4 (-level 4)\n");
return AVERROR_INVALIDDATA;
- } else if (f->ac != AC_RANGE_CUSTOM_TAB) {
+ } else if (f->ac == AC_GOLOMB_RICE) {
av_log(avctx, AV_LOG_ERROR, "PCM coding requires range coding\n");
return AVERROR_INVALIDDATA;
}
@@ -1736,6 +1736,8 @@ static const AVOption vulkan_encode_ffv1_options[] = {
{ .i64 = AC_RANGE_CUSTOM_TAB }, -2, 2, VE, .unit = "coder" },
{ "rice", "Golomb rice", 0, AV_OPT_TYPE_CONST,
{ .i64 = AC_GOLOMB_RICE }, INT_MIN, INT_MAX, VE, .unit = "coder" },
+ { "range_def", "Range with default table", 0, AV_OPT_TYPE_CONST,
+ { .i64 = AC_RANGE_DEFAULT_TAB_FORCE }, INT_MIN, INT_MAX, VE, .unit
= "coder" },
{ "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,
--
2.47.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".