summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
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/auxiliary/vl
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/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c5
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h3
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_decoder.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
index 7e20d7177e4..bd1f091cd05 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
@@ -958,11 +958,12 @@ vl_mpg12_bs_set_picture_desc(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_
}
void
-vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_bytes, const uint8_t *buffer)
+vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_buffers,
+ const void * const *buffers, const unsigned *sizes)
{
assert(bs);
- vl_vlc_init(&bs->vlc, 1, (const void * const *)&buffer, &num_bytes);
+ vl_vlc_init(&bs->vlc, num_buffers, buffers, sizes);
while (vl_vlc_bits_left(&bs->vlc) > 32) {
uint32_t code = vl_vlc_peekbits(&bs->vlc, 32);
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h
index c3f14a17932..0ba7f4303e5 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h
@@ -49,6 +49,7 @@ void
vl_mpg12_bs_set_picture_desc(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc *picture);
void
-vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_bytes, const uint8_t *buffer);
+vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_buffers,
+ const void * const *buffers, const unsigned *sizes);
#endif /* vl_mpeg12_bitstream_h */
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 2442d784ecb..e502fc626f5 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -690,7 +690,9 @@ vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder,
static void
vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
- unsigned num_bytes, const void *data)
+ unsigned num_buffers,
+ const void * const *buffers,
+ const unsigned *sizes)
{
struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder;
struct vl_mpeg12_buffer *buf;
@@ -706,7 +708,7 @@ vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder,
vl_zscan_set_layout(&buf->zscan[i], dec->picture_desc.alternate_scan ?
dec->zscan_alternate : dec->zscan_normal);
- vl_mpg12_bs_decode(&buf->bs, num_bytes, data);
+ vl_mpg12_bs_decode(&buf->bs, num_buffers, buffers, sizes);
}
static void