[FFmpeg-cvslog] avcodec: Remove deprecated old aliases for NVENC encoders
Andreas Rheinhardt
git at videolan.org
Wed Apr 28 00:15:05 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Feb 26 08:41:10 2021 +0100| [337f777f378cfcc0d6f0d01fb7125905e8b0da55] | committer: James Almer
avcodec: Remove deprecated old aliases for NVENC encoders
Deprecated in 888a5c794778a2f2aad22e9b4a3952dff92b11fa.
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=337f777f378cfcc0d6f0d01fb7125905e8b0da55
---
configure | 3 ---
libavcodec/Makefile | 3 ---
libavcodec/allcodecs.c | 6 -----
libavcodec/nvenc_h264.c | 69 -------------------------------------------------
libavcodec/nvenc_hevc.c | 37 --------------------------
libavcodec/version.h | 3 ---
6 files changed, 121 deletions(-)
diff --git a/configure b/configure
index cc1013fb1d..9cc9fa7816 100755
--- a/configure
+++ b/configure
@@ -3064,7 +3064,6 @@ overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm"
amf_deps_any="libdl LoadLibrary"
nvenc_deps="ffnvcodec"
nvenc_deps_any="libdl LoadLibrary"
-nvenc_encoder_deps="nvenc"
aac_mf_encoder_deps="mediafoundation"
ac3_mf_encoder_deps="mediafoundation"
@@ -3132,8 +3131,6 @@ mpeg4_omx_encoder_deps="omx"
mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m"
mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m"
msmpeg4_crystalhd_decoder_select="crystalhd"
-nvenc_h264_encoder_select="h264_nvenc_encoder"
-nvenc_hevc_encoder_select="hevc_nvenc_encoder"
vc1_crystalhd_decoder_select="crystalhd"
vc1_cuvid_decoder_deps="cuvid"
vc1_mmal_decoder_deps="mmal"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 05f5ec33e7..ccebb78ba3 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -373,8 +373,6 @@ OBJS-$(CONFIG_H264_MEDIACODEC_DECODER) += mediacodecdec.o
OBJS-$(CONFIG_H264_MF_ENCODER) += mfenc.o mf_utils.o
OBJS-$(CONFIG_H264_MMAL_DECODER) += mmaldec.o
OBJS-$(CONFIG_H264_NVENC_ENCODER) += nvenc_h264.o
-OBJS-$(CONFIG_NVENC_ENCODER) += nvenc_h264.o
-OBJS-$(CONFIG_NVENC_H264_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_H264_OMX_ENCODER) += omx.o
OBJS-$(CONFIG_H264_QSV_DECODER) += qsvdec.o
OBJS-$(CONFIG_H264_QSV_ENCODER) += qsvenc_h264.o
@@ -395,7 +393,6 @@ OBJS-$(CONFIG_HEVC_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_HEVC_MEDIACODEC_DECODER) += mediacodecdec.o
OBJS-$(CONFIG_HEVC_MF_ENCODER) += mfenc.o mf_utils.o
OBJS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc_hevc.o
-OBJS-$(CONFIG_NVENC_HEVC_ENCODER) += nvenc_hevc.o
OBJS-$(CONFIG_HEVC_QSV_DECODER) += qsvdec.o
OBJS-$(CONFIG_HEVC_QSV_ENCODER) += qsvenc_hevc.o hevc_ps_enc.o \
hevc_data.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 5a935c1a0e..92b5d120f3 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -27,7 +27,6 @@
#include "config.h"
#include "libavutil/thread.h"
#include "avcodec.h"
-#include "version.h"
extern AVCodec ff_a64multi_encoder;
extern AVCodec ff_a64multi5_encoder;
@@ -797,11 +796,6 @@ extern AVCodec ff_h264_qsv_encoder;
extern AVCodec ff_h264_v4l2m2m_encoder;
extern AVCodec ff_h264_vaapi_encoder;
extern AVCodec ff_h264_videotoolbox_encoder;
-#if FF_API_NVENC_OLD_NAME
-extern AVCodec ff_nvenc_encoder;
-extern AVCodec ff_nvenc_h264_encoder;
-extern AVCodec ff_nvenc_hevc_encoder;
-#endif
extern AVCodec ff_hevc_amf_encoder;
extern AVCodec ff_hevc_cuvid_decoder;
extern AVCodec ff_hevc_mediacodec_decoder;
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index 4c2585876e..ea7390cbf1 100644
--- a/libavcodec/nvenc_h264.c
+++ b/libavcodec/nvenc_h264.c
@@ -198,75 +198,6 @@ static const AVCodecDefault defaults[] = {
{ NULL },
};
-#if FF_API_NVENC_OLD_NAME
-
-static av_cold int nvenc_old_init(AVCodecContext *avctx)
-{
- av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated, use 'h264_nvenc' instead\n");
- return ff_nvenc_encode_init(avctx);
-}
-
-#if CONFIG_NVENC_ENCODER
-static const AVClass nvenc_class = {
- .class_name = "nvenc",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
-AVCodec ff_nvenc_encoder = {
- .name = "nvenc",
- .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_H264,
- .init = nvenc_old_init,
- .receive_packet = ff_nvenc_receive_packet,
- .close = ff_nvenc_encode_close,
- .flush = ff_nvenc_encode_flush,
- .priv_data_size = sizeof(NvencContext),
- .priv_class = &nvenc_class,
- .defaults = defaults,
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
- AV_CODEC_CAP_ENCODER_FLUSH,
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
- .pix_fmts = ff_nvenc_pix_fmts,
- .wrapper_name = "nvenc",
- .hw_configs = ff_nvenc_hw_configs,
-};
-#endif
-
-/* Add an alias for nvenc_h264 */
-#if CONFIG_NVENC_H264_ENCODER
-static const AVClass nvenc_h264_class = {
- .class_name = "nvenc_h264",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
-AVCodec ff_nvenc_h264_encoder = {
- .name = "nvenc_h264",
- .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_H264,
- .init = nvenc_old_init,
- .receive_packet = ff_nvenc_receive_packet,
- .close = ff_nvenc_encode_close,
- .flush = ff_nvenc_encode_flush,
- .priv_data_size = sizeof(NvencContext),
- .priv_class = &nvenc_h264_class,
- .defaults = defaults,
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
- AV_CODEC_CAP_ENCODER_FLUSH,
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
- .pix_fmts = ff_nvenc_pix_fmts,
- .wrapper_name = "nvenc",
- .hw_configs = ff_nvenc_hw_configs,
-};
-#endif
-
-#endif
-
static const AVClass h264_nvenc_class = {
.class_name = "h264_nvenc",
.item_name = av_default_item_name,
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index 441e7871d2..1aacec5f9c 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -179,43 +179,6 @@ static const AVCodecDefault defaults[] = {
{ NULL },
};
-#if FF_API_NVENC_OLD_NAME
-
-static av_cold int nvenc_old_init(AVCodecContext *avctx)
-{
- av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated, use 'hevc_nvenc' instead\n");
- return ff_nvenc_encode_init(avctx);
-}
-
-static const AVClass nvenc_hevc_class = {
- .class_name = "nvenc_hevc",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
-AVCodec ff_nvenc_hevc_encoder = {
- .name = "nvenc_hevc",
- .long_name = NULL_IF_CONFIG_SMALL("NVIDIA NVENC hevc encoder"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_HEVC,
- .init = nvenc_old_init,
- .receive_packet = ff_nvenc_receive_packet,
- .close = ff_nvenc_encode_close,
- .flush = ff_nvenc_encode_flush,
- .priv_data_size = sizeof(NvencContext),
- .priv_class = &nvenc_hevc_class,
- .defaults = defaults,
- .pix_fmts = ff_nvenc_pix_fmts,
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
- AV_CODEC_CAP_ENCODER_FLUSH,
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
- .wrapper_name = "nvenc",
- .hw_configs = ff_nvenc_hw_configs,
-};
-
-#endif
-
static const AVClass hevc_nvenc_class = {
.class_name = "hevc_nvenc",
.item_name = av_default_item_name,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 4c3adbbb10..f09d006268 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_NVENC_OLD_NAME
-#define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
#ifndef FF_API_STRUCT_VAAPI_CONTEXT
#define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
More information about the ffmpeg-cvslog
mailing list