diff options
author | Christian König <[email protected]> | 2012-02-29 15:12:42 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-03-02 13:14:21 +0100 |
commit | 14766f820069ca987543918bce96410c481e5d20 (patch) | |
tree | fddc9d5ac54d9767c760cd6c93376c4dbc19c5b5 /src/gallium/auxiliary/vl/vl_compositor.c | |
parent | 74a4e9089488e7f341d21053bbf2d4aa52b99b70 (diff) |
vl/csc: simplify matrix handling
A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_compositor.c')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 94d937714ba..35958360e41 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -52,8 +52,6 @@ enum VS_OUTPUT VS_O_VBOTTOM, }; -typedef float csc_matrix[16]; - static void * create_vert_shader(struct vl_compositor *c) { @@ -804,7 +802,7 @@ vl_compositor_cleanup(struct vl_compositor *c) } void -vl_compositor_set_csc_matrix(struct vl_compositor_state *s, const float matrix[16]) +vl_compositor_set_csc_matrix(struct vl_compositor_state *s, vl_csc_matrix const *matrix) { struct pipe_transfer *buf_transfer; @@ -816,7 +814,7 @@ vl_compositor_set_csc_matrix(struct vl_compositor_state *s, const float matrix[1 PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, &buf_transfer), matrix, - sizeof(csc_matrix) + sizeof(vl_csc_matrix) ); pipe_buffer_unmap(s->pipe, buf_transfer); @@ -1052,7 +1050,7 @@ vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe) bool vl_compositor_init_state(struct vl_compositor_state *s, struct pipe_context *pipe) { - csc_matrix csc_matrix; + vl_csc_matrix csc_matrix; assert(s); @@ -1078,8 +1076,8 @@ vl_compositor_init_state(struct vl_compositor_state *s, struct pipe_context *pip vl_compositor_clear_layers(s); - vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_IDENTITY, NULL, true, csc_matrix); - vl_compositor_set_csc_matrix(s, csc_matrix); + vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_IDENTITY, NULL, true, &csc_matrix); + vl_compositor_set_csc_matrix(s, (const vl_csc_matrix *)&csc_matrix); return true; } |