From f41939a6e5c47cd1855ce2d04e532ed2e54f6914 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 18 Sep 2013 16:11:47 +0800 Subject: [PATCH] VPP: limit contrast to a small range on HSW It is just a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=69253. Signed-off-by: Xiang, Haihao --- src/gen75_vpp_vebox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gen75_vpp_vebox.c b/src/gen75_vpp_vebox.c index 50df627..bc9008e 100644 --- a/src/gen75_vpp_vebox.c +++ b/src/gen75_vpp_vebox.c @@ -353,6 +353,11 @@ void hsw_veb_iecp_pro_amp_table(VADriverContextP ctx, struct intel_vebox_context brightness = intel_format_convert(src_brightness, 7, 4, 1); }else if(attrib == VAProcColorBalanceContrast) { src_contrast = amp_params[i].value; // (0.0, 10.0) + + if (src_contrast > 1.0) { + src_contrast = 1.0 + (src_contrast - 1.0) / 9.0 * 0.1; + } + contrast = intel_format_convert(src_contrast, 4, 7, 0); } } -- 1.7.9.5