Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1989914imm; Thu, 7 Jun 2018 03:45:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGlNhS4OWWEQp9VVSFp6TyY+pFYopbrhdVrsKM2zgucGHv4Rc6jJfARckNkbX6exKIZJ8+ X-Received: by 2002:a17:902:7604:: with SMTP id k4-v6mr1452339pll.13.1528368303829; Thu, 07 Jun 2018 03:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528368303; cv=none; d=google.com; s=arc-20160816; b=1G69QMEH3D45ElG6OEPN1YDEIGCLlbfHlwscgI2DeVQe5SyFcxtVBbL7ErVLaAKub+ SW4EGadwbKymaJ3VBV5AYeix7uXYnlYmioaUmQsG9CQlyzm5i4fJqY1RISDLmjqCv+09 qpen1PRskkKjeO0b58bfXXo4Rk1WbLs1323FA11HxpYprEsl4GGL/ACqbVA+GgW+Sujv 0d9/GP8I66QifL7mbJCfloPJEBxlPAmG4HFjNHu2dus/9kbMwi8VSb+nBtVO7LERP+Y/ s1oLiOQQvrtjbn3+3D/oi2Eb6JgAtrJxd3NK+inPcZvR1EG8edEo+RWoP5aSBkUittJK P+/Q== 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 :arc-authentication-results; bh=udUoIDoT7iBn+ApW24g4+75szADtxgFu7occm3JWEm0=; b=j1TKWkD5TZdwbECfHSDeMf8a/O8peJw2lgvZj0xU+p3A5hmj9s0mdP+Hc3y3Ffq4tH EVsP8WpVSPNoEqVRgfzuVy2jU5rdpHa0Yd+/5J5FaQRWWeqjcN9vfwfnQKGeDI66UW8B +/+5FsFxMcfcE2mFz2w/+j9h73Vuh+ghvaFREHg20Hft1qIN4SlKcMJRtBsCc9DuqFn0 uvl3Rt82t+R0zfC5CHwZ4bwJCmGVUBDV6baYyi/QYk9rRbAtV+CoqH8Gb18bGoPWns6B 268oCvGUu8NRmLdGuV1v1AssuYYEtaXj4acxRp86IBP9UXxDIsK/tdNlHo09gLdDIGx9 zAIA== 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 x1-v6si12166614pgb.635.2018.06.07.03.44.48; Thu, 07 Jun 2018 03:45:03 -0700 (PDT) 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 S1753373AbeFGKch (ORCPT + 99 others); Thu, 7 Jun 2018 06:32:37 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:36045 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590AbeFGKcf (ORCPT ); Thu, 7 Jun 2018 06:32:35 -0400 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 1fQsDX-0001Gh-VA; Thu, 07 Jun 2018 12:32:31 +0200 Message-ID: <1528367543.3308.6.camel@pengutronix.de> Subject: Re: [RFC PATCH 2/2] media: docs-rst: Add encoder UAPI specification to Codec Interfaces From: Philipp Zabel To: Hans Verkuil , Tomasz Figa Cc: Pawel Osciak , Linux Media Mailing List , Linux Kernel Mailing List , Mauro Carvalho Chehab , Alexandre Courbot , kamil@wypas.org, a.hajda@samsung.com, Kyungmin Park , jtp.park@samsung.com, Tiffany Lin =?UTF-8?Q?=28=E6=9E=97=E6=85=A7=E7=8F=8A=29?= , Andrew-CT Chen =?UTF-8?Q?=28=E9=99=B3=E6=99=BA=E8=BF=AA=29?= , Stanimir Varbanov , todor.tomov@linaro.org, nicolas@ndufresne.ca, Paul Kocialkowski , Laurent Pinchart Date: Thu, 07 Jun 2018 12:32:23 +0200 In-Reply-To: <41fd04f2-fc44-1792-81e6-a3d4d384adc5@xs4all.nl> References: <20180605103328.176255-1-tfiga@chromium.org> <20180605103328.176255-3-tfiga@chromium.org> <1528199628.4074.15.camel@pengutronix.de> <1528208578.4074.19.camel@pengutronix.de> <1528278003.3438.3.camel@pengutronix.de> <41fd04f2-fc44-1792-81e6-a3d4d384adc5@xs4all.nl> 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 On Thu, 2018-06-07 at 09:27 +0200, Hans Verkuil wrote: [...] > > > > > I think it could be useful to enforce the same colorimetry on CAPTURE > > > > > and OUTPUT queue if the hardware doesn't do any colorspace conversion. > > > > > > > > After thinking a bit more on this, I guess it wouldn't overly > > > > complicate things if we require that the values from OUTPUT queue are > > > > copied to CAPTURE queue, if the stream doesn't include such > > > > information or the hardware just can't parse them. > > > > > > And for encoders it would be copied from CAPTURE queue to OUTPUT queue? > > > > > > > I guess iy would be from OUTPUT to CAPTURE for encoders as well, since > > the colorimetry of OUTPUT is ultimately defined by the raw frames that > > userspace is going to be feeding to the encoder. > > Correct. All mem2mem drivers should just copy the colorimetry from the > output buffers to the capture buffers, unless the decoder hardware is able to > extract that data from the stream, in which case it can overwrite it for > the capture buffer. > > Currently colorspace converters are not supported since the V4L2 API does > not provide a way to let userspace define colorimetry for the capture queue. Oh, I never realized this limitation [1] ... "Image colorspace, from enum v4l2_colorspace. This information supplements the pixelformat and must be set by the driver for capture streams and by the application for output streams, see Colorspaces." [1] https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-v4l2.html It's just a bit unintuitive that the initialization sequence requires to set S_FMT(CAP) first and then S_FMT(OUT) but with colorspace there is information that flows the opposite way. > I have a patch to add a new v4l2_format flag for that since forever, but > since we do not have any drivers that can do this in the kernel it has never > been upstreamed. Has this patch been posted some time? I think we could add a mem2mem device to imx-media with support for linear transformations. regards Philipp