From patchwork Wed Nov 30 18:16:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Giovara X-Patchwork-Id: 1614 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp514629vsa; Wed, 30 Nov 2016 10:29:59 -0800 (PST) X-Received: by 10.28.227.9 with SMTP id a9mr30952556wmh.85.1480530599566; Wed, 30 Nov 2016 10:29:59 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x65si8282723wma.4.2016.11.30.10.29.59; Wed, 30 Nov 2016 10:29:59 -0800 (PST) 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 9FC1A689F15; Wed, 30 Nov 2016 20:29:50 +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 0A435689EE1 for ; Wed, 30 Nov 2016 20:29:45 +0200 (EET) Received: by mail-qk0-f193.google.com with SMTP id h201so23011860qke.3 for ; Wed, 30 Nov 2016 10:29:51 -0800 (PST) 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=JoFhpYUaLMy4J2fRgJqWpCNKhASYzI7cA8W4JZ9G28c=; b=jnaiTEkgxWI14IDCmr4VfL0MRSgH/wyPxpJW8MAP8TDBdIk+L8miwa/jj9kRhkccES iibgR8jzhKGoGUNOls3DPBPb+RWK4YFbl2ZHa3UgWMEGoiLAgXbwafU6ZOGo4buTZ/jB 8ayIGf+aDVXA1oBYksu1vbGZVbBf0zkKLEsQljJv3ohMWi31QCdzioXqOsLhfDya4Q4q 4ejQIuq7gwFVUuJGbyniY1CWSN/Qr05K4iD9TOD1dT9rjzdJTLRNM0fcdwgHlxt6SMoV 2GtXsxPOgjMo3Slo6QSXxTKSO40xAdVNlKiYnVhTEjh+Ld51mOLsf0ALWZL+tuXuGA5m +CIA== 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=JoFhpYUaLMy4J2fRgJqWpCNKhASYzI7cA8W4JZ9G28c=; b=QAGBt2NTHe5FlONO5fUu7bM32nIEFebxi85ruvJuwkxsOW6qytA0bQw3tCLnYhCigg aXmhTAr4vkOnh2F0X/W47SS/OAlWjru67bvKfXW/ElEh9sVmFTpd6LzQEU23dy+loIsI Zo7zAkFURISN0zVCw8hppRMJnfAmKYAZizg2DUeYOBP2F+WqpiQgAUdCdvpO5rrTSWZa 0pm+vHPjT+pWYg622/3ew3JDqFY3sdjyEQ4aoMYeNoIaPd6UpXVUgdI8WyiOfQJljN1M xLJA7NqyPAWh3FN/8475lqaa8gbN/w8WQBVmGZWDfn1a9/Fx/wVRokvyEHxSbfclZxgy ATBQ== X-Gm-Message-State: AKaTC02L9sp5NXi5ozdEDy3PFm5JK+RL3EHJ+6kwOALd23l0KgUXEoCAoIKYwg45Dkg1iw== X-Received: by 10.55.209.90 with SMTP id s87mr28001106qki.99.1480529787847; Wed, 30 Nov 2016 10:16:27 -0800 (PST) Received: from vimacbookpro.vimeows.com (nyv-exweb.iac.com. [216.112.252.10]) by smtp.gmail.com with ESMTPSA id l135sm33994155qke.13.2016.11.30.10.16.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 Nov 2016 10:16:27 -0800 (PST) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Nov 2016 13:16:25 -0500 Message-Id: <20161130181625.34192-2-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161130181625.34192-1-vittorio.giovara@gmail.com> References: <20161130181625.34192-1-vittorio.giovara@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] vf_colorspace: Add support for jedec p22 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 --- (no I don't have samples, but the numbers should be correct) Please CC. Vittorio doc/filters.texi | 3 +++ libavfilter/vf_colorspace.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 4a4aeca..82d1047 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5424,6 +5424,9 @@ SMPTE-432 @item bt2020 BT.2020 +@item jedec-p22 +JEDEC P22 phosphors + @end table @anchor{range} diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 0024505..8daa8f9 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -282,6 +282,7 @@ static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB] = { [AVCOL_PRI_SMPTE432] = { WP_D65, 0.680, 0.320, 0.265, 0.690, 0.150, 0.060 }, [AVCOL_PRI_FILM] = { WP_C, 0.681, 0.319, 0.243, 0.692, 0.145, 0.049 }, [AVCOL_PRI_BT2020] = { WP_D65, 0.708, 0.292, 0.170, 0.797, 0.131, 0.046 }, + [AVCOL_PRI_JEDEC_P22] = { WP_D65, 0.630, 0.340, 0.290, 0.610, 0.160, 0.008 }, }; static const struct ColorPrimaries *get_color_primaries(enum AVColorPrimaries prm) @@ -1096,6 +1097,7 @@ static const AVOption colorspace_options[] = { ENUM("smpte431", AVCOL_PRI_SMPTE431, "prm"), ENUM("smpte432", AVCOL_PRI_SMPTE432, "prm"), ENUM("bt2020", AVCOL_PRI_BT2020, "prm"), + ENUM("jedec-p22", AVCOL_PRI_JEDEC_P22, "prm"), { "trc", "Output transfer characteristics", OFFSET(user_trc), AV_OPT_TYPE_INT, { .i64 = AVCOL_TRC_UNSPECIFIED },