diff options
author | Emeric <[email protected]> | 2011-07-18 15:17:25 +0000 |
---|---|---|
committer | Christian König <[email protected]> | 2011-07-25 19:22:35 +0200 |
commit | 7746b7d4bf48b75dd273510e7a6ad6405c91b8bb (patch) | |
tree | 40b7b95412dd313bb1229f7167a7509fa1c28b3f /src/gallium/state_trackers | |
parent | 4f90b89961ea2795f274611266b649803a058026 (diff) |
vdpau: enable mpeg1 hw decoding, using the exact same code path as mpeg2
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39307
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vdpau/decode.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 269c7a4baf8..96542f874d9 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -161,12 +161,12 @@ vlVdpDecoderGetParameters(VdpDecoder decoder, } static VdpStatus -vlVdpDecoderRenderMpeg2(struct pipe_video_decoder *decoder, - struct pipe_video_decode_buffer *buffer, - struct pipe_video_buffer *target, - VdpPictureInfoMPEG1Or2 *picture_info, - uint32_t bitstream_buffer_count, - VdpBitstreamBuffer const *bitstream_buffers) +vlVdpDecoderRenderMpeg12(struct pipe_video_decoder *decoder, + struct pipe_video_decode_buffer *buffer, + struct pipe_video_buffer *target, + VdpPictureInfoMPEG1Or2 *picture_info, + uint32_t bitstream_buffer_count, + VdpBitstreamBuffer const *bitstream_buffers) { struct pipe_mpeg12_picture_desc picture; struct pipe_video_buffer *ref_frames[2]; @@ -254,17 +254,18 @@ vlVdpDecoderRender(VdpDecoder decoder, // TODO: Recreate decoder with correct chroma return VDP_STATUS_INVALID_CHROMA_TYPE; - // TODO: Right now only mpeg2 is supported. + // TODO: Right now only mpeg 1 & 2 is supported. switch (vldecoder->decoder->profile) { + case PIPE_VIDEO_PROFILE_MPEG1: case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE: case PIPE_VIDEO_PROFILE_MPEG2_MAIN: ++vldecoder->cur_buffer; vldecoder->cur_buffer %= VL_NUM_DECODE_BUFFERS; - return vlVdpDecoderRenderMpeg2(vldecoder->decoder, - vldecoder->buffer[vldecoder->cur_buffer], - vlsurf->video_buffer, - (VdpPictureInfoMPEG1Or2 *)picture_info, - bitstream_buffer_count,bitstream_buffers); + return vlVdpDecoderRenderMpeg12(vldecoder->decoder, + vldecoder->buffer[vldecoder->cur_buffer], + vlsurf->video_buffer, + (VdpPictureInfoMPEG1Or2 *)picture_info, + bitstream_buffer_count,bitstream_buffers); break; default: |