From: gan.zhang Date: Fri, 4 Dec 2020 07:22:36 +0000 (+0800) Subject: av1: support V4L2 HDR static setting [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e674ac4fb49ab714497edd629ea07b5df0a9caa9;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git av1: support V4L2 HDR static setting [1/1] PD#SWPL-38314 Problem: Luminance doesn't match display Application can not set static information to decoder. Solution: Luminance match display (*10000) Interface layer set static information. Verify: AH212 Change-Id: Ifcd90a4c88a7fba7c007e54d47155e2edf370584 Signed-off-by: gan.zhang --- diff --git a/drivers/amvdec_ports/decoder/vdec_av1_if.c b/drivers/amvdec_ports/decoder/vdec_av1_if.c index 0a79789..2b9b657 100644 --- a/drivers/amvdec_ports/decoder/vdec_av1_if.c +++ b/drivers/amvdec_ports/decoder/vdec_av1_if.c @@ -295,6 +295,7 @@ static void vdec_parser_parms(struct vdec_av1_inst *inst) inst->parms.hdr.color_parms.present_flag) { u8 *pbuf = ctx->config.buf + ctx->config.length; + pbuf += sprintf(pbuf, "HDRStaticInfo:%d;", 1); pbuf += sprintf(pbuf, "mG.x:%d;", ctx->config.parm.dec.hdr.color_parms.primaries[0][0]); pbuf += sprintf(pbuf, "mG.y:%d;", @@ -312,7 +313,7 @@ static void vdec_parser_parms(struct vdec_av1_inst *inst) pbuf += sprintf(pbuf, "mW.y:%d;", ctx->config.parm.dec.hdr.color_parms.white_point[1]); pbuf += sprintf(pbuf, "mMaxDL:%d;", - ctx->config.parm.dec.hdr.color_parms.luminance[0] / 1000); + ctx->config.parm.dec.hdr.color_parms.luminance[0] * 1000); pbuf += sprintf(pbuf, "mMinDL:%d;", ctx->config.parm.dec.hdr.color_parms.luminance[1]); pbuf += sprintf(pbuf, "mMaxCLL:%d;",