From: MingLiang Dong Date: Mon, 28 Jan 2019 06:36:14 +0000 (-0500) Subject: hdr: modify hdr gamut mtx for TV [1/1] X-Git-Tag: hardkernel-4.9.236-104~1784 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89314ada48447b4db3ffa7dad36f2acf5cda17c9;p=platform%2Fkernel%2Flinux-amlogic.git hdr: modify hdr gamut mtx for TV [1/1] PD#SWPL-4638 Problem: hdr video, color is light Solution: modify hdr gamut mtx, use bt2020rgb to 709rgb mtx Verify: verified on x301 Change-Id: Ia87493a57196b6a3a87c93535fed325b163cb562 Signed-off-by: MingLiang Dong --- diff --git a/drivers/amlogic/media/enhancement/amvecm/set_hdr2_v0.c b/drivers/amlogic/media/enhancement/amvecm/set_hdr2_v0.c index 79b40afc160f..855781c9bf4f 100644 --- a/drivers/amlogic/media/enhancement/amvecm/set_hdr2_v0.c +++ b/drivers/amlogic/media/enhancement/amvecm/set_hdr2_v0.c @@ -694,14 +694,14 @@ MODULE_PARM_DESC(hdr2_debug, "\n hdr2_debug\n"); /* gamut 3x3 matrix*/ /*standard 2020rgb->709rgb*/ -/*int ncl_2020_709[9] = {*/ - /*3401, -1204, -149, -255, 2320, -17, -37, -206, 2291};*/ +int ncl_2020_709[9] = { + 3401, -1204, -149, -255, 2320, -17, -37, -206, 2291}; /* dci-p3->709rgb*/ /*int ncl_2020_709[9] = {*/ /*2543, -459, -36, -88, 2133, 3, -41, -161, 2250};*/ /* special primary->709rgb*/ -int ncl_2020_709[9] = { +int ncl_sp_709[9] = { 2684, -489, -147, -201, 2266, -17, -29, -171, 2248}; /*int cl_2020_709[9] =*/ @@ -1745,8 +1745,15 @@ void hdr_func(enum hdr_module_sel module_sel, hdr_mtx_param.mtx_cgain[i] = rgb2ycbcr_709[i]; hdr_mtx_param.mtx_ogain[i] = rgb2ycbcr_ncl2020[i]; hdr_mtx_param.mtx_out[i] = rgb2ycbcr_709[i]; - if (i < 9) - hdr_mtx_param.mtx_gamut[i] = ncl_2020_709[i]; + if (i < 9) { + if (is_meson_g12a_cpu() || + is_meson_g12b_cpu()) + hdr_mtx_param.mtx_gamut[i] = + ncl_sp_709[i]; + else + hdr_mtx_param.mtx_gamut[i] = + ncl_2020_709[i]; + } } hdr_mtx_param.mtx_on = MTX_ON;