Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3
@ 2024-03-29  0:33 Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 2/4] avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace Jan Ekström
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jan Ekström @ 2024-03-29  0:33 UTC (permalink / raw)
  To: ffmpeg-devel

* 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.
---
 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 aa102b4925..296d87d8fb 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-03-27 - xxxxxxxxxx - lavu 59.11.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-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
   Add AVSideDataDescriptor, enum AVSideDataProps, and
   av_frame_side_data_desc().
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..430118d3e1 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
+    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 8774ed4d1a..d0cc34f43a 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  59
-#define LIBAVUTIL_VERSION_MINOR  10
+#define LIBAVUTIL_VERSION_MINOR  11
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
-- 
2.44.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [FFmpeg-devel] [PATCH 2/4] avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace
  2024-03-29  0:33 [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
@ 2024-03-29  0:33 ` Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 3/4] avfilter/{buffersrc, vf_setparams}: map IPT-C2, YCgCo-R variants Jan Ekström
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Jan Ekström @ 2024-03-29  0:33 UTC (permalink / raw)
  To: ffmpeg-devel

---
 libavcodec/options_table.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 7a2ef3474e..7a70fa7b6c 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -331,8 +331,11 @@ static const AVOption avcodec_options[] = {
 {"chroma-derived-nc", "Chroma-derived NCL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_CHROMA_DERIVED_NCL }, INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"chroma-derived-c",  "Chroma-derived CL",  0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_CHROMA_DERIVED_CL },  INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"ictcp",             "ICtCp",              0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_ICTCP },              INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
+{"ipt-c2",            "IPT-C2",             0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_IPT_C2 },             INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"unspecified",       "Unspecified",        0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_UNSPECIFIED },        INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"ycocg",             "YCGCO",              0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCGCO },              INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
+{"ycgco-re",          "YCgCo-R, even add.", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCGCO_RE },           INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
+{"ycgco-ro",          "YCgCo-R, odd add.",  0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCGCO_RO },           INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"bt2020_ncl",        "BT.2020 NCL",        0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_NCL },         INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"bt2020_cl",         "BT.2020 CL",         0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_CL },          INT_MIN, INT_MAX, V|E|D, .unit = "colorspace_type"},
 {"color_range", "color range", OFFSET(color_range), AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, INT_MAX, V|E|D, .unit = "color_range_type"},
-- 
2.44.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [FFmpeg-devel] [PATCH 3/4] avfilter/{buffersrc, vf_setparams}: map IPT-C2, YCgCo-R variants
  2024-03-29  0:33 [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 2/4] avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace Jan Ekström
@ 2024-03-29  0:33 ` Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 4/4] avcodec/libx265: do not arbitrarily limit color values Jan Ekström
  2024-03-29 18:32 ` [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
  3 siblings, 0 replies; 8+ messages in thread
From: Jan Ekström @ 2024-03-29  0:33 UTC (permalink / raw)
  To: ffmpeg-devel

---
 libavfilter/buffersrc.c    | 3 +++
 libavfilter/vf_setparams.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index ddcd403785..680eedf25b 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -337,12 +337,15 @@ static const AVOption buffer_options[] = {
     {   "smpte170m",   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE170M},         INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "smpte240m",   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE240M},         INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "ycgco",       NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO},             INT_MIN, INT_MAX, V, .unit = "colorspace"},
+    {   "ycgco-re",    NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO_RE},          INT_MIN, INT_MAX, V, .unit = "colorspace"},
+    {   "ycgco-ro",    NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO_RO},          INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "bt2020nc",    NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT2020_NCL},        INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "bt2020c",     NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT2020_CL},         INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "smpte2085",   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE2085},         INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "chroma-derived-nc",  NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_CHROMA_DERIVED_NCL},INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "chroma-derived-c",   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_CHROMA_DERIVED_CL}, INT_MIN, INT_MAX, V, .unit = "colorspace"},
     {   "ictcp",       NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_ICTCP},             INT_MIN, INT_MAX, V, .unit = "colorspace"},
+    {   "ipt-c2",      NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_IPT_C2},            INT_MIN, INT_MAX, V, .unit = "colorspace"},
     { "range", "select color range", OFFSET(color_range), AV_OPT_TYPE_INT, {.i64=AVCOL_RANGE_UNSPECIFIED}, 0, AVCOL_RANGE_NB-1, V, .unit = "range"},
     {   "unspecified", NULL,   0, AV_OPT_TYPE_CONST, {.i64=AVCOL_RANGE_UNSPECIFIED},  0, 0, V, .unit = "range"},
     {   "unknown",     NULL,   0, AV_OPT_TYPE_CONST, {.i64=AVCOL_RANGE_UNSPECIFIED},  0, 0, V, .unit = "range"},
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index c96f4d314b..b7da8eb54b 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -110,12 +110,15 @@ static const AVOption setparams_options[] = {
     {"smpte170m",                  NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE170M},         INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"smpte240m",                  NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE240M},         INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"ycgco",                      NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO},             INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
+    {"ycgco-re",                   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO_RE},          INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
+    {"ycgco-ro",                   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_YCGCO_RO},          INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"bt2020nc",                   NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT2020_NCL},        INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"bt2020c",                    NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT2020_CL},         INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"smpte2085",                  NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE2085},         INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"chroma-derived-nc",          NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_CHROMA_DERIVED_NCL},INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"chroma-derived-c",           NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_CHROMA_DERIVED_CL}, INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {"ictcp",                      NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_ICTCP},             INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
+    {"ipt-c2",                     NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_IPT_C2},            INT_MIN, INT_MAX, FLAGS, .unit = "colorspace"},
     {NULL}
 };
 
-- 
2.44.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [FFmpeg-devel] [PATCH 4/4] avcodec/libx265: do not arbitrarily limit color values
  2024-03-29  0:33 [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 2/4] avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace Jan Ekström
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 3/4] avfilter/{buffersrc, vf_setparams}: map IPT-C2, YCgCo-R variants Jan Ekström
@ 2024-03-29  0:33 ` Jan Ekström
  2024-03-29 18:32 ` [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
  3 siblings, 0 replies; 8+ messages in thread
From: Jan Ekström @ 2024-03-29  0:33 UTC (permalink / raw)
  To: ffmpeg-devel

Newer specifications such as H.273 have, and probably will further
in the future add new values to these, so - instead of trying to update
these limits - we should simply check if the values are not set to the
value of "unspecified".

This should allow newer avutil values such as IPT-C2 or YCgCo-R
variants be passed to x265 itself, which apparently does its own
validation further down the line.
---
 libavcodec/libx265.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index d3e74eaacf..43ab14bfee 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -315,12 +315,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
             avctx->pix_fmt == AV_PIX_FMT_YUVJ422P ||
             avctx->pix_fmt == AV_PIX_FMT_YUVJ444P;
 
-    if ((avctx->color_primaries <= AVCOL_PRI_SMPTE432 &&
-         avctx->color_primaries != AVCOL_PRI_UNSPECIFIED) ||
-        (avctx->color_trc <= AVCOL_TRC_ARIB_STD_B67 &&
-         avctx->color_trc != AVCOL_TRC_UNSPECIFIED) ||
-        (avctx->colorspace <= AVCOL_SPC_ICTCP &&
-         avctx->colorspace != AVCOL_SPC_UNSPECIFIED)) {
+    if (avctx->color_primaries != AVCOL_PRI_UNSPECIFIED ||
+        avctx->color_trc       != AVCOL_TRC_UNSPECIFIED ||
+        avctx->colorspace      != AVCOL_SPC_UNSPECIFIED) {
 
         ctx->params->vui.bEnableColorDescriptionPresentFlag = 1;
 
-- 
2.44.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3
  2024-03-29  0:33 [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
                   ` (2 preceding siblings ...)
  2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 4/4] avcodec/libx265: do not arbitrarily limit color values Jan Ekström
@ 2024-03-29 18:32 ` Jan Ekström
  2024-04-01 11:34   ` Jan Ekström
  3 siblings, 1 reply; 8+ messages in thread
From: Jan Ekström @ 2024-03-29 18:32 UTC (permalink / raw)
  To: ffmpeg-devel

On Fri, Mar 29, 2024 at 2:33 AM Jan Ekström <jeebjp@gmail.com> wrote:
>
> * 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.
> ---
>  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 aa102b4925..296d87d8fb 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-03-27 - xxxxxxxxxx - lavu 59.11.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-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
>    Add AVSideDataDescriptor, enum AVSideDataProps, and
>    av_frame_side_data_desc().
> 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..430118d3e1 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
> +    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
>  };

To aid in review as for whatever reason the 2023-09 H.273 v3 is not
yet publicly available (even though H.274 is from the same September
period), you can first of all see the summary in
https://www.itu.int/itu-t/workprog/wp_item.aspx?isn=18689 .

The latest related drafts from JVET-Experts
(https://jvet-experts.org/doc_end_user/all_meeting.php being the
index) are:
- CICP/H.273: JVET-AD1003 v2 from
https://jvet-experts.org/doc_end_user/current_document.php?id=12970
- H.265: JVET-AF1006 from
https://jvet-experts.org/doc_end_user/current_document.php?id=13584
- H.264: JVET-AE1016 from
https://jvet-experts.org/doc_end_user/current_document.php?id=13269

Given that H.273 v3 got registered for AAP on 2023-07-21 and that the
H.265 text is clearly from after the last call period of 2023-09-01 to
2023-09-28, I would consider them all matching being a pretty good
indicator that the value 15 got utilized for IPT-C2, and 16+17 for
YCgCo-R.

Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3
  2024-03-29 18:32 ` [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
@ 2024-04-01 11:34   ` Jan Ekström
  2024-04-02 17:58     ` Jan Ekström
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Ekström @ 2024-04-01 11:34 UTC (permalink / raw)
  To: ffmpeg-devel

On Fri, Mar 29, 2024 at 8:32 PM Jan Ekström <jeebjp@gmail.com> wrote:
>
> On Fri, Mar 29, 2024 at 2:33 AM Jan Ekström <jeebjp@gmail.com> wrote:
> >
> > * 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.
> > ---
> >  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 aa102b4925..296d87d8fb 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-03-27 - xxxxxxxxxx - lavu 59.11.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-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
> >    Add AVSideDataDescriptor, enum AVSideDataProps, and
> >    av_frame_side_data_desc().
> > 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..430118d3e1 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
> > +    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
> >  };
>
> To aid in review as for whatever reason the 2023-09 H.273 v3 is not
> yet publicly available (even though H.274 is from the same September
> period), you can first of all see the summary in
> https://www.itu.int/itu-t/workprog/wp_item.aspx?isn=18689 .
>
> The latest related drafts from JVET-Experts
> (https://jvet-experts.org/doc_end_user/all_meeting.php being the
> index) are:
> - CICP/H.273: JVET-AD1003 v2 from
> https://jvet-experts.org/doc_end_user/current_document.php?id=12970
> - H.265: JVET-AF1006 from
> https://jvet-experts.org/doc_end_user/current_document.php?id=13584
> - H.264: JVET-AE1016 from
> https://jvet-experts.org/doc_end_user/current_document.php?id=13269
>
> Given that H.273 v3 got registered for AAP on 2023-07-21 and that the
> H.265 text is clearly from after the last call period of 2023-09-01 to
> 2023-09-28, I would consider them all matching being a pretty good
> indicator that the value 15 got utilized for IPT-C2, and 16+17 for
> YCgCo-R.

Ping for this set.

Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3
  2024-04-01 11:34   ` Jan Ekström
@ 2024-04-02 17:58     ` Jan Ekström
  2024-04-03 19:08       ` Jan Ekström
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Ekström @ 2024-04-02 17:58 UTC (permalink / raw)
  To: ffmpeg-devel

On Mon, Apr 1, 2024 at 2:34 PM Jan Ekström <jeebjp@gmail.com> wrote:
>
> On Fri, Mar 29, 2024 at 8:32 PM Jan Ekström <jeebjp@gmail.com> wrote:
> >
> > On Fri, Mar 29, 2024 at 2:33 AM Jan Ekström <jeebjp@gmail.com> wrote:
> > >
> > > * 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.
> > > ---
> > >  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 aa102b4925..296d87d8fb 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-03-27 - xxxxxxxxxx - lavu 59.11.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-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
> > >    Add AVSideDataDescriptor, enum AVSideDataProps, and
> > >    av_frame_side_data_desc().
> > > 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..430118d3e1 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
> > > +    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
> > >  };
> >
> > To aid in review as for whatever reason the 2023-09 H.273 v3 is not
> > yet publicly available (even though H.274 is from the same September
> > period), you can first of all see the summary in
> > https://www.itu.int/itu-t/workprog/wp_item.aspx?isn=18689 .
> >
> > The latest related drafts from JVET-Experts
> > (https://jvet-experts.org/doc_end_user/all_meeting.php being the
> > index) are:
> > - CICP/H.273: JVET-AD1003 v2 from
> > https://jvet-experts.org/doc_end_user/current_document.php?id=12970
> > - H.265: JVET-AF1006 from
> > https://jvet-experts.org/doc_end_user/current_document.php?id=13584
> > - H.264: JVET-AE1016 from
> > https://jvet-experts.org/doc_end_user/current_document.php?id=13269
> >
> > Given that H.273 v3 got registered for AAP on 2023-07-21 and that the
> > H.265 text is clearly from after the last call period of 2023-09-01 to
> > 2023-09-28, I would consider them all matching being a pretty good
> > indicator that the value 15 got utilized for IPT-C2, and 16+17 for
> > YCgCo-R.
>
> Ping for this set.

Got an LGTM from James for the set on IRC, so unless there are
objections I will apply this tomorrow.

Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3
  2024-04-02 17:58     ` Jan Ekström
@ 2024-04-03 19:08       ` Jan Ekström
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Ekström @ 2024-04-03 19:08 UTC (permalink / raw)
  To: ffmpeg-devel

On Tue, Apr 2, 2024 at 8:58 PM Jan Ekström <jeebjp@gmail.com> wrote:
>
> On Mon, Apr 1, 2024 at 2:34 PM Jan Ekström <jeebjp@gmail.com> wrote:
> >
> > On Fri, Mar 29, 2024 at 8:32 PM Jan Ekström <jeebjp@gmail.com> wrote:
> > >
> > > On Fri, Mar 29, 2024 at 2:33 AM Jan Ekström <jeebjp@gmail.com> wrote:
> > > >
> > > > * 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.
> > > > ---
> > > >  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 aa102b4925..296d87d8fb 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-03-27 - xxxxxxxxxx - lavu 59.11.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-03-27 - xxxxxxxxxx - lavu 59.10.100 - frame.h
> > > >    Add AVSideDataDescriptor, enum AVSideDataProps, and
> > > >    av_frame_side_data_desc().
> > > > 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..430118d3e1 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
> > > > +    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
> > > >  };
> > >
> > > To aid in review as for whatever reason the 2023-09 H.273 v3 is not
> > > yet publicly available (even though H.274 is from the same September
> > > period), you can first of all see the summary in
> > > https://www.itu.int/itu-t/workprog/wp_item.aspx?isn=18689 .
> > >
> > > The latest related drafts from JVET-Experts
> > > (https://jvet-experts.org/doc_end_user/all_meeting.php being the
> > > index) are:
> > > - CICP/H.273: JVET-AD1003 v2 from
> > > https://jvet-experts.org/doc_end_user/current_document.php?id=12970
> > > - H.265: JVET-AF1006 from
> > > https://jvet-experts.org/doc_end_user/current_document.php?id=13584
> > > - H.264: JVET-AE1016 from
> > > https://jvet-experts.org/doc_end_user/current_document.php?id=13269
> > >
> > > Given that H.273 v3 got registered for AAP on 2023-07-21 and that the
> > > H.265 text is clearly from after the last call period of 2023-09-01 to
> > > 2023-09-28, I would consider them all matching being a pretty good
> > > indicator that the value 15 got utilized for IPT-C2, and 16+17 for
> > > YCgCo-R.
> >
> > Ping for this set.
>
> Got an LGTM from James for the set on IRC, so unless there are
> objections I will apply this tomorrow.

Applied set as:
29561c8e2d4ccecaa93afcaed73678e3f6011b0a
06c53efd233340762535957ad765ed4d9aafcddd
23d1b50175a6d07a0e2301ead347e4812c8c5dc8
16128f3c5595012719db7ae7851964d5a961c160

Small differences were that avutil got minor bumps so it went from
59.11 to 59.13, and after asking on IRC whether new values for
AVOptions should get a micro bump, I added those to avcodec and
avfilter. Additionally, a slight modification to a comment was made as
other comments also not only mentioned the spec but the format name as
well:

diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 430118d3e1..a7f50e1690 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -623,7 +623,7 @@ 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
+    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


Jan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-03 19:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29  0:33 [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 2/4] avcodec/options_table: map IPT-C2, YCgCo-R variants in colorspace Jan Ekström
2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 3/4] avfilter/{buffersrc, vf_setparams}: map IPT-C2, YCgCo-R variants Jan Ekström
2024-03-29  0:33 ` [FFmpeg-devel] [PATCH 4/4] avcodec/libx265: do not arbitrarily limit color values Jan Ekström
2024-03-29 18:32 ` [FFmpeg-devel] [PATCH 1/4] avutil/pix{desc, fmt}: add new matrix coefficients from H.273 v3 Jan Ekström
2024-04-01 11:34   ` Jan Ekström
2024-04-02 17:58     ` Jan Ekström
2024-04-03 19:08       ` Jan Ekström

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git