Mesa (master): g3dvl: change picture parameter of decode_bitstream to general version

Christian König deathsimple at kemper.freedesktop.org
Fri Jul 15 08:46:42 UTC 2011


Module: Mesa
Branch: master
Commit: 13da00f07c35d78b7ba8bc5d30e8c4b0b001744c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13da00f07c35d78b7ba8bc5d30e8c4b0b001744c

Author: Christian König <deathsimple at vodafone.de>
Date:   Thu Jul 14 19:37:02 2011 +0200

g3dvl: change picture parameter of decode_bitstream to general version

Using pipe_mpeg12_picture_desc was unintentional here.

---

 src/gallium/auxiliary/vl/vl_mpeg12_decoder.c |    8 +++++---
 src/gallium/include/pipe/p_video_decoder.h   |    2 +-
 src/gallium/state_trackers/vdpau/decode.c    |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 5b214b8..61d947c 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -380,10 +380,12 @@ vl_mpeg12_buffer_get_mv_stream(struct pipe_video_decode_buffer *buffer, int ref_
 static void
 vl_mpeg12_buffer_decode_bitstream(struct pipe_video_decode_buffer *buffer,
                                   unsigned num_bytes, const void *data,
-                                  struct pipe_mpeg12_picture_desc *picture,
+                                  struct pipe_picture_desc *picture,
                                   unsigned num_ycbcr_blocks[3])
 {
    struct vl_mpeg12_buffer *buf = (struct vl_mpeg12_buffer*)buffer;
+   struct pipe_mpeg12_picture_desc *pic = (struct pipe_mpeg12_picture_desc *)picture;
+   
    struct vl_mpeg12_decoder *dec;
    unsigned i;
 
@@ -393,9 +395,9 @@ vl_mpeg12_buffer_decode_bitstream(struct pipe_video_decode_buffer *buffer,
    assert(dec);
 
    for (i = 0; i < VL_MAX_PLANES; ++i)
-      vl_zscan_set_layout(&buf->zscan[i], picture->alternate_scan ? dec->zscan_alternate : dec->zscan_normal);
+      vl_zscan_set_layout(&buf->zscan[i], pic->alternate_scan ? dec->zscan_alternate : dec->zscan_normal);
 
-   vl_mpg12_bs_decode(&buf->bs, num_bytes, data, picture, num_ycbcr_blocks);
+   vl_mpg12_bs_decode(&buf->bs, num_bytes, data, pic, num_ycbcr_blocks);
 }
 
 static void
diff --git a/src/gallium/include/pipe/p_video_decoder.h b/src/gallium/include/pipe/p_video_decoder.h
index deda992..f063d8f 100644
--- a/src/gallium/include/pipe/p_video_decoder.h
+++ b/src/gallium/include/pipe/p_video_decoder.h
@@ -121,7 +121,7 @@ struct pipe_video_decode_buffer
     */
    void (*decode_bitstream)(struct pipe_video_decode_buffer *decbuf,
                             unsigned num_bytes, const void *data,
-                            struct pipe_mpeg12_picture_desc *picture,
+                            struct pipe_picture_desc *picture,
                             unsigned num_ycbcr_blocks[3]);
 
    /**
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 0696278..269c7a4 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -215,7 +215,7 @@ vlVdpDecoderRenderMpeg2(struct pipe_video_decoder *decoder,
 
    for (i = 0; i < bitstream_buffer_count; ++i)
       buffer->decode_bitstream(buffer, bitstream_buffers[i].bitstream_bytes,
-                               bitstream_buffers[i].bitstream, &picture, num_ycbcr_blocks);
+                               bitstream_buffers[i].bitstream, &picture.base, num_ycbcr_blocks);
 
    buffer->end_frame(buffer);
 




More information about the mesa-commit mailing list