[FFmpeg-devel] [PATCH 26/26] avcodec: deprecate v410 de/encoder

James Almer jamrial at gmail.com
Tue Oct 8 05:54:04 EEST 2024


The V30X pixel format was recently added, so this lavc workaround is no longer
needed.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/allcodecs.c  | 2 +-
 libavcodec/codec_desc.c | 2 ++
 libavcodec/codec_id.h   | 2 ++
 libavcodec/v410dec.c    | 2 ++
 libavcodec/v410enc.c    | 2 ++
 libavformat/isom_tags.c | 2 +-
 libavformat/movenc.c    | 2 +-
 libavformat/riff.c      | 2 +-
 8 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 19f7d63c16..d69e70a29b 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -350,9 +350,9 @@ extern const FFCodec ff_v308_encoder;
 extern const FFCodec ff_v308_decoder;
 extern const FFCodec ff_v408_encoder;
 extern const FFCodec ff_v408_decoder;
-#endif
 extern const FFCodec ff_v410_encoder;
 extern const FFCodec ff_v410_decoder;
+#endif
 extern const FFCodec ff_vb_decoder;
 extern const FFCodec ff_vbn_encoder;
 extern const FFCodec ff_vbn_decoder;
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 0e9cd669d2..2c03a466d6 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1146,6 +1146,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
+#if FF_API_V408_CODECID
     {
         .id        = AV_CODEC_ID_V410,
         .type      = AVMEDIA_TYPE_VIDEO,
@@ -1153,6 +1154,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
+#endif
     {
         .id        = AV_CODEC_ID_XWD,
         .type      = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index 3608c4b856..787313ffaf 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -206,7 +206,9 @@ enum AVCodecID {
     AV_CODEC_ID_BMV_VIDEO,
     AV_CODEC_ID_VBLE,
     AV_CODEC_ID_DXTORY,
+#if FF_API_V408_CODECID
     AV_CODEC_ID_V410,
+#endif
     AV_CODEC_ID_XWD,
     AV_CODEC_ID_CDXL,
     AV_CODEC_ID_XBM,
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index 04be830ad2..d3747c18e0 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -46,6 +46,8 @@ static av_cold int v410_decode_init(AVCodecContext *avctx)
         }
     }
 
+    av_log(avctx, AV_LOG_WARNING, "This decoder is deprecated and will be removed.\n");
+
     return 0;
 }
 
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index 89ee3a7278..78362ce453 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -37,6 +37,8 @@ static av_cold int v410_encode_init(AVCodecContext *avctx)
     avctx->bits_per_coded_sample = 32;
     avctx->bit_rate = ff_guess_coded_bitrate(avctx);
 
+    av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated and will be removed.\n");
+
     return 0;
 }
 
diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c
index e999aa7fef..a476efb8f1 100644
--- a/libavformat/isom_tags.c
+++ b/libavformat/isom_tags.c
@@ -66,8 +66,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
 #if FF_API_V408_CODECID
     { AV_CODEC_ID_V308,   MKTAG('v', '3', '0', '8') }, /* uncompressed  8-bit 4:4:4 */
     { AV_CODEC_ID_V408,   MKTAG('v', '4', '0', '8') }, /* uncompressed  8-bit 4:4:4:4 */
-#endif
     { AV_CODEC_ID_V410,   MKTAG('v', '4', '1', '0') }, /* uncompressed 10-bit 4:4:4 */
+#endif
     { AV_CODEC_ID_Y41P,   MKTAG('Y', '4', '1', 'P') }, /* uncompressed 12-bit 4:1:1 */
     { AV_CODEC_ID_YUV4,   MKTAG('y', 'u', 'v', '4') }, /* libquicktime packed yuv420p */
     { AV_CODEC_ID_TARGA_Y216, MKTAG('Y', '2', '1', '6') },
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8f47e85490..0291710762 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2618,8 +2618,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
 #if FF_API_V408_CODECID
                            ||  track->par->codec_id == AV_CODEC_ID_V308
                            ||  track->par->codec_id == AV_CODEC_ID_V408
-#endif
                            ||  track->par->codec_id == AV_CODEC_ID_V410
+#endif
                            ||  track->par->codec_id == AV_CODEC_ID_V210);
 
     avio_wb32(pb, 0); /* size */
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 0f5682313e..88c4d6cbe9 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -308,8 +308,8 @@ const AVCodecTag ff_codec_bmp_tags[] = {
 #if FF_API_V408_CODECID
     { AV_CODEC_ID_V308,         MKTAG('v', '3', '0', '8') },
     { AV_CODEC_ID_V408,         MKTAG('v', '4', '0', '8') },
-#endif
     { AV_CODEC_ID_V410,         MKTAG('v', '4', '1', '0') },
+#endif
     { AV_CODEC_ID_YUV4,         MKTAG('y', 'u', 'v', '4') },
     { AV_CODEC_ID_INDEO3,       MKTAG('I', 'V', '3', '1') },
     { AV_CODEC_ID_INDEO3,       MKTAG('I', 'V', '3', '2') },
-- 
2.46.2



More information about the ffmpeg-devel mailing list