diff options
author | David Schleef <ds@schleef.org> | 2008-04-08 12:43:20 -0700 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-04-09 09:46:23 +0800 |
commit | b0f1fc70ff72413a5c591fa77144eae0df0735c6 (patch) | |
tree | d9a4e75efa2ab7b0013ecc346906b6c7391c3278 | |
parent | 24248097988775d62f6c416f2988e74d31c91cd0 (diff) |
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.
(cherry picked from commit af92f4f885c8eae2211d09080b2289aa5bab9ec1)
-rw-r--r-- | src/i830_video.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 68bcc88e..14dab8fd 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; |