From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7DB81AAA15 for ; Wed, 8 Jan 2025 19:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736364863; cv=none; b=ByjBPo6icU90Vcj+wjhvrkhkzTqBS46Q8n/SOtHPBRBD4Jisxh0XVKekvjIeD5z+vQIuoWFv2fw5VM9IFmVFeE8ocNI04DX0se/bSxjunO+gx0Dn10V130fNvRM4aD4zqsZFhziYy9ayeDfLGLVf1l7HIySk+mwtLLECa6ctn1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736364863; c=relaxed/simple; bh=AwXV8eOYa0jUUOJDLNlx4dV6qMMcao5DisevpgqObMQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Y86W2H7zcPQj4kxwn5twJ1ugj6v4cgBFxioq+snB0sOCjc2AffRk5lCt4vgQ2Wklgo4g2a+00r/AvHrPby3vOY+vXYQjqFvoN9N4iv6RdWhZtXRSbIDmY2nN42fgmvqNPrJCmRP/I/XzzdmbXnLPGNhvmOeUOdTTEQtQOdjKQtQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ndufresne.ca; spf=none smtp.mailfrom=ndufresne.ca; dkim=pass (2048-bit key) header.d=ndufresne-ca.20230601.gappssmtp.com header.i=@ndufresne-ca.20230601.gappssmtp.com header.b=17YehbF/; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ndufresne.ca Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ndufresne.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ndufresne-ca.20230601.gappssmtp.com header.i=@ndufresne-ca.20230601.gappssmtp.com header.b="17YehbF/" Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-4678cd314b6so612941cf.3 for ; Wed, 08 Jan 2025 11:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1736364861; x=1736969661; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=pZ8OaEnCblGa//gqGF016T+aNas0t6We2C1yQ9rLcFU=; b=17YehbF/Bs6nlGHH35N/VehGqAa6w4BTT0h9Eb96BvYB4iAA+xrsZkOnyF5J50QvvX ruWUTAudCM0Voi3rUZjsC3XXGY+mIAqmTkzM1vEASCxpHO02PCjRHb69jcLoo1fIvYNM ou6OhmK8GaZdCwYXR7bYOFfBMp1WfXwK6hSF44TU1I67YGfmHHwQitl1y+PDs7Jjjss8 606omRqulRmNL5GJcPYL2j9KllIVaNvhmxOrHeq2sSmiDUxWMKdOqjuMmdAKjhIAtfA2 7+ldbn/BlMr0U3bKMzqIjc74oHJJbLt/ZwbJsNPTkaHw+olFEKMZSU60hU60WV8HFBAX jn3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736364861; x=1736969661; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=pZ8OaEnCblGa//gqGF016T+aNas0t6We2C1yQ9rLcFU=; b=ZRx9SIA51SPrrQHPuWWZI+twVUgzwjhzJhEUJ/TWdvWDrhp44mvOsi1isnDlYWJhPS lH7xttcij2CcGl4l04oBIAIxPcVLWN/Qp5W3lYlLKpsT3cSXoo1x3JAuMiLiOVO0o6Xh aBp0ZoNZSRNDI6N+sTbEIVnxHmhaD2kANqJIQj8iC6TXEBeG/B6uwwujenRCUvQ1iHZi TYb66g+PzZUaLDq16evWvLlkRO89dcJSYmGC6xE1pvnSVjblCstsTac7+nQMX7EaCpE7 3W6LXxz0QG4Qk3tWk/gR2WcRdPXUQXodMGQB0wW5rhIsPiQT7O5OoFhAXRTyVn4B3v5T +R7Q== X-Forwarded-Encrypted: i=1; AJvYcCXzzKrLdeVNtvA3d3igi8hKW+8+9kphflO27l9176lokigZwKFmHYYb04Bl2MnGDpfEUigS9sXdE0ETMR4=@vger.kernel.org X-Gm-Message-State: AOJu0YzWGtvgldymec+4WHIqfSA1htTBHYs1MANLn60Xc6uyEcmbKurV fEr2OhU6Y3LrynLOoElY97fO89NpJMo6JXxYb10HKCB9xDKItuUXbwiuqXbPEd4= X-Gm-Gg: ASbGncvZEHYKZl432XWVuNSMg03Kp4t4MbLurcO2Vb2V2ufxfdNT/3birpt+f0c/zOk ZKTUaLhii8cjuQAf5y5/m4FcW0m0zyM16V8L7Afl4uZ8Aces4U7M1DMjODigYfwH48Kzcw+58v9 514MORirkaHDMocXkiL4g/0j/plgOr4i3bRYiIZhIS/iS4VJpm3ChrZW3aMDDKNrkr5bbixtEin kMuVNZ7naGqeeuZu4Ud72ZsGUYDEA6fjEi44aWM/X2bajlEobH6rmW73A== X-Google-Smtp-Source: AGHT+IHHoBOVEADoDwJ5SEc2bvPkTd9ig7fH6khIBw3ziijVw29fWtXY3bUiaQ9CQqXYbSXbLj0hfg== X-Received: by 2002:a05:622a:1792:b0:463:64b2:2e0d with SMTP id d75a77b69052e-46c7107a922mr65440061cf.40.1736364860717; Wed, 08 Jan 2025 11:34:20 -0800 (PST) Received: from nicolas-tpx395.localdomain ([2606:6d00:15:862e::7a9]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-46a3eb16c7bsm199636001cf.63.2025.01.08.11.34.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 11:34:20 -0800 (PST) Message-ID: Subject: Re: [PATCH] media: docs: dev-decoder: Trigger dynamic source change for colorspace From: Nicolas Dufresne To: Ming Qian , mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, imx@lists.linux.dev, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Wed, 08 Jan 2025 14:34:19 -0500 In-Reply-To: <20250107053622.1287461-1-ming.qian@oss.nxp.com> References: <20250107053622.1287461-1-ming.qian@oss.nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi, Le mardi 07 janvier 2025 =C3=A0 14:36 +0900, Ming Qian a =C3=A9crit=C2=A0: > If colorspace changes, the client needs to renegotiate the pipeline, > otherwise the decoded frame may not be displayed correctly. >=20 > If it can trigger an source change event, then client can switch to the > correct stream setting. And each frame can be displayed properly. >=20 > So add colorspace as a trigger parameter for dynamic resolution change. >=20 > Signed-off-by: Ming Qian > --- > Documentation/userspace-api/media/v4l/dev-decoder.rst | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/Documentation/userspace-api/media/v4l/dev-decoder.rst b/Docu= mentation/userspace-api/media/v4l/dev-decoder.rst > index ef8e8cf31f90..49566569ad26 100644 > --- a/Documentation/userspace-api/media/v4l/dev-decoder.rst > +++ b/Documentation/userspace-api/media/v4l/dev-decoder.rst > @@ -932,7 +932,9 @@ reflected by corresponding queries): > =20 > * the minimum number of buffers needed for decoding, > =20 > -* bit-depth of the bitstream has been changed. > +* bit-depth of the bitstream has been changed, > + > +* colorspace of the bitstream has been changed. Did you really mean colorspace in the way this term is used in V4L2 ? What = we want this event to be used for is when the capture storage size or amount changes, perhaps you mean when the capture pixelformat changes ? This will indeed happen if you change the bit-depth, subsampling (not mentioned here either) or change the way colors are repsented (RGB, YCbCr, etc.). > =20 > Whenever that happens, the decoder must proceed as follows: > =20