summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-12-22 15:24:46 +0100
committerChristian König <[email protected]>2011-12-26 16:37:47 +0100
commit7ac114f94a8fac5fa7cc0e99bf6a3c03ec194650 (patch)
treeb3bbd6b14fde6cefbbb95f2780148699efb0da7a /src/gallium/state_trackers
parent3aa3c3f75894ca0eb08087c0ec3dd114eeae4bb7 (diff)
vl: call decode_bitstream only once
Submit all bitstreams at once to decode_bitstream. Signed-off-by: Christian König <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 47212e348ed..a5a01fb21a3 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -322,7 +322,6 @@ vlVdpDecoderRenderVC1(struct pipe_video_decoder *decoder,
{
struct pipe_vc1_picture_desc picture;
struct pipe_video_buffer *ref_frames[2] = {};
- unsigned i;
VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoding VC-1\n");
@@ -385,6 +384,8 @@ vlVdpDecoderRender(VdpDecoder decoder,
uint32_t bitstream_buffer_count,
VdpBitstreamBuffer const *bitstream_buffers)
{
+ const void * buffers[bitstream_buffer_count];
+ unsigned sizes[bitstream_buffer_count];
vlVdpDecoder *vldecoder;
vlVdpSurface *vlsurf;
VdpStatus ret;
@@ -435,9 +436,11 @@ vlVdpDecoderRender(VdpDecoder decoder,
return ret;
dec->begin_frame(dec);
- for (i = 0; i < bitstream_buffer_count; ++i)
- dec->decode_bitstream(dec, bitstream_buffers[i].bitstream_bytes,
- bitstream_buffers[i].bitstream);
+ for (i = 0; i < bitstream_buffer_count; ++i) {
+ buffers[i] = bitstream_buffers[i].bitstream;
+ sizes[i] = bitstream_buffers[i].bitstream_bytes;
+ }
+ dec->decode_bitstream(dec, bitstream_buffer_count, buffers, sizes);
dec->end_frame(dec);
return ret;
}