From patchwork Sun Oct 30 07:07:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Giovara X-Patchwork-Id: 1229 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp1805984vsd; Sun, 30 Oct 2016 00:08:05 -0700 (PDT) X-Received: by 10.28.88.78 with SMTP id m75mr5930546wmb.26.1477811285914; Sun, 30 Oct 2016 00:08:05 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w130si18488408wmf.29.2016.10.30.00.08.05; Sun, 30 Oct 2016 00:08:05 -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; 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 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 BAB20689A6E; Sun, 30 Oct 2016 09:07:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A8741689A50 for ; Sun, 30 Oct 2016 09:07:47 +0200 (EET) Received: by mail-qk0-f193.google.com with SMTP id v138so5067288qka.2 for ; Sun, 30 Oct 2016 00:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=Fr0oIqZc6UfYeFE/xv9Wpl/NOZ44DWoq7IaMdv7F8cs=; b=cvfcGTVz+cUcFOp6e7wCiNRGBp2F38f/A+2if6CE1gyISttJjgd48inBnph57pDYYq 8a650yzZ8VgHI89kW/n0cSMBym1bW6lIOQykjKE+ct/ZOx1Jw5PVEUmUh9lxAKm4Ge1D kVpwNJRIFY/XMg9bj1+txW96CRkUwWRM901H+g6gvSM171+EzfSL/zUkWhmveXdNWMzp 9KeQCXZE46h2Yq722wRqAy/4IGnxhuWby+wu9ZB28kiSgWwObYLDE7q2AxTVuNzGMMN4 n9Im3Ve127ov9yBDKNk5NO+WWVIGF3EY41l+dZbSwXzz+G2S48lr04TYZc3GAGTpx5CC PXQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Fr0oIqZc6UfYeFE/xv9Wpl/NOZ44DWoq7IaMdv7F8cs=; b=JRjw2ItN2yY41nL7QoyycFct4ojojErJOxdRhm8plkxY388Hklu8JC17DkzcWREcQ4 xVArq7BZ2/Yydd4clM1pi0SBhqeFSXCICDOHYqAWKv5SQ7el2hLh6ujyrySaV3dZoBi5 9TuG97oM49ib1MCm0GQ8L9tHZr4iFfIwz1cwjg+p8mwbvJ8FJOFiSrgicexExbXILbBn YxnGpjxDIQy0wgGx3Fc4XDHcF3/TG8hrraix0iKAH2KWez3IrkMFzv6NyqLCGmNsUAqW KH4YYF7ZbkuGA0Gc7+AMHZw3jzwsdkNx4a0Vh3hYPLimDGqiEtYCpf4b+yro5OsBC0+8 L/EA== X-Gm-Message-State: ABUngveGztAkmrO7RnKr9GcVS2UrRCoKAKZE1zQVjkJNQVOsSz1Kk73a/IYTt2m+RVaIhg== X-Received: by 10.55.41.39 with SMTP id p39mr18434639qkh.245.1477811269865; Sun, 30 Oct 2016 00:07:49 -0700 (PDT) Received: from vimacbookpro.vimeows.com (cpe-24-193-79-62.nyc.res.rr.com. [24.193.79.62]) by smtp.gmail.com with ESMTPSA id d127sm10467457qkf.24.2016.10.30.00.07.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 30 Oct 2016 00:07:49 -0700 (PDT) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Sun, 30 Oct 2016 03:07:46 -0400 Message-Id: <20161030070746.37115-3-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161030070746.37115-1-vittorio.giovara@gmail.com> References: <20161030070746.37115-1-vittorio.giovara@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/3] vf_colorspace: Add support for smpte 431/432 (dci/display p3) primaries X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Vittorio Giovara --- I couldn't find any reference to the name of the whitepoint used for 431, so I came up with DCI, since it looks like it is only used there. Please CC. Vittorio libavfilter/vf_colorspace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 7e0bafa..4265aa1 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -56,6 +56,7 @@ enum Colorspace { enum Whitepoint { WP_D65, WP_C, + WP_DCI, WP_NB, }; @@ -268,6 +269,7 @@ static const struct TransferCharacteristics * static const struct WhitepointCoefficients whitepoint_coefficients[WP_NB] = { [WP_D65] = { 0.3127, 0.3290 }, [WP_C] = { 0.3100, 0.3160 }, + [WP_DCI] = { 0.3140, 0.3510 }, }; static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = { @@ -276,6 +278,8 @@ static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = { [AVCOL_PRI_BT470BG] = { WP_D65, 0.640, 0.330, 0.290, 0.600, 0.150, 0.060,}, [AVCOL_PRI_SMPTE170M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 }, [AVCOL_PRI_SMPTE240M] = { WP_D65, 0.630, 0.340, 0.310, 0.595, 0.155, 0.070 }, + [AVCOL_PRI_SMPTE431] = { WP_DCI, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 }, + [AVCOL_PRI_SMPTE432] = { WP_D65, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 }, [AVCOL_PRI_BT2020] = { WP_D65, 0.708, 0.292, 0.170, 0.797, 0.131, 0.046 }, }; @@ -1080,6 +1084,8 @@ static const AVOption colorspace_options[] = { ENUM("bt470bg", AVCOL_PRI_BT470BG, "prm"), ENUM("smpte170m", AVCOL_PRI_SMPTE170M, "prm"), ENUM("smpte240m", AVCOL_PRI_SMPTE240M, "prm"), + ENUM("smpte431", AVCOL_PRI_SMPTE431, "prm"), + ENUM("smpte432", AVCOL_PRI_SMPTE432, "prm"), ENUM("bt2020", AVCOL_PRI_BT2020, "prm"), { "trc", "Output transfer characteristics",