From: Christian König Date: Tue, 22 Mar 2011 20:52:06 +0000 (+0100) Subject: [g3dvl] buffers must be aligned to macroblock size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f08d3bb59b862e5e176af11303e5068fdfa2100b;p=mesa.git [g3dvl] buffers must be aligned to macroblock size --- diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.c b/src/gallium/auxiliary/vl/vl_mpeg12_context.c index 404a6c0c11d..73e2a950bd4 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_context.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_context.c @@ -740,8 +740,8 @@ vl_create_mpeg12_context(struct pipe_context *pipe, return NULL; } - ctx->buffer_width = pot_buffers ? util_next_power_of_two(width) : width; - ctx->buffer_height = pot_buffers ? util_next_power_of_two(height) : height; + ctx->buffer_width = pot_buffers ? util_next_power_of_two(width) : align(width, MACROBLOCK_WIDTH); + ctx->buffer_height = pot_buffers ? util_next_power_of_two(height) : align(height, MACROBLOCK_HEIGHT); if (!init_idct(ctx, ctx->buffer_width, ctx->buffer_height)) { ctx->pipe->destroy(ctx->pipe);