summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/vdpau_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/libavcodec/vdpau_internal.h')
-rw-r--r--ffmpeg/libavcodec/vdpau_internal.h50
1 files changed, 46 insertions, 4 deletions
diff --git a/ffmpeg/libavcodec/vdpau_internal.h b/ffmpeg/libavcodec/vdpau_internal.h
index 790b3ef..cc63411 100644
--- a/ffmpeg/libavcodec/vdpau_internal.h
+++ b/ffmpeg/libavcodec/vdpau_internal.h
@@ -24,9 +24,17 @@
#ifndef AVCODEC_VDPAU_INTERNAL_H
#define AVCODEC_VDPAU_INTERNAL_H
+#include "config.h"
#include <stdint.h>
+#if CONFIG_VDPAU
+#include <vdpau/vdpau.h>
+#endif
#include "h264.h"
+
+#include "avcodec.h"
+#include "mpeg4video.h"
#include "mpegvideo.h"
+#include "version.h"
/** Extract VdpVideoSurface from a Picture */
static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
@@ -34,11 +42,45 @@ static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
return (uintptr_t)pic->f.data[3];
}
-int ff_vdpau_common_start_frame(AVCodecContext *avctx,
+#if CONFIG_VDPAU
+#if !FF_API_BUFS_VDPAU
+union AVVDPAUPictureInfo {
+ VdpPictureInfoH264 h264;
+ VdpPictureInfoMPEG1Or2 mpeg;
+ VdpPictureInfoVC1 vc1;
+ VdpPictureInfoMPEG4Part2 mpeg4;
+};
+#else
+#include "vdpau.h"
+#endif
+
+struct vdpau_picture_context {
+ /**
+ * VDPAU picture information.
+ */
+ union AVVDPAUPictureInfo info;
+
+ /**
+ * Allocated size of the bitstream_buffers table.
+ */
+ int bitstream_buffers_allocated;
+
+ /**
+ * Useful bitstream buffers in the bitstream buffers table.
+ */
+ int bitstream_buffers_used;
+
+ /**
+ * Table of bitstream buffers.
+ */
+ VdpBitstreamBuffer *bitstream_buffers;
+};
+#endif
+
+int ff_vdpau_common_start_frame(Picture *pic,
const uint8_t *buffer, uint32_t size);
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx);
-int ff_vdpau_add_buffer(AVCodecContext *avctx,
- const uint8_t *buf, uint32_t buf_size);
+int ff_vdpau_add_buffer(Picture *pic, const uint8_t *buf, uint32_t buf_size);
void ff_vdpau_add_data_chunk(uint8_t *data, const uint8_t *buf,
@@ -54,7 +96,7 @@ void ff_vdpau_h264_picture_complete(H264Context *h);
void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf,
int buf_size);
-void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf,
+void ff_vdpau_mpeg4_decode_picture(Mpeg4DecContext *s, const uint8_t *buf,
int buf_size);
#endif /* AVCODEC_VDPAU_INTERNAL_H */