From patchwork Mon May 31 11:00:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Valerii Zapodovnikov X-Patchwork-Id: 28021 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2794442iof; Mon, 31 May 2021 04:30:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ1zXPrLvrp7haWavclfzIXtmnOc1/WY2FbBAh4z2eXkHOet6SSl+l1PfMbPmrcJFFub6V X-Received: by 2002:aa7:da94:: with SMTP id q20mr23818626eds.316.1622460656416; Mon, 31 May 2021 04:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622460656; cv=none; d=google.com; s=arc-20160816; b=meowVicJbT41dY306V7efC185InnpBZfKJO6KgOeAKbxPYxMMRSqQoAlku2yIgM0f8 J6ab9XU73CElKtNzQzLJg6yT1Ryt296mZ5+Ne7INI+EhTWIUM7GFTiRrASOEvXy1uohw UGgYPwu6o5of7SQJH4/nKhCTIzU9LZ0nUF3EcEW+78AC/ZeeRI/IHfTmyjlCOcdrgeik WMGFZl/F5Evv1WCZDtzXA/fMX0513LJg89NjEsa4W5V/I5J6booi8hWsMjCtNVGAMQI2 fWZ1+uTGtficLee5ysDk+6HywDUfhyBH1pxeul42VLdGi4Z3ltQNGj+DHLlGTOG7Pp2H BKFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=bgvkBdRK0ydWfH/4OUWsmY7vmRrabP6Yl0gg9OnCk5w=; b=x6/yXPOK9dnNh+JSx3mvDrVBVsegxTno1cS0ecPi9MMQFx3JVoQXXWBaxZtGSa3K8c GgeYB56bBYP48T+K0oVsA4ARaUgb4C8Ctt1K/kknUUJwzA3xrJuVUYpgyb3fAbVroHxq /90lCkHC/fCrlCUGN1Xxd/Yh30tShKWClzNrVq/pOGfDFIk1nSVYm2svCSOp4Kpkg9/K ZMM9uqFnT5B+fF4OStpXhXJ+giAxXjmxA3M2Vm+b6S8XeTybHEDnZatd+3B5Vhg4mGH6 Yy3evTqonTXUjczz4s2MVAWqIogUswdFaE2Iach1brZYCVXOm2diT8nOqVKqhvTfyEEW 8R4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cZTvUkKN; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p3si11618731edu.599.2021.05.31.04.30.55; Mon, 31 May 2021 04:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cZTvUkKN; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F42D680903; Mon, 31 May 2021 14:30:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4354E687F20 for ; Mon, 31 May 2021 14:30:45 +0300 (EEST) Received: by mail-wr1-f49.google.com with SMTP id v23so8240449wrd.10 for ; Mon, 31 May 2021 04:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Lo/0Y1gshXbJ2K3y/yQyWMIxcUvmW8mc0NblVgwvQIo=; b=cZTvUkKNn/gN1cLLXBbCXLTIOi7ZZlk/pO6fftsyYBorUxVmCR6Owhi5to1sbRC5r1 wocQdKUZdtbInV9f1iOtvWOMJAAyXuxCna3aJ2h/p1NSOhAvxFVY3TdH6lojetCHIcV1 Us2pvvbEKq3u8APHlwFy/sjXatHyDjbBQpXbSZaZ2HfrsJUZFd6xBc4EDsd3QLsyxzQX l7KgheEXnFh5AQkVtre+K+05NVJj1jTL15UOzNaV/rKDMvQi9GAYT/qXWxH2Cp1gOjPo IuwOxnow+Xc5JnK0LnTPtpFuXGRFZXycUPCSywF8Q8vqhCNoNRHuT11Or6uR8gR9B5F7 WDtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Lo/0Y1gshXbJ2K3y/yQyWMIxcUvmW8mc0NblVgwvQIo=; b=NnigAch+715lxi47tMlFTrepz8lmldlPccJ9erFqmaFztMn6CI0Fk2EA/sEOOq8QU2 6xRXzJw31qcv5Fp6f9JPp6sB0NulHNcp5UHmox/Rw3xWq8C+MRWXbko6ck/jBPKQe6Pa dQJmy2kSCapiV6CuRKcbBYUYfGjMAiz2p2LCqhB1ooh2WtqbY8XqrB4vxlO3EKWo2UdO WTXEj9t+cHICcsqKaffVcIeCm3oRNethceo3ZsNaJ7Y/nreJvDEFctpZbo1LVq2docNu bUMFaXGt9fZSvkilmccJWIgBacyVjRgT2XCRCDlcrVctfrld48w1DPRi2bndjeswKom5 hm0g== X-Gm-Message-State: AOAM532lhQ1oqVnSYPJIbox+IWY1rSrXBFhaxwuPdl9ecUYuCL3xPeAf NHD2KDtwEU8VY9NMnCII4CxLDMsoEMc5VIJYqFA= X-Received: by 2002:ac2:46cd:: with SMTP id p13mr14055516lfo.564.1622458828937; Mon, 31 May 2021 04:00:28 -0700 (PDT) Received: from localhost ([2a00:1370:812d:8d4d:8d84:163e:25b3:1177]) by smtp.gmail.com with ESMTPSA id d16sm382420lfq.152.2021.05.31.04.00.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 May 2021 04:00:28 -0700 (PDT) From: Valerii Zapodovnikov To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 May 2021 14:00:27 +0300 Message-Id: <20210531110027.358233-1-val.zapod.vz@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] pixfmt: fixed wrong fix of comment X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Xqaa3aDScMOe 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(-) 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) *