[FFmpeg-cvslog] lavc: move vdpau decoders under FF_API_VDPAU.
wm4
git at videolan.org
Tue Aug 18 22:06:06 CEST 2015
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Mon Aug 17 17:05:34 2015 -0400| [a383f226f02b969b72d6b286af21d0fcd38ca98a] | committer: Ronald S. Bultje
lavc: move vdpau decoders under FF_API_VDPAU.
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a383f226f02b969b72d6b286af21d0fcd38ca98a
---
libavcodec/allcodecs.c | 10 ++++++++++
libavcodec/h264.c | 2 +-
libavcodec/mpeg12dec.c | 8 ++++----
libavcodec/mpeg4videodec.c | 2 +-
libavcodec/vc1dec.c | 4 ++--
libavcodec/vdpau.c | 8 ++++----
6 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 04a83d4..d4ae497 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -190,7 +190,9 @@ void avcodec_register_all(void)
REGISTER_DECODER(H264_MMAL, h264_mmal);
REGISTER_DECODER(H264_QSV, h264_qsv);
REGISTER_DECODER(H264_VDA, h264_vda);
+#if FF_API_VDPAU
REGISTER_DECODER(H264_VDPAU, h264_vdpau);
+#endif
REGISTER_ENCDEC (HAP, hap);
REGISTER_DECODER(HEVC, hevc);
REGISTER_DECODER(HEVC_QSV, hevc_qsv);
@@ -227,10 +229,14 @@ void avcodec_register_all(void)
REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
REGISTER_ENCDEC (MPEG4, mpeg4);
REGISTER_DECODER(MPEG4_CRYSTALHD, mpeg4_crystalhd);
+#if FF_API_VDPAU
REGISTER_DECODER(MPEG4_VDPAU, mpeg4_vdpau);
+#endif
REGISTER_DECODER(MPEGVIDEO, mpegvideo);
+#if FF_API_VDPAU
REGISTER_DECODER(MPEG_VDPAU, mpeg_vdpau);
REGISTER_DECODER(MPEG1_VDPAU, mpeg1_vdpau);
+#endif
REGISTER_DECODER(MPEG2_CRYSTALHD, mpeg2_crystalhd);
REGISTER_DECODER(MPEG2_QSV, mpeg2_qsv);
REGISTER_DECODER(MSA1, msa1);
@@ -311,7 +317,9 @@ void avcodec_register_all(void)
REGISTER_DECODER(VBLE, vble);
REGISTER_DECODER(VC1, vc1);
REGISTER_DECODER(VC1_CRYSTALHD, vc1_crystalhd);
+#if FF_API_VDPAU
REGISTER_DECODER(VC1_VDPAU, vc1_vdpau);
+#endif
REGISTER_DECODER(VC1IMAGE, vc1image);
REGISTER_DECODER(VC1_QSV, vc1_qsv);
REGISTER_DECODER(VCR1, vcr1);
@@ -331,7 +339,9 @@ void avcodec_register_all(void)
REGISTER_ENCDEC (WMV2, wmv2);
REGISTER_DECODER(WMV3, wmv3);
REGISTER_DECODER(WMV3_CRYSTALHD, wmv3_crystalhd);
+#if FF_API_VDPAU
REGISTER_DECODER(WMV3_VDPAU, wmv3_vdpau);
+#endif
REGISTER_DECODER(WMV3IMAGE, wmv3image);
REGISTER_DECODER(WNV1, wnv1);
REGISTER_DECODER(XAN_WC3, xan_wc3);
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1b29c8c..907943e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1996,7 +1996,7 @@ AVCodec ff_h264_decoder = {
.priv_class = &h264_class,
};
-#if CONFIG_H264_VDPAU_DECODER
+#if CONFIG_H264_VDPAU_DECODER && FF_API_VDPAU
static const AVClass h264_vdpau_class = {
.class_name = "H264 VDPAU Decoder",
.item_name = av_default_item_name,
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index bd8ccfd..4f60a1c 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1186,7 +1186,7 @@ static const enum AVPixelFormat mpeg1_hwaccel_pixfmt_list_420[] = {
#if CONFIG_MPEG1_XVMC_HWACCEL
AV_PIX_FMT_XVMC,
#endif
-#if CONFIG_MPEG1_VDPAU_DECODER
+#if CONFIG_MPEG1_VDPAU_DECODER && FF_API_VDPAU
AV_PIX_FMT_VDPAU_MPEG1,
#endif
#if CONFIG_MPEG1_VDPAU_HWACCEL
@@ -1200,7 +1200,7 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
#if CONFIG_MPEG2_XVMC_HWACCEL
AV_PIX_FMT_XVMC,
#endif
-#if CONFIG_MPEG_VDPAU_DECODER
+#if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU
AV_PIX_FMT_VDPAU_MPEG2,
#endif
#if CONFIG_MPEG2_VDPAU_HWACCEL
@@ -2954,7 +2954,7 @@ AVCodec ff_mpeg_xvmc_decoder = {
#endif
#endif /* FF_API_XVMC */
-#if CONFIG_MPEG_VDPAU_DECODER
+#if CONFIG_MPEG_VDPAU_DECODER && FF_API_VDPAU
AVCodec ff_mpeg_vdpau_decoder = {
.name = "mpegvideo_vdpau",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video (VDPAU acceleration)"),
@@ -2970,7 +2970,7 @@ AVCodec ff_mpeg_vdpau_decoder = {
};
#endif
-#if CONFIG_MPEG1_VDPAU_DECODER
+#if CONFIG_MPEG1_VDPAU_DECODER && FF_API_VDPAU
AVCodec ff_mpeg1_vdpau_decoder = {
.name = "mpeg1video_vdpau",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"),
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 3cb0c38..f15747f 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2789,7 +2789,7 @@ AVCodec ff_mpeg4_decoder = {
};
-#if CONFIG_MPEG4_VDPAU_DECODER
+#if CONFIG_MPEG4_VDPAU_DECODER && FF_API_VDPAU
static const AVClass mpeg4_vdpau_class = {
"MPEG4 Video VDPAU Decoder",
av_default_item_name,
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 7b96ede..93019ea 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1156,7 +1156,7 @@ AVCodec ff_wmv3_decoder = {
};
#endif
-#if CONFIG_WMV3_VDPAU_DECODER
+#if CONFIG_WMV3_VDPAU_DECODER && FF_API_VDPAU
AVCodec ff_wmv3_vdpau_decoder = {
.name = "wmv3_vdpau",
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"),
@@ -1172,7 +1172,7 @@ AVCodec ff_wmv3_vdpau_decoder = {
};
#endif
-#if CONFIG_VC1_VDPAU_DECODER
+#if CONFIG_VC1_VDPAU_DECODER && FF_API_VDPAU
AVCodec ff_vc1_vdpau_decoder = {
.name = "vc1_vdpau",
.long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"),
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 62d9960..7cb8ad2 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -358,6 +358,7 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx,
/* Obsolete non-hwaccel VDPAU support below... */
+#if CONFIG_H264_VDPAU_DECODER && FF_API_VDPAU
void ff_vdpau_h264_set_reference_frames(H264Context *h)
{
struct vdpau_render_state *render, *render_ref;
@@ -443,7 +444,6 @@ void ff_vdpau_add_data_chunk(uint8_t *data, const uint8_t *buf, int buf_size)
render->bitstream_buffers_used++;
}
-#if CONFIG_H264_VDPAU_DECODER
void ff_vdpau_h264_picture_start(H264Context *h)
{
struct vdpau_render_state *render;
@@ -506,7 +506,7 @@ void ff_vdpau_h264_picture_complete(H264Context *h)
}
#endif /* CONFIG_H264_VDPAU_DECODER */
-#if CONFIG_MPEG_VDPAU_DECODER || CONFIG_MPEG1_VDPAU_DECODER
+#if (CONFIG_MPEG_VDPAU_DECODER || CONFIG_MPEG1_VDPAU_DECODER) && FF_API_VDPAU
void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf,
int buf_size, int slice_count)
{
@@ -565,7 +565,7 @@ void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf,
}
#endif /* CONFIG_MPEG_VDPAU_DECODER || CONFIG_MPEG1_VDPAU_DECODER */
-#if CONFIG_VC1_VDPAU_DECODER
+#if CONFIG_VC1_VDPAU_DECODER && FF_API_VDPAU
void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf,
int buf_size)
{
@@ -636,7 +636,7 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf,
}
#endif /* (CONFIG_VC1_VDPAU_DECODER */
-#if CONFIG_MPEG4_VDPAU_DECODER
+#if CONFIG_MPEG4_VDPAU_DECODER && FF_API_VDPAU
void ff_vdpau_mpeg4_decode_picture(Mpeg4DecContext *ctx, const uint8_t *buf,
int buf_size)
{
More information about the ffmpeg-cvslog
mailing list