diff mbox series

[FFmpeg-devel,v2] pixfmt: fixed wrong fix of comment

Message ID 20210531110027.358233-1-val.zapod.vz@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,v2] pixfmt: fixed wrong fix of comment | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Valerii Zapodovnikov May 31, 2021, 11 a.m. UTC
This mostly reverts 785bfb1d7bb8de567c3aac1d9cc369b55ac9fb7b.
But I also added some clarifications so that nobody mixes primaries
with matrix again. SMPTE 240 and 170 primaires are the same, while
matrix coeff. are different, because 240 is derived from 170's new
primaries and white point while 170 uses BT.601 derived from BT.470
System M (yes, with Illuminant C) a.k.a. NTSC 1953. Some nits too.
---
 libavutil/pixfmt.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Reto Kromer May 31, 2021, 11:51 a.m. UTC | #1
Valerii Zapodovnikov wrote:

>-  * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1.
>+  * These values match the ones defined by ISO/IEC 
>23001-8_2013 § 7.1 and ITU-T H.273.

FYI: ISO/IEC 23001-8:2016 has been withdrawn. Its information
can be found now in ISO/IEC 23091-1:2018, ISO/IEC 23091-2:2019
and ISO/IEC 23091-3:2018.
Valerii Zapodovnikov May 31, 2021, 12:12 p.m. UTC | #2
Will update (and fix another typo I missed, "primairies"). BTW, that is
what H.273 says!

"ITU-T H.273 (2016) was published as a twin text technically aligned with
ISO/IEC 23001-8:2016 and its Amendment 1. After ISO/IEC 23001-8:2016 was
split into three parts in 2019 and renumbered as ISO/IEC 23091 parts 1, 2
and 3, ITU-T H.273 remained technically aligned to ISO/IEC 23091-2:2019."

Anton Khirnov, since you should be reading, how did you allow for that
commit to go in the first place?? It is good that was just comment, and in
practice fffmpeg does do different stuff as can be checked with ffplay -vf
scale=in_color_matrix=smpte240m,format=gbrp (compared to bt601) and in the
code.

BTW, who knows how can I use git send-(gmail)email script to NOT use SMTP?
I do not want my ipv6 address revealed, that is how it works on gmail for
Android (that I am using RIGHT now) and on mail. google. com. But it is
revealed by git and iPhone sender (that is why I never use iPhone mailer,
ha).
Moritz Barsnick June 16, 2021, 9:45 a.m. UTC | #3
Hi Валерий,

On Mon, May 31, 2021 at 15:12:12 +0300, Валерий Заподовников wrote:
> BTW, who knows how can I use git send-(gmail)email script to NOT use SMTP?
> I do not want my ipv6 address revealed, that is how it works on gmail for
> Android (that I am using RIGHT now) and on mail. google. com. But it is
> revealed by git and iPhone sender (that is why I never use iPhone mailer,
> ha).

What would you use instead of SMTP to forward the message? (Will gmail
not expose the submitting IP address anyway?) Assuming you are on a
Unix-like system:

As far as I can tell from the documentation, you can tell
git-send-email to use your local command line "sendmail"
implementation - if that helps to not reveal whatever you are hiding,
and  also do your header rewriting and whatever:

> --smtp-server=<host>
>   [...] Alternatively it can specify a full pathname of a
>   sendmail-like program instead; the program must support the -i
>   option.

Cheers,
Moritz
diff mbox series

Patch

diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 30591133a4..75018418a9 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -443,25 +443,25 @@  enum AVPixelFormat {
 
 /**
   * Chromaticity coordinates of the source primaries.
-  * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1.
+  * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1 and ITU-T H.273.
   */
 enum AVColorPrimaries {
     AVCOL_PRI_RESERVED0   = 0,
-    AVCOL_PRI_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
+    AVCOL_PRI_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
     AVCOL_PRI_UNSPECIFIED = 2,
     AVCOL_PRI_RESERVED    = 3,
     AVCOL_PRI_BT470M      = 4,  ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
 
     AVCOL_PRI_BT470BG     = 5,  ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
     AVCOL_PRI_SMPTE170M   = 6,  ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
-    AVCOL_PRI_SMPTE240M   = 7,  ///< functionally identical to above
+    AVCOL_PRI_SMPTE240M   = 7,  ///< identical to above, also called "SMPTE C" even though it uses D65
     AVCOL_PRI_FILM        = 8,  ///< colour filters using Illuminant C
     AVCOL_PRI_BT2020      = 9,  ///< ITU-R BT2020
     AVCOL_PRI_SMPTE428    = 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ)
     AVCOL_PRI_SMPTEST428_1 = AVCOL_PRI_SMPTE428,
     AVCOL_PRI_SMPTE431    = 11, ///< SMPTE ST 431-2 (2011) / DCI P3
     AVCOL_PRI_SMPTE432    = 12, ///< SMPTE ST 432-1 (2010) / P3 D65 / Display P3
-    AVCOL_PRI_EBU3213     = 22, ///< EBU Tech. 3213-E / JEDEC P22 phosphors
+    AVCOL_PRI_EBU3213     = 22, ///< EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors
     AVCOL_PRI_JEDEC_P22   = AVCOL_PRI_EBU3213,
     AVCOL_PRI_NB                ///< Not part of ABI
 };
@@ -500,15 +500,15 @@  enum AVColorTransferCharacteristic {
  * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.3.
  */
 enum AVColorSpace {
-    AVCOL_SPC_RGB         = 0,  ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
-    AVCOL_SPC_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
+    AVCOL_SPC_RGB         = 0,  ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
+    AVCOL_SPC_BT709       = 1,  ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP177 Annex B
     AVCOL_SPC_UNSPECIFIED = 2,
-    AVCOL_SPC_RESERVED    = 3,
+    AVCOL_SPC_RESERVED    = 3,  ///< reserved for future use by ITU-T and ISO/IEC just like 15-255 are
     AVCOL_SPC_FCC         = 4,  ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
     AVCOL_SPC_BT470BG     = 5,  ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
-    AVCOL_SPC_SMPTE170M   = 6,  ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
-    AVCOL_SPC_SMPTE240M   = 7,  ///< functionally identical to above
-    AVCOL_SPC_YCGCO       = 8,  ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
+    AVCOL_SPC_SMPTE170M   = 6,  ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
+    AVCOL_SPC_SMPTE240M   = 7,  ///< derived from 170M primairies and D65 white point, 170M is derived from BT470 System M
+    AVCOL_SPC_YCGCO       = 8,  ///< used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
     AVCOL_SPC_YCOCG       = AVCOL_SPC_YCGCO,
     AVCOL_SPC_BT2020_NCL  = 9,  ///< ITU-R BT2020 non-constant luminance system
     AVCOL_SPC_BT2020_CL   = 10, ///< ITU-R BT2020 constant luminance system
@@ -530,9 +530,9 @@  enum AVColorSpace {
  * recommended, as it also defines the full range representation.
  *
  * Common definitions:
- *   - For RGB and luminance planes such as Y in YCbCr and I in ICtCp,
+ *   - For RGB and luma planes such as Y in YCbCr and I in ICtCp,
  *     'E' is the original value in range of 0.0 to 1.0.
- *   - For chrominance planes such as Cb,Cr and Ct,Cp, 'E' is the original
+ *   - For chroma planes such as Cb,Cr and Ct,Cp, 'E' is the original
  *     value in range of -0.5 to 0.5.
  *   - 'n' is the output bit depth.
  *   - For additional definitions such as rounding and clipping to valid n
@@ -544,13 +544,13 @@  enum AVColorRange {
     /**
      * Narrow or limited range content.
      *
-     * - For luminance planes:
+     * - For luma planes:
      *
      *       (219 * E + 16) * 2^(n-8)
      *
      *   F.ex. the range of 16-235 for 8 bits
      *
-     * - For chrominance planes:
+     * - For chroma planes:
      *
      *       (224 * E + 128) * 2^(n-8)
      *
@@ -561,13 +561,13 @@  enum AVColorRange {
     /**
      * Full range content.
      *
-     * - For RGB and luminance planes:
+     * - For RGB and luma planes:
      *
      *       (2^n - 1) * E
      *
      *   F.ex. the range of 0-255 for 8 bits
      *
-     * - For chrominance planes:
+     * - For chroma planes:
      *
      *       (2^n - 1) * E + 2^(n - 1)
      *