diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 356a78f6e0..19f7d63c16 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -345,9 +345,9 @@ extern const FFCodec ff_utvideo_decoder;
 extern const FFCodec ff_v210_encoder;
 extern const FFCodec ff_v210_decoder;
 extern const FFCodec ff_v210x_decoder;
+#if FF_API_V408_CODECID
 extern const FFCodec ff_v308_encoder;
 extern const FFCodec ff_v308_decoder;
-#if FF_API_V408_CODECID
 extern const FFCodec ff_v408_encoder;
 extern const FFCodec ff_v408_decoder;
 #endif
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 6018052215..0e9cd669d2 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1477,6 +1477,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
+#if FF_API_V408_CODECID
     {
         .id        = AV_CODEC_ID_V308,
         .type      = AVMEDIA_TYPE_VIDEO,
@@ -1484,7 +1485,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
-#if FF_API_V408_CODECID
     {
         .id        = AV_CODEC_ID_V408,
         .type      = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index 0ab0f6761f..3608c4b856 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -254,8 +254,8 @@ enum AVCodecID {
     AV_CODEC_ID_012V,
     AV_CODEC_ID_AVUI,
     AV_CODEC_ID_TARGA_Y216,
-    AV_CODEC_ID_V308,
 #if FF_API_V408_CODECID
+    AV_CODEC_ID_V308,
     AV_CODEC_ID_V408,
 #endif
     AV_CODEC_ID_YUV4,
diff --git a/libavcodec/v308dec.c b/libavcodec/v308dec.c
index b591a79dd2..64876b7e5a 100644
--- a/libavcodec/v308dec.c
+++ b/libavcodec/v308dec.c
@@ -30,6 +30,8 @@ static av_cold int v308_decode_init(AVCodecContext *avctx)
     if (avctx->width & 1)
         av_log(avctx, AV_LOG_WARNING, "v308 requires width to be even.\n");
 
+    av_log(avctx, AV_LOG_WARNING, "This decoder is deprecated and will be removed.\n");
+
     return 0;
 }
 
diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index 68f9c3310b..2941ba3f03 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -33,6 +33,8 @@ static av_cold int v308_encode_init(AVCodecContext *avctx)
         return AVERROR_INVALIDDATA;
     }
 
+    av_log(avctx, AV_LOG_WARNING, "This encoder is deprecated and will be removed.\n");
+
     avctx->bits_per_coded_sample = 24;
     avctx->bit_rate = ff_guess_coded_bitrate(avctx);
 
diff --git a/libavformat/isom_tags.c b/libavformat/isom_tags.c
index d1b6b52db4..e999aa7fef 100644
--- a/libavformat/isom_tags.c
+++ b/libavformat/isom_tags.c
@@ -63,8 +63,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
     { AV_CODEC_ID_AVRP,   MKTAG('S', 'U', 'D', 'S') }, /* Avid DS Uncompressed */
     { AV_CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* uncompressed 10-bit 4:2:2 */
     { AV_CODEC_ID_V210,   MKTAG('b', 'x', 'y', '2') }, /* BOXX 10-bit 4:2:2 */
-    { AV_CODEC_ID_V308,   MKTAG('v', '3', '0', '8') }, /* uncompressed  8-bit 4:4:4 */
 #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 */
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index ea5221c87b..8f47e85490 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2615,8 +2615,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex
                            || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_VYU444)
                            || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_UYVA)
                            || (track->par->codec_id == AV_CODEC_ID_RAWVIDEO && track->par->format == AV_PIX_FMT_V30X)
-                           ||  track->par->codec_id == AV_CODEC_ID_V308
 #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
diff --git a/libavformat/riff.c b/libavformat/riff.c
index c1e48810b6..0f5682313e 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -305,8 +305,8 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_R210,         MKTAG('r', '2', '1', '0') },
     { AV_CODEC_ID_V210,         MKTAG('v', '2', '1', '0') },
     { AV_CODEC_ID_V210,         MKTAG('C', '2', '1', '0') },
-    { AV_CODEC_ID_V308,         MKTAG('v', '3', '0', '8') },
 #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') },
