summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2009-10-01 22:01:18 -0400
committerYounes Manton <[email protected]>2009-10-01 22:52:59 -0400
commit62db9b21da6ccad6301feae9b90d53d46224c854 (patch)
tree71ee3d7f4c5f1c4cfef76f363985791cc44b4305 /src/gallium
parente00da1476fcdf8e5877fc1e62118080f5c4193f0 (diff)
st/xvmc: Set default CSC matrix to BT.601, no ProcAmp, full range RGB.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xorg/xvmc/context.c b/src/gallium/state_trackers/xorg/xvmc/context.c
index 6d90dfc367a..a002a7c8443 100644
--- a/src/gallium/state_trackers/xorg/xvmc/context.c
+++ b/src/gallium/state_trackers/xorg/xvmc/context.c
@@ -8,6 +8,7 @@
#include <vl_winsys.h>
#include <util/u_memory.h>
#include <util/u_debug.h>
+#include <vl/vl_csc.h>
#include "xvmc_private.h"
static Status Validate(Display *dpy, XvPortID port, int surface_type_id,
@@ -127,6 +128,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
struct pipe_screen *screen;
struct pipe_video_context *vpipe;
XvMCContextPrivate *context_priv;
+ float csc[16];
assert(dpy);
@@ -175,6 +177,15 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
return BadAlloc;
}
+ /* TODO: Define some Xv attribs to allow users to specify color standard, procamp */
+ vl_csc_get_matrix
+ (
+ debug_get_bool_option("G3DVL_NO_CSC", FALSE) ?
+ VL_CSC_COLOR_STANDARD_IDENTITY : VL_CSC_COLOR_STANDARD_BT_601,
+ NULL, true, csc
+ );
+ vpipe->set_csc_matrix(vpipe, csc);
+
context_priv->vpipe = vpipe;
context->context_id = XAllocID(dpy);