linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Jonas Karlman <jonas@kwiboo.se>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Keiichi Watanabe <keiichiw@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tomasz Figa <tfiga@chromium.org>,
	Smitha T Murthy <smitha.t@samsung.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH] media: v4l: Fix MPEG-2 slice Intra DC Precision validation
Date: Thu, 29 Nov 2018 09:39:15 +0100	[thread overview]
Message-ID: <41b39e603db7eb068dd9f4542d37c1f5f07ba1c0.camel@bootlin.com> (raw)
In-Reply-To: <AM0PR03MB46764B5CB90B17825C56DFFFACD60@AM0PR03MB4676.eurprd03.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

Hi,

On Sun, 2018-11-25 at 15:21 +0000, Jonas Karlman wrote:
> intra_dc_precision is a 2-bit integer [1]
> allow use of all valid options, 8 - 11 bits precision
> 
> [1] ISO/IEC 13818-2 Table 6-13

Thanks for this patch, this is definitely a mistake from my side here!

> Fixes: c27bb30e7b6d ("media: v4l: Add definitions for MPEG-2 slice format and metadata")
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>

Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> ---
> 
>  drivers/media/v4l2-core/v4l2-ctrls.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index 5f2b033a7a42..129a986fa7e1 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -1636,7 +1636,8 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
>  		switch (p_mpeg2_slice_params->picture.intra_dc_precision) {
>  		case 0: /* 8 bits */
>  		case 1: /* 9 bits */
> -		case 11: /* 11 bits */
> +		case 2: /* 10 bits */
> +		case 3: /* 11 bits */
>  			break;
>  		default:
>  			return -EINVAL;
-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2018-11-29 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-25 15:21 [PATCH] media: v4l: Fix MPEG-2 slice Intra DC Precision validation Jonas Karlman
2018-11-29  8:39 ` Paul Kocialkowski [this message]

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=41b39e603db7eb068dd9f4542d37c1f5f07ba1c0.camel@bootlin.com \
    --to=paul.kocialkowski@bootlin.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jonas@kwiboo.se \
    --cc=keiichiw@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=smitha.t@samsung.com \
    --cc=tfiga@chromium.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;
as well as URLs for NNTP newsgroup(s).