Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3720296imj; Tue, 12 Feb 2019 03:35:21 -0800 (PST) X-Google-Smtp-Source: AHgI3IZX534V56Xkw5qCdMgdI/bzsK05ANF1Rc/BTeqkJ1/zqhGqaprqQOIG8Je8pesWwTNyzKBS X-Received: by 2002:a62:c302:: with SMTP id v2mr3533087pfg.155.1549971321907; Tue, 12 Feb 2019 03:35:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549971321; cv=none; d=google.com; s=arc-20160816; b=sE2QBhatHQY8BpEExSHhtuVtn8OFNrJj1r7nzM6U8Cm37spfi1InNxLnw7PTdbfSTt fDc8IT5hMUB8isLAurVnjKXUgYB/LMCGEaip0aPvwZT4eC2OaO9koM4z0lSBOtRXBbxp RHKrU24MhSBPx84ViWL4bz5y6YLiHbSz9gMm3gSfI6e+7Abo2VaNsHNFNDbO1+OgP6dm f9uOSE5IUoSaHnihTYqz84lOxQ0cQJT2pMiWqSoy6/1s30ebRC9DnMxkHwz0tV+9Vz1K 8xr4zyAR9yhBiRQJHXrMe5KFxvmqXgAMGd5DBFIlwyuykVedDrXw1esOBtx/Y2HY1gf2 98wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=mtJCjtm/mUDYnzAcCDMw5dUGJedpWI5F8Tbs949gP7c=; b=G8ONCvLyRmWsoQq+Qf7VGf2P8nC+ubaTih4AVFhbWtb27Ovm0M+6xGQvdJxf7plEkG 8nLGpATnQMUCCs0I8tLkom6rujxroXb9Kn3VCNO8XlA0wMF4GF7nio1NpTr4/QEGlA5T RIFDmvS3RnMpOFxK/tbc0tl8uPH51YsQ2ppKIbJlBYCD8t4aMUmf9pfJJHGjcB0boDkI Jybnf0oORewJXe8LCX19VlxBaOEOnhjNwY1rTvJ1pH6tas/gnPjdmt3rWZb533IDzVtp 3uYDVGOs0g8BxyG/BssYY7+S7Ojb9AyicqDxyN1PxVWxwMty9finL9rAxIwXH7C388R3 ZEmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si13197195pfj.45.2019.02.12.03.35.04; Tue, 12 Feb 2019 03:35:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728353AbfBLLed (ORCPT + 99 others); Tue, 12 Feb 2019 06:34:33 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:47467 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfBLLec (ORCPT ); Tue, 12 Feb 2019 06:34:32 -0500 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1gtWKX-0007GH-Ca; Tue, 12 Feb 2019 12:34:25 +0100 Message-ID: <1549971262.4800.5.camel@pengutronix.de> Subject: Re: [PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding From: Philipp Zabel To: Steve Longerbeam , linux-media@vger.kernel.org Cc: Tim Harvey , Mauro Carvalho Chehab , Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz , "open list:DRM DRIVERS FOR FREESCALE IMX" , open list , "open list:STAGING SUBSYSTEM" , "open list:FRAMEBUFFER LAYER" Date: Tue, 12 Feb 2019 12:34:22 +0100 In-Reply-To: <440e12af-33ea-5eac-e570-8afa74e3133c@gmail.com> References: <20190209014748.10427-1-slongerbeam@gmail.com> <20190209014748.10427-4-slongerbeam@gmail.com> <1549879951.7687.6.camel@pengutronix.de> <440e12af-33ea-5eac-e570-8afa74e3133c@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Mon, 2019-02-11 at 17:20 -0800, Steve Longerbeam wrote: [...] > > Should we support YUV BT.601 <-> YUV REC.709 conversions? That would > > require separate encodings for input and output. > > How about if we pass the input and output encodings to the init ic task > functions, but for now require they be the same? We can support > transcoding in a later series. [...] > Again, I think for now, just include input/output quantization but > require full range for RGB and limited range for YUV. Yes, that is fine. I'd just like to avoid unnecessary interface changes between ipu-v3 and imx-media. So if we have to change it right now, why not plan ahead. > But that really balloons the arguments to ipu_ic_task_init_*(). Should > we create an ipu_ic_task_init structure? I wonder if we should just expose struct ic_csc_params and provide a helper to fill it given colorspace and V4L2 encoding/quantization parameters. Something like: struct ipu_ic_csc_params csc; imx_media_init_ic_csc_params(&csc, in_cs, in_encoding, in_quantization, out_cs, out_encoding, out_quantization); ipu_ic_task_init(ic, in_width, in_height, out_width, out_height, &csc); // or ipu_ic_task_init_rsc(ic, rsc, &csc); regards Philipp