summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2009-10-01 21:53:17 -0400
committerYounes Manton <[email protected]>2009-10-01 22:52:59 -0400
commite00da1476fcdf8e5877fc1e62118080f5c4193f0 (patch)
tree2ffc543f2c8dc702267fabc92ea1d186872f13b2 /src/gallium/drivers
parent81aa5d717bd0098608e9cc292b316293800c7e11 (diff)
g3dvl: Color space conv interface & vl impl.
Interface is pipe_video_context::set_csc_matrix(). vl_csc.h defines some helpers to generate CSC matrices based on one of the color standard and a user defined ProcAmp (brightness, contrast, saturation, hue).
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/softpipe/sp_video_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_video_context.c b/src/gallium/drivers/softpipe/sp_video_context.c
index 7e9136d8e09..00b4b7d5606 100644
--- a/src/gallium/drivers/softpipe/sp_video_context.c
+++ b/src/gallium/drivers/softpipe/sp_video_context.c
@@ -109,6 +109,15 @@ sp_mpeg12_set_decode_target(struct pipe_video_context *vpipe,
pipe_video_surface_reference(&ctx->decode_target, dt);
}
+static void sp_mpeg12_set_csc_matrix(struct pipe_video_context *vpipe, const float *mat)
+{
+ struct sp_mpeg12_context *ctx = (struct sp_mpeg12_context*)vpipe;
+
+ assert(vpipe);
+
+ vl_compositor_set_csc_matrix(&ctx->compositor, mat);
+}
+
static bool
init_pipe_state(struct sp_mpeg12_context *ctx)
{
@@ -211,6 +220,7 @@ sp_mpeg12_create(struct pipe_screen *screen, enum pipe_video_profile profile,
ctx->base.clear_surface = sp_mpeg12_clear_surface;
ctx->base.render_picture = sp_mpeg12_render_picture;
ctx->base.set_decode_target = sp_mpeg12_set_decode_target;
+ ctx->base.set_csc_matrix = sp_mpeg12_set_csc_matrix;
ctx->pipe = softpipe_create(screen);
if (!ctx->pipe) {