Message ID | 20231002172049.69615-1-johnmather@sidefx.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v3] avcodec/libkvazaar: Respect codec context color settings. | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Mon, Oct 2, 2023 at 8:21 PM John Mather via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote: > > This patch makes the libkvazaar encoder respect color settings that are > present on the codec context, including color range, primaries, transfer > function and colorspace. > --- LGTM. Verified that this indeed builds with libkvazaar v2.0.0 and that the color information gets properly passed. Adjusted the equality signs to be on the same level and applied as a2175ca8615d09418564fcff63c85e18dd993ad1 to master. And then same thing with regards to the description starting with lowercase. Jan
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c index 2ef34dd82e..4855d5649d 100644 --- a/libavcodec/libkvazaar.c +++ b/libavcodec/libkvazaar.c @@ -101,6 +101,13 @@ FF_ENABLE_DEPRECATION_WARNINGS cfg->rc_algorithm = KVZ_LAMBDA; } + cfg->vui.fullrange = avctx->color_range == AVCOL_RANGE_JPEG; + cfg->vui.colorprim = avctx->color_primaries; + cfg->vui.transfer = avctx->color_trc; + cfg->vui.colormatrix = avctx->colorspace; + if (avctx->chroma_sample_location != AVCHROMA_LOC_UNSPECIFIED) + cfg->vui.chroma_loc = avctx->chroma_sample_location - 1; + if (ctx->kvz_params) { AVDictionary *dict = NULL; if (!av_dict_parse_string(&dict, ctx->kvz_params, "=", ",", 0)) {