From 2adfd7ee6216a78f347fed3a08828d181b8a2307 Mon Sep 17 00:00:00 2001 From: MingLiang Dong Date: Fri, 28 Jun 2019 21:03:34 +0800 Subject: [PATCH] vpp: optimize rgb screen convert coef [1/1] PD#TV-7280 Problem: rgb screen pattern white balance data is a little high Solution: optimize convert coef Verify: verify on TL1 Change-Id: Iae1e8134d1a48fe0bbf206dd9b148c264951da2a Signed-off-by: MingLiang Dong --- arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts | 2 +- arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts | 2 +- arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts | 2 +- drivers/amlogic/media/video_sink/video.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts index 95fdefd34d85..e771a9f3af25 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts @@ -508,7 +508,7 @@ gamma_en = <1>;/*1:enabel ;0:disable*/ wb_en = <1>;/*1:enabel ;0:disable*/ cm_en = <1>;/*1:enabel ;0:disable*/ - wb_sel = <1>;/*1:mtx ;0:gainoff*/ + wb_sel = <0>;/*1:mtx ;0:gainoff*/ vlock_en = <1>;/*1:enable;0:disable*/ vlock_mode = <0x4>; /* vlock work mode: diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts index 41ca6e6d9b46..e5aece59f482 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts @@ -524,7 +524,7 @@ gamma_en = <1>;/*1:enabel ;0:disable*/ wb_en = <1>;/*1:enabel ;0:disable*/ cm_en = <1>;/*1:enabel ;0:disable*/ - wb_sel = <1>;/*1:mtx ;0:gainoff*/ + wb_sel = <0>;/*1:mtx ;0:gainoff*/ vlock_en = <1>;/*1:enable;0:disable*/ vlock_mode = <0x4>; /* vlock work mode: diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts index 57830dbb3ef0..6b0dc2000cf9 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts @@ -518,7 +518,7 @@ gamma_en = <1>;/*1:enabel ;0:disable*/ wb_en = <1>;/*1:enabel ;0:disable*/ cm_en = <1>;/*1:enabel ;0:disable*/ - wb_sel = <1>;/*1:mtx ;0:gainoff*/ + wb_sel = <0>;/*1:mtx ;0:gainoff*/ vlock_en = <1>;/*1:enable;0:disable*/ vlock_mode = <0x4>; /* vlock work mode: diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 8714b801474e..a26d0ae609dd 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -10955,7 +10955,7 @@ static u32 rgb2yuv(u32 rgb) int y, u, v; y = ((47*r + 157*g + 16*b + 128) >> 8) + 16; - u = ((-26*r - 87*g + 112*b + 128) >> 8) + 128; + u = ((-26*r - 87*g + 113*b + 128) >> 8) + 128; v = ((112*r - 102*g - 10*b + 128) >> 8) + 128; return (y << 16) | (u << 8) | v;