[FFmpeg-cvslog] avutil/pix{desc,fmt}: add new matrix coefficients from H.273 v3

Jan Ekström git at videolan.org
Wed Apr 3 22:04:18 EEST 2024


ffmpeg | branch: master | Jan Ekström <jeebjp at gmail.com> | Fri Mar 29 00:42:10 2024 +0200| [29561c8e2d4ccecaa93afcaed73678e3f6011b0a] | committer: Jan Ekström

avutil/pix{desc,fmt}: add new matrix coefficients from H.273 v3

* SMPTE ST 2128 IPT-C2 defines the coefficients utilized in DoVi
  Profile 5. Profile 5 can thus now be represented in VUI as
  {AVCOL_RANGE_JPEG, AVCOL_PRI_BT2020, AVCOL_TRC_SMPTE2084,
   AVCOL_SPC_IPT_C2, AVCHROMA_LOC_LEFT} (although other chroma
  sample locations are allowed). AVCOL_TRC_SMPTE2084 should in
  this case be interpreted as 'PQ with reshaping'.
* YCgCo-Re and YCgCo-Ro define the bitexact YCgCo-R, where the
  number of bits added to a source RGB bit depth is 2 (i.e., even)
  and 1 (i.e., odd), respectively.

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

 doc/APIchanges      | 4 ++++
 libavutil/pixdesc.c | 3 +++
 libavutil/pixfmt.h  | 3 +++
 libavutil/version.h | 2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 7eda1321cb..0a39b6d7ab 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07
 
 API changes, most recent first:
 
+2024-04-03 - xxxxxxxxxx - lavu 59.13.100 - pixfmt.h
+  Add AVCOL_SPC_IPT_C2, AVCOL_SPC_YCGCO_RE and AVCOL_SPC_YCGCO_RO
+  to map new matrix coefficients defined by H.273 v3.
+
 2024-04-xx - xxxxxxxxxx - lavu 59.12.100 - dovi_meta.h
   Add AVDOVIMetadata.ext_block_{offset,size}, AVDOVIMetadata.num_ext_blocks,
   AVDOVIDmData and AVDOVIDmLevel{1..6,8..11,254..255}, av_dovi_get_ext()
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 9c708520b1..1c0bcf2232 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -2854,6 +2854,9 @@ static const char * const color_space_names[] = {
     [AVCOL_SPC_CHROMA_DERIVED_NCL] = "chroma-derived-nc",
     [AVCOL_SPC_CHROMA_DERIVED_CL] = "chroma-derived-c",
     [AVCOL_SPC_ICTCP] = "ictcp",
+    [AVCOL_SPC_IPT_C2] = "ipt-c2",
+    [AVCOL_SPC_YCGCO_RE] = "ycgco-re",
+    [AVCOL_SPC_YCGCO_RO] = "ycgco-ro",
 };
 
 static const char * const chroma_location_names[] = {
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 4aa20e4e58..a7f50e1690 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -623,6 +623,9 @@ enum AVColorSpace {
     AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant luminance system
     AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant luminance system
     AVCOL_SPC_ICTCP       = 14, ///< ITU-R BT.2100-0, ICtCp
+    AVCOL_SPC_IPT_C2      = 15, ///< SMPTE ST 2128, IPT-C2
+    AVCOL_SPC_YCGCO_RE    = 16, ///< YCgCo-R, even addition of bits
+    AVCOL_SPC_YCGCO_RO    = 17, ///< YCgCo-R, odd addition of bits
     AVCOL_SPC_NB                ///< Not part of ABI
 };
 
diff --git a/libavutil/version.h b/libavutil/version.h
index 1ed4090e96..da1a833255 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  12
+#define LIBAVUTIL_VERSION_MINOR  13
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list