From e674ac4fb49ab714497edd629ea07b5df0a9caa9 Mon Sep 17 00:00:00 2001 From: "gan.zhang" Date: Fri, 4 Dec 2020 15:22:36 +0800 Subject: [PATCH] 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 --- drivers/amvdec_ports/decoder/vdec_av1_if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;", -- 2.20.1