linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: paul.kocialkowski@bootlin.com, mripard@kernel.org,
	Nicolas Dufresne <nicolas@ndufresne.ca>
Cc: mchehab@kernel.org, wens@csie.org, hverkuil-cisco@xs4all.nl,
	gregkh@linuxfoundation.org, jonas@kwiboo.se,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] media: cedrus: h264: Properly configure reference field
Date: Fri, 05 Jun 2020 19:26:20 +0200	[thread overview]
Message-ID: <2479507.UA2pHCgT9S@jernej-laptop> (raw)
In-Reply-To: <7e74e15b7b3f9fc765182f1a43cfcf1e0e9602fc.camel@ndufresne.ca>

Dne petek, 05. junij 2020 ob 19:16:35 CEST je Nicolas Dufresne napisal(a):
> Le jeudi 04 juin 2020 à 20:57 +0200, Jernej Skrabec a écrit :
> > When interlaced H264 content is being decoded, references must indicate
> > which field is being referenced. Currently this was done by checking
> > capture buffer flags. However, that is not correct because capture
> > buffer may hold both fields.
> > 
> > Fix this by checking newly introduced flags in reference lists.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> 
> Perhaps an additional patch could cleanup the miss-leading comment in
> v4l2_h264_dpb_entry definition.

I missed that. I think this change actually belongs to patch 1. I'll fix it in 
v2.

Best regards,
Jernej

> 
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> 
> > ---
> > 
> >  drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
> > b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c index
> > cce527bbdf86..c87717d17ec5 100644
> > --- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
> > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
> > @@ -183,7 +183,6 @@ static void _cedrus_write_ref_list(struct cedrus_ctx
> > *ctx,> 
> >  	for (i = 0; i < num_ref; i++) {
> >  	
> >  		const struct v4l2_h264_dpb_entry *dpb;
> >  		const struct cedrus_buffer *cedrus_buf;
> > 
> > -		const struct vb2_v4l2_buffer *ref_buf;
> > 
> >  		unsigned int position;
> >  		int buf_idx;
> >  		u8 dpb_idx;
> > 
> > @@ -198,12 +197,11 @@ static void _cedrus_write_ref_list(struct cedrus_ctx
> > *ctx,> 
> >  		if (buf_idx < 0)
> >  		
> >  			continue;
> > 
> > -		ref_buf = to_vb2_v4l2_buffer(cap_q->bufs[buf_idx]);
> > -		cedrus_buf = vb2_v4l2_to_cedrus_buffer(ref_buf);
> > +		cedrus_buf = vb2_to_cedrus_buffer(cap_q->bufs[buf_idx]);
> > 
> >  		position = cedrus_buf->codec.h264.position;
> >  		
> >  		sram_array[i] |= position << 1;
> > 
> > -		if (ref_buf->field == V4L2_FIELD_BOTTOM)
> > +		if (ref_list[i].flags & 
V4L2_H264_REFERENCE_FLAG_BOTTOM_FIELD)
> > 
> >  			sram_array[i] |= BIT(0);
> >  	
> >  	}





  reply	other threads:[~2020-06-05 17:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 18:57 [PATCH 0/3] media: uapi: cedrus: Fix decoding interlaced H264 content Jernej Skrabec
2020-06-04 18:57 ` [PATCH 1/3] media: uapi: h264: update reference lists Jernej Skrabec
2020-06-05 17:08   ` Nicolas Dufresne
2020-06-05 17:13     ` Nicolas Dufresne
2020-06-05 17:26       ` Jernej Škrabec
2020-07-08 13:28   ` Ezequiel Garcia
2020-07-08 15:57     ` Jernej Škrabec
2020-07-09  0:59       ` Nicolas Dufresne
2020-06-04 18:57 ` [PATCH 2/3] media: cedrus: h264: Properly configure reference field Jernej Skrabec
2020-06-05 17:16   ` Nicolas Dufresne
2020-06-05 17:26     ` Jernej Škrabec [this message]
2020-06-04 18:57 ` [PATCH 3/3] media: cedrus: h264: Fix frame list construction Jernej Skrabec
2020-06-06 12:46 ` [PATCH 0/3] media: uapi: cedrus: Fix decoding interlaced H264 content Ezequiel Garcia
2020-06-07 20:21   ` Nicolas Dufresne
2020-06-07 20:29     ` Nicolas Dufresne

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=2479507.UA2pHCgT9S@jernej-laptop \
    --to=jernej.skrabec@siol.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mripard@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=paul.kocialkowski@bootlin.com \
    --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;
as well as URLs for NNTP newsgroup(s).