xf86-video-intel: src/i830_tv.c

Zhenyu Wang zhen at kemper.freedesktop.org
Mon Mar 16 00:51:28 PDT 2009


 src/i830_tv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1a6e70cd98abc63f24f710819961c24601afb59b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Mar 16 10:19:39 2009 +0800

    TV: fix contrast and saturation for 945G
    
    Bug #20670.

diff --git a/src/i830_tv.c b/src/i830_tv.c
index 42d9e90..8eb3e26 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1079,7 +1079,7 @@ i830_tv_update_contrast(I830Ptr pI830, uint8_t contrast)
 	c = float_to_fix_2_6(con);
     } else {
 	/* 2.6 floating point */
-	con = 8.875 * ((float) contrast / 255);
+	con = 2.65625 * ((float) contrast / 255);
 	c = float_to_float_2_6(con);
     }
     val |= (c << TV_CONTRAST_SHIFT) & TV_CONTRAST_MASK;
@@ -1098,7 +1098,7 @@ i830_tv_update_saturation(I830Ptr pI830, uint8_t saturation)
 	sat = 3.0 * ((float) saturation / 255);
 	s = float_to_fix_2_6(sat);
     } else {
-	sat = 8.875 * ((float) saturation / 255);
+	sat = 2.65625 * ((float) saturation / 255);
 	s = float_to_float_2_6(sat);
     }
     val |= (s << TV_SATURATION_SHIFT) & TV_SATURATION_MASK;


More information about the xorg-commit mailing list