Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/drivers/video/sunxi/disp/de_fe.c b/drivers/video/sunxi/disp/de_fe.c
- index 92799a0..d4966ba 100644
- --- a/drivers/video/sunxi/disp/de_fe.c
- +++ b/drivers/video/sunxi/disp/de_fe.c
- @@ -1382,10 +1382,15 @@ __s32 DE_SCAL_Set_CSC_Coef_Enhance(__u8 sel, __u8 in_csc_mode,
- __u32 i;
- __s32 sinv, cosv; /* sin_tab: 7 bit fractional */
- - bright = bright * 64 / 100;
- - bright = saturation * 64 / 100;
- - bright = contrast * 64 / 100;
- - bright = hue * 64 / 100;
- + bright = bright < 0 ? 0 : (bright > 100 ? 100);
- + saturation = saturation < 0 ? 0 : (saturation > 100 ? 100);
- + contrast = contrast < 0 ? 0 : (contrast > 100 ? 100);
- + hue = hue < 0 ? 0 : (hue > 100 ? 100);
- +
- + bright = DIV_ROUND_CLOSEST((bright * 63), 100);
- + saturation = DIV_ROUND_CLOSEST((saturation * 63), 100);
- + contrast = DIV_ROUND_CLOSEST((contrast * 63), 100);
- + hue = DIV_ROUND_CLOSEST((hue * 63), 100);
- sinv = image_enhance_tab[8 * 12 + (hue & 0x3f)];
- cosv = image_enhance_tab[8 * 12 + 8 * 8 + (hue & 0x3f)];
- --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement