vdpau: set at least a basic csc matrix
authorChristian König <deathsimple@vodafone.de>
Tue, 12 Apr 2011 17:42:47 +0000 (19:42 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 12 Apr 2011 17:42:47 +0000 (19:42 +0200)
src/gallium/state_trackers/vdpau/mixer.c

index 2fe0f1ca6f46bfe804b05348920300462cea67a3..83cbf8abdb1adcba4a3e86b05c04022a8eb5fab5 100644 (file)
  **************************************************************************/
 
 #include <vdpau/vdpau.h>
+
 #include <util/u_memory.h>
 #include <util/u_debug.h>
+
+#include <vl/vl_csc.h>
+
 #include "vdpau_private.h"
 
 VdpStatus
@@ -42,6 +46,7 @@ vlVdpVideoMixerCreate(VdpDevice device,
    vlVdpVideoMixer *vmixer = NULL;
    struct pipe_video_context *context;
    VdpStatus ret;
+   float csc[16];
 
    debug_printf("[VDPAU] Creating VideoMixer\n");
 
@@ -58,6 +63,14 @@ vlVdpVideoMixerCreate(VdpDevice device,
    vmixer->device = dev;
    vmixer->compositor = context->create_compositor(context);
 
+   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
+   );
+   vmixer->compositor->set_csc_matrix(vmixer->compositor, csc);
+
    /*
     * TODO: Handle features and parameters
     * */