}
static void *
-create_vert_shader(struct vl_idct *idct, bool matrix_stage, int color_swizzle)
+create_vert_shader(struct vl_idct *idct, bool matrix_stage)
{
struct ureg_program *shader;
struct ureg_src vrect, vpos, vblock, eb;
}
static bool
-init_shaders(struct vl_idct *idct, int color_swizzle)
+init_shaders(struct vl_idct *idct)
{
- idct->matrix_vs = create_vert_shader(idct, true, color_swizzle);
+ idct->matrix_vs = create_vert_shader(idct, true);
if (!idct->matrix_vs)
goto error_matrix_vs;
if (!idct->matrix_fs)
goto error_matrix_fs;
- idct->transpose_vs = create_vert_shader(idct, false, color_swizzle);
+ idct->transpose_vs = create_vert_shader(idct, false);
if (!idct->transpose_vs)
goto error_transpose_vs;
bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe,
unsigned buffer_width, unsigned buffer_height,
unsigned blocks_x, unsigned blocks_y,
- int color_swizzle, struct pipe_sampler_view *matrix)
+ struct pipe_sampler_view *matrix)
{
assert(idct && pipe && matrix);
idct->blocks_y = blocks_y;
pipe_sampler_view_reference(&idct->matrix, matrix);
- if(!init_shaders(idct, color_swizzle))
+ if(!init_shaders(idct))
return false;
if(!init_state(idct)) {
bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe,
unsigned buffer_width, unsigned buffer_height,
unsigned blocks_x, unsigned blocks_y,
- int color_swizzle, struct pipe_sampler_view *matrix);
+ struct pipe_sampler_view *matrix);
/* destroy an idct instance */
void vl_idct_cleanup(struct vl_idct *idct);
goto error_idct_matrix;
if (!vl_idct_init(&ctx->idct_y, ctx->pipe, buffer_width, buffer_height,
- 2, 2, TGSI_SWIZZLE_X, idct_matrix))
+ 2, 2, idct_matrix))
goto error_idct_y;
if (ctx->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420) {
}
if(!vl_idct_init(&ctx->idct_c, ctx->pipe, chroma_width, chroma_height,
- chroma_blocks_x, chroma_blocks_y, TGSI_SWIZZLE_Y, idct_matrix))
+ chroma_blocks_x, chroma_blocks_y, idct_matrix))
goto error_idct_c;
pipe_sampler_view_reference(&idct_matrix, NULL);