Module: Mesa Branch: master Commit: 900168284615e61e13b6511c655b29e9ddb025b3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=900168284615e61e13b6511c655b29e9ddb025b3
Author: Christian König <deathsim...@vodafone.de> Date: Wed Jan 25 13:58:57 2012 +0100 vl: add VL_MAX_SURFACES define Signed-off-by: Christian König <deathsim...@vodafone.de> --- src/gallium/auxiliary/vl/vl_defines.h | 1 + src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 3 ++- src/gallium/auxiliary/vl/vl_video_buffer.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_defines.h b/src/gallium/auxiliary/vl/vl_defines.h index ffbc653..6f20706 100644 --- a/src/gallium/auxiliary/vl/vl_defines.h +++ b/src/gallium/auxiliary/vl/vl_defines.h @@ -36,6 +36,7 @@ #define VL_BLOCK_HEIGHT 8 #define VL_NUM_COMPONENTS 3 +#define VL_MAX_SURFACES (VL_NUM_COMPONENTS * 2) #define VL_MAX_REF_FRAMES 2 #endif diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 78dfd69..31d96fd 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -683,6 +683,7 @@ vl_mpeg12_end_frame(struct pipe_video_decoder *decoder, unsigned nr_components; assert(dec && target && picture); + assert(!target->interlaced); buf = vl_mpeg12_get_decode_buffer(dec, target); @@ -734,7 +735,7 @@ vl_mpeg12_end_frame(struct pipe_video_decoder *decoder, plane_order = vl_video_buffer_plane_order(target->buffer_format); mc_source_sv = dec->mc_source->get_sampler_view_planes(dec->mc_source); - for (i = 0, component = 0; i < VL_NUM_COMPONENTS; ++i) { + for (i = 0, component = 0; component < VL_NUM_COMPONENTS; ++i) { if (!target_surfaces[i]) continue; nr_components = util_format_get_nr_components(target_surfaces[i]->texture->format); diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.h b/src/gallium/auxiliary/vl/vl_video_buffer.h index 16c2e31..6e2f8b8 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.h +++ b/src/gallium/auxiliary/vl/vl_video_buffer.h @@ -45,7 +45,7 @@ struct vl_video_buffer struct pipe_resource *resources[VL_NUM_COMPONENTS]; struct pipe_sampler_view *sampler_view_planes[VL_NUM_COMPONENTS]; struct pipe_sampler_view *sampler_view_components[VL_NUM_COMPONENTS]; - struct pipe_surface *surfaces[VL_NUM_COMPONENTS * 2]; + struct pipe_surface *surfaces[VL_MAX_SURFACES]; }; /** _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit