public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	mripard@kernel.org, mchehab@kernel.org,
	gregkh@linuxfoundation.org, wens@csie.org, samuel@sholland.org,
	hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org,
	linux-staging@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/11] media: cedrus: Add helper for checking capabilities
Date: Tue, 25 Oct 2022 17:28:22 +0200	[thread overview]
Message-ID: <8131177.T7Z3S40VBb@jernej-laptop> (raw)
In-Reply-To: <Y1f/U8NxyJo/pMAH@aptenodytes>

Dne torek, 25. oktober 2022 ob 17:22:59 CEST je Paul Kocialkowski napisal(a):
> Hi Jernej,
> 
> On Tue 25 Oct 22, 17:17, Jernej Škrabec wrote:
> > Dne torek, 25. oktober 2022 ob 08:30:28 CEST je Dan Carpenter napisal(a):
> > > On Mon, Oct 24, 2022 at 10:15:08PM +0200, Jernej Skrabec wrote:
> > > > There is several different Cedrus cores with varying capabilities, so
> > > > some operations like listing formats depends on checks if feature is
> > > > supported or not.
> > > > 
> > > > Currently check for capabilities is only in format enumeration helper,
> > > > but it will be used also elsewhere later. Let's convert this check to
> > > > helper and while at it, also simplify it. There is no need to check if
> > > > capability mask is zero, condition will still work properly.
> > > 
> > > Sure.  That's true.  Out of curiousity, can
> > > cedrus_formats[i].capabilities
> > > be zero?  Because it feels like that's what should be checked.
> > 
> > Yes, it can be. It's the case for V4L2_PIX_FMT_NV12_32L32. All variants
> > supports it, so there is no special capability needed in order to be
> > listed. What would you check in such case? Condition still works for this
> > case.
> I think the problem is that (bits & 0) == 0 is always true.
> So if the input caps are 0, we need to make sure to return false.

No. If format (or any other) capabilities are 0, means they are supported by 
all variants and it's expected from cedrus_is_capable() to return true.

Regards,
Jernej



  reply	other threads:[~2022-10-25 15:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 20:15 [PATCH 00/11] media: cedrus: Format handling improvements and 10-bit HEVC support Jernej Skrabec
2022-10-24 20:15 ` [PATCH 01/11] media: cedrus: remove superfluous call Jernej Skrabec
2022-10-25 15:08   ` Paul Kocialkowski
2022-10-24 20:15 ` [PATCH 02/11] media: cedrus: Add format reset helpers Jernej Skrabec
2022-10-24 20:15 ` [PATCH 03/11] media: cedrus: use helper to set default formats Jernej Skrabec
2022-10-24 20:15 ` [PATCH 04/11] media: cedrus: Add helper for checking capabilities Jernej Skrabec
2022-10-25  6:30   ` Dan Carpenter
2022-10-25 15:17     ` Jernej Škrabec
2022-10-25 15:22       ` Paul Kocialkowski
2022-10-25 15:28         ` Jernej Škrabec [this message]
2022-10-25 15:35           ` Paul Kocialkowski
2022-10-24 20:15 ` [PATCH 05/11] media: cedrus: Filter controls based on capability Jernej Skrabec
2022-10-25 15:16   ` Paul Kocialkowski
2022-11-01 22:56   ` Jernej Škrabec
2022-10-24 20:15 ` [PATCH 06/11] media: cedrus: set codec ops immediately Jernej Skrabec
2022-10-25 14:59   ` Paul Kocialkowski
2022-10-24 20:15 ` [PATCH 07/11] media: cedrus: Remove cedrus_codec enum Jernej Skrabec
2022-10-25 15:03   ` Paul Kocialkowski
2022-10-24 20:15 ` [PATCH 08/11] media: cedrus: prefer untiled capture format Jernej Skrabec
2022-10-25 15:05   ` Paul Kocialkowski
2022-10-25 15:15     ` Jernej Škrabec
2022-10-24 20:15 ` [PATCH 09/11] media: cedrus: initialize controls a bit later Jernej Skrabec
2022-10-24 20:15 ` [PATCH 10/11] media: cedrus: Adjust buffer size based on control values Jernej Skrabec
2022-10-24 20:15 ` [PATCH 11/11] media: cedrus: h265: Support decoding 10-bit frames Jernej Skrabec
2022-10-25  6:55 ` [PATCH 00/11] media: cedrus: Format handling improvements and 10-bit HEVC support Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8131177.T7Z3S40VBb@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox