Mesa (pipe-video): [g3dvl] buffers must be aligned to macroblock size

Christian König deathsimple at kemper.freedesktop.org
Thu Mar 24 20:25:41 UTC 2011


Module: Mesa
Branch: pipe-video
Commit: f08d3bb59b862e5e176af11303e5068fdfa2100b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f08d3bb59b862e5e176af11303e5068fdfa2100b

Author: Christian König <deathsimple at vodafone.de>
Date:   Tue Mar 22 21:52:06 2011 +0100

[g3dvl] buffers must be aligned to macroblock size

---

 src/gallium/auxiliary/vl/vl_mpeg12_context.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.c b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
index 404a6c0..73e2a95 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);




More information about the mesa-commit mailing list