[FFmpeg-cvslog] avcodec: add vvc codec id and profiles

Nuo Mi git at videolan.org
Mon Jan 11 22:30:51 EET 2021


ffmpeg | branch: master | Nuo Mi <nuomi2021 at gmail.com> | Tue Jan 12 00:33:10 2021 +0800| [ebdd33086adc9899959840b616480c42c80653ce] | committer: James Almer

avcodec: add vvc codec id and profiles

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ebdd33086adc9899959840b616480c42c80653ce
---

 doc/APIchanges          | 3 +++
 libavcodec/avcodec.h    | 3 +++
 libavcodec/codec_desc.c | 8 ++++++++
 libavcodec/codec_id.h   | 2 ++
 libavcodec/profiles.c   | 6 ++++++
 libavcodec/profiles.h   | 1 +
 libavcodec/version.h    | 4 ++--
 7 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 6c1d73515a..bbf56a5385 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2021-01-11 - xxxxxxxxxx - lavc 58.116.100 - avcodec.h
+  Add FF_PROFILE_VVC_MAIN_10 and FF_PROFILE_VVC_MAIN_10_444.
+
 2020-xx-xx - xxxxxxxxxx - lavu 56.63.100 - video_enc_params.h
   Add AV_VIDEO_ENC_PARAMS_MPEG2
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1d3099d50a..fdb4276260 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1961,6 +1961,9 @@ typedef struct AVCodecContext {
 #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE          3
 #define FF_PROFILE_HEVC_REXT                        4
 
+#define FF_PROFILE_VVC_MAIN_10                      1
+#define FF_PROFILE_VVC_MAIN_10_444                 33
+
 #define FF_PROFILE_AV1_MAIN                         0
 #define FF_PROFILE_AV1_HIGH                         1
 #define FF_PROFILE_AV1_PROFESSIONAL                 2
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 14757bf31b..a7594f9004 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1426,6 +1426,14 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Microsoft Paint (MSP) version 2"),
         .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
     },
+    {
+        .id        = AV_CODEC_ID_VVC,
+        .type      = AVMEDIA_TYPE_VIDEO,
+        .name      = "vvc",
+        .long_name = NULL_IF_CONFIG_SMALL("H.266 / VVC (Versatile Video Coding)"),
+        .props     = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER,
+        .profiles  = NULL_IF_CONFIG_SMALL(ff_vvc_profiles),
+    },
     {
         .id        = AV_CODEC_ID_Y41P,
         .type      = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index 6133e03bb9..7a8a896bfe 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -244,6 +244,8 @@ enum AVCodecID {
     AV_CODEC_ID_PGX,
     AV_CODEC_ID_AVS3,
     AV_CODEC_ID_MSP2,
+    AV_CODEC_ID_VVC,
+#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
 
     AV_CODEC_ID_Y41P = 0x8000,
     AV_CODEC_ID_AVRP,
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index e59a3a5c12..7af7fbeb13 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -74,6 +74,12 @@ const AVProfile ff_h264_profiles[] = {
     { FF_PROFILE_UNKNOWN },
 };
 
+const AVProfile ff_vvc_profiles[] = {
+    { FF_PROFILE_VVC_MAIN_10,                   "Main 10" },
+    { FF_PROFILE_VVC_MAIN_10_444,               "Main 10 4:4:4" },
+    { FF_PROFILE_UNKNOWN },
+};
+
 const AVProfile ff_hevc_profiles[] = {
     { FF_PROFILE_HEVC_MAIN,                 "Main"                },
     { FF_PROFILE_HEVC_MAIN_10,              "Main 10"             },
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 6baaba5701..41a19aa9ad 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -61,6 +61,7 @@ extern const AVProfile ff_dca_profiles[];
 extern const AVProfile ff_dnxhd_profiles[];
 extern const AVProfile ff_h264_profiles[];
 extern const AVProfile ff_hevc_profiles[];
+extern const AVProfile ff_vvc_profiles[];
 extern const AVProfile ff_jpeg2000_profiles[];
 extern const AVProfile ff_mpeg2_video_profiles[];
 extern const AVProfile ff_mpeg4_video_profiles[];
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 5b92afe60a..1420439044 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,8 +28,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  58
-#define LIBAVCODEC_VERSION_MINOR 115
-#define LIBAVCODEC_VERSION_MICRO 102
+#define LIBAVCODEC_VERSION_MINOR 116
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list