xf86-video-intel: src/i830_video.c
Eric Anholt
anholt at kemper.freedesktop.org
Tue Apr 8 12:45:35 PDT 2008
src/i830_video.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit af92f4f885c8eae2211d09080b2289aa5bab9ec1
Author: David Schleef <ds at schleef.org>
Date: Tue Apr 8 12:43:20 2008 -0700
Bug #15219: Fix default overlay CSC factors, and use BT709 if available.
Using the updated factors even when BT709 conversion isn't available
(non-965) should still give us better color reproduction. Tested on a
945GM, examining the +/-5% of black bars of videotestsrc.
diff --git a/src/i830_video.c b/src/i830_video.c
index 68bcc88..14dab8f 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -190,6 +190,9 @@ void exaMoveInPixmap (PixmapPtr pPixmap);
#define OVERLAY_PIPE_MASK (0x1<<18)
#define OVERLAY_PIPE_A (0x0<<18)
#define OVERLAY_PIPE_B (0x1<<18)
+#define GAMMA2_ENBL (0x1<<16)
+#define CSC_MODE_BT709 (0x1<<5)
+#define CSC_MODE_BT601 (0x0<<5)
#define THREE_LINE_BUFFERS (0x1<<0)
#define TWO_LINE_BUFFERS (0x0<<0)
@@ -704,6 +707,8 @@ I830ResetVideo(ScrnInfoPtr pScrn)
overlay->SCLRKVL = 0;
overlay->SCLRKEN = 0; /* source color key disable */
overlay->OCONFIG = CC_OUT_8BIT;
+ if (IS_I965GM(pI830))
+ overlay->OCONFIG |= CSC_MODE_BT709;
/*
* Select which pipe the overlay is enabled on.
@@ -880,9 +885,9 @@ I830SetupImageVideoOverlay(ScreenPtr pScreen)
pPriv->textured = FALSE;
pPriv->colorKey = pI830->colorKey & ((1 << pScrn->depth) - 1);
pPriv->videoStatus = 0;
- pPriv->brightness = 0;
- pPriv->contrast = 64;
- pPriv->saturation = 128;
+ pPriv->brightness = -19; /* (255/219) * -16 */
+ pPriv->contrast = 75; /* 255/219 * 64 */
+ pPriv->saturation = 146; /* 128/112 * 128 */
pPriv->current_crtc = NULL;
pPriv->desired_crtc = NULL;
pPriv->buf = NULL;
More information about the xorg-commit
mailing list