[FFmpeg-cvslog] avcodec/vdpau: Remove deprecated av_vdpau_get_profile
Andreas Rheinhardt
git at videolan.org
Wed Apr 28 00:14:56 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Feb 26 05:52:36 2021 +0100| [af581cf79d317e798482a095faae781142633f49] | committer: James Almer
avcodec/vdpau: Remove deprecated av_vdpau_get_profile
Deprecated in b10b6ac7a902f28e09e37a29c392e2f0c19e9526.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af581cf79d317e798482a095faae781142633f49
---
libavcodec/vdpau.c | 49 -------------------------------------------------
libavcodec/vdpau.h | 19 -------------------
libavcodec/version.h | 3 ---
3 files changed, 71 deletions(-)
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index fa10905c75..f20dbd78e2 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -397,55 +397,6 @@ int ff_vdpau_add_buffer(struct vdpau_picture_context *pic_ctx,
return 0;
}
-#if FF_API_VDPAU_PROFILE
-int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile)
-{
-#define PROFILE(prof) \
-do { \
- *profile = VDP_DECODER_PROFILE_##prof; \
- return 0; \
-} while (0)
-
- switch (avctx->codec_id) {
- case AV_CODEC_ID_MPEG1VIDEO: PROFILE(MPEG1);
- case AV_CODEC_ID_MPEG2VIDEO:
- switch (avctx->profile) {
- case FF_PROFILE_MPEG2_MAIN: PROFILE(MPEG2_MAIN);
- case FF_PROFILE_MPEG2_SIMPLE: PROFILE(MPEG2_SIMPLE);
- default: return AVERROR(EINVAL);
- }
- case AV_CODEC_ID_H263: PROFILE(MPEG4_PART2_ASP);
- case AV_CODEC_ID_MPEG4:
- switch (avctx->profile) {
- case FF_PROFILE_MPEG4_SIMPLE: PROFILE(MPEG4_PART2_SP);
- case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: PROFILE(MPEG4_PART2_ASP);
- default: return AVERROR(EINVAL);
- }
- case AV_CODEC_ID_H264:
- switch (avctx->profile & ~FF_PROFILE_H264_INTRA) {
- case FF_PROFILE_H264_BASELINE: PROFILE(H264_BASELINE);
- case FF_PROFILE_H264_CONSTRAINED_BASELINE:
- case FF_PROFILE_H264_MAIN: PROFILE(H264_MAIN);
- case FF_PROFILE_H264_HIGH: PROFILE(H264_HIGH);
-#ifdef VDP_DECODER_PROFILE_H264_EXTENDED
- case FF_PROFILE_H264_EXTENDED: PROFILE(H264_EXTENDED);
-#endif
- default: return AVERROR(EINVAL);
- }
- case AV_CODEC_ID_WMV3:
- case AV_CODEC_ID_VC1:
- switch (avctx->profile) {
- case FF_PROFILE_VC1_SIMPLE: PROFILE(VC1_SIMPLE);
- case FF_PROFILE_VC1_MAIN: PROFILE(VC1_MAIN);
- case FF_PROFILE_VC1_ADVANCED: PROFILE(VC1_ADVANCED);
- default: return AVERROR(EINVAL);
- }
- }
- return AVERROR(EINVAL);
-#undef PROFILE
-}
-#endif /* FF_API_VDPAU_PROFILE */
-
AVVDPAUContext *av_vdpau_alloc_context(void)
{
return av_mallocz(sizeof(VDPAUHWContext));
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 4d99943369..3010094d93 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -55,7 +55,6 @@
#include "libavutil/attributes.h"
#include "avcodec.h"
-#include "version.h"
struct AVCodecContext;
struct AVFrame;
@@ -153,24 +152,6 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
*/
AVVDPAUContext *av_vdpau_alloc_context(void);
-#if FF_API_VDPAU_PROFILE
-/**
- * Get a decoder profile that should be used for initializing a VDPAU decoder.
- * Should be called from the AVCodecContext.get_format() callback.
- *
- * @deprecated Use av_vdpau_bind_context() instead.
- *
- * @param avctx the codec context being used for decoding the stream
- * @param profile a pointer into which the result will be written on success.
- * The contents of profile are undefined if this function returns
- * an error.
- *
- * @return 0 on success (non-negative), a negative AVERROR on failure.
- */
-attribute_deprecated
-int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
-#endif
-
/* @}*/
#endif /* AVCODEC_VDPAU_H */
diff --git a/libavcodec/version.h b/libavcodec/version.h
index a4638ca7fc..f4a5cb177e 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -54,9 +54,6 @@
#ifndef FF_API_CODED_FRAME
#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
-#ifndef FF_API_VDPAU_PROFILE
-#define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
#ifndef FF_API_AVPICTURE
#define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
More information about the ffmpeg-cvslog
mailing list