diff options
author | Hyesoo Yu <hyesoo.yu@samsung.com> | 2019-06-13 18:32:17 +0900 |
---|---|---|
committer | Cho KyongHo <pullip.cho@samsung.com> | 2020-02-24 18:21:34 -0800 |
commit | 25e86f1564fa93b1315f93bf02c6d33c864cfd5f (patch) | |
tree | e1f9556296f9aac01480e86b3c2a3b28708d9ad1 | |
parent | d6d2c232d143f1d5848b8a7af4d893d765488199 (diff) |
libacryl: change ycbcr conversion siting value
There is a color problem in case of color space conversion
of odd position. For YUV420 or YUV422, since each U or V sample
is used to two pixels horizontally, the odd position pixel
chroma is used as an even numbered chroma value.
Thus, we enable to interpolate two pixel to fix color change.
Change-Id: I21b60943eda2aa9cafead0198946292c0c2d8c83
Signed-off-by: Hyesoo Yu <hyesoo.yu@samsung.com>
-rw-r--r-- | libacryl/acrylic_g2d9810.cpp | 2 | ||||
-rw-r--r-- | libacryl/local_include/uapi/g2d9810.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libacryl/acrylic_g2d9810.cpp b/libacryl/acrylic_g2d9810.cpp index 326773b..4ab65f8 100644 --- a/libacryl/acrylic_g2d9810.cpp +++ b/libacryl/acrylic_g2d9810.cpp @@ -830,6 +830,8 @@ bool AcrylicCompositorG2D9810::executeG2D(int fence[], unsigned int num_fences, getCanvas().getDataspace(), &mTask.commands.target[G2DSFR_DST_YCBCRMODE]); + mTask.commands.target[G2DSFR_DST_YCBCRMODE] |= (G2D_LAYER_YCBCRMODE_OFFX | G2D_LAYER_YCBCRMODE_OFFY); + for (unsigned int i = baseidx; i < layercount; i++) { AcrylicLayer &layer = *getLayer(i - baseidx); diff --git a/libacryl/local_include/uapi/g2d9810.h b/libacryl/local_include/uapi/g2d9810.h index 1b36694..0fa4e2a 100644 --- a/libacryl/local_include/uapi/g2d9810.h +++ b/libacryl/local_include/uapi/g2d9810.h @@ -126,6 +126,8 @@ extern "C" { #define G2D_LAYERSEL_COLORFILL 1 #define G2D_LAYER_YCBCRMODE_WIDE (1 << 4) +#define G2D_LAYER_YCBCRMODE_OFFX (2 << 8) +#define G2D_LAYER_YCBCRMODE_OFFY (2 << 12) #define G2D_SCALECONTROL_BILINEAR 2 #define G2D_SCALEFACTOR_FRACBITS 16 |