aboutsummaryrefslogtreecommitdiffstats
path: root/utils/common/v4l2-tpg-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/common/v4l2-tpg-core.c')
-rw-r--r--utils/common/v4l2-tpg-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/common/v4l2-tpg-core.c b/utils/common/v4l2-tpg-core.c
index 25b89245..372310af 100644
--- a/utils/common/v4l2-tpg-core.c
+++ b/utils/common/v4l2-tpg-core.c
@@ -767,7 +767,7 @@ static void precalculate_color(struct tpg_data *tpg, int k)
* Remember that r, g and b are still in the 0 - 0xff0 range.
*/
if (tpg->real_rgb_range == V4L2_DV_RGB_RANGE_LIMITED &&
- tpg->rgb_range == V4L2_DV_RGB_RANGE_FULL) {
+ tpg->rgb_range == V4L2_DV_RGB_RANGE_FULL && !tpg->is_yuv) {
/*
* Convert from full range (which is what r, g and b are)
* to limited range (which is the 'real' RGB range), which
@@ -777,7 +777,7 @@ static void precalculate_color(struct tpg_data *tpg, int k)
g = (g * 219) / 255 + (16 << 4);
b = (b * 219) / 255 + (16 << 4);
} else if (tpg->real_rgb_range != V4L2_DV_RGB_RANGE_LIMITED &&
- tpg->rgb_range == V4L2_DV_RGB_RANGE_LIMITED) {
+ tpg->rgb_range == V4L2_DV_RGB_RANGE_LIMITED && !tpg->is_yuv) {
/*
* Clamp r, g and b to the limited range and convert to full
* range since that's what we deliver.

Privacy Policy