History

avcodec/libkvazaar: Respect codec context color settings.

This patch makes the libkvazaar encoder respect color settings that are present on the codec context, including color range, primaries, transfer function and colorspace.

John Mather committed 3 years ago

Commit a2175ca1 parent 7251dfd1 file · +7 −0Browse files

Unified · Split

libavcodec/libkvazaar.c+7−0
@@ -101,6 +101,13 @@ FF_ENABLE_DEPRECATION_WARNINGS · 100 unmodified lines
101101 cfg->rc_algorithm = KVZ_LAMBDA;
102102 }
103103
104+ cfg->vui.fullrange = avctx->color_range == AVCOL_RANGE_JPEG;
105+ cfg->vui.colorprim = avctx->color_primaries;
106+ cfg->vui.transfer = avctx->color_trc;
107+ cfg->vui.colormatrix = avctx->colorspace;
108+ if (avctx->chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED)
109+ cfg->vui.chroma_loc = avctx->chroma_sample_location - 1;
110+
104111 if (ctx->kvz_params) {
105112 AVDictionary *dict = NULL;
106113 if (!av_dict_parse_string(&dict, ctx->kvz_params, "=", ",", 0)) {

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