mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Adam Ford <aford173@gmail.com>
Cc: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	 p.zabel@pengutronix.de, mchehab@kernel.org,
	linux-media@vger.kernel.org,  linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: verisilicon: HEVC: Initialize start_bit field
Date: Mon, 20 Jan 2025 09:43:06 -0500	[thread overview]
Message-ID: <e307cb3980711ed9d0ad06648b127ec8f6a9ffa9.camel@collabora.com> (raw)
In-Reply-To: <CAHCN7xKySGN6wnE2FmpuLms-DyThBvx9w6vdKqJvsaWpgW6FOQ@mail.gmail.com>

Le lundi 20 janvier 2025 à 08:15 -0600, Adam Ford a écrit :
> On Mon, Jan 20, 2025 at 8:10 AM Nicolas Dufresne
> <nicolas.dufresne@collabora.com> wrote:
> > 
> > Le lundi 20 janvier 2025 à 11:00 +0100, Benjamin Gaignard a écrit :
> > > Le 20/01/2025 à 09:10, Benjamin Gaignard a écrit :
> > > > Always set start_bit field to 0, if not it could lead to corrupted frames
> > > > specially when decoding VP9 bitstreams at the same time since VP9 driver
> > > > set it for it own purpose.
> > 
> >                its
> > 
> 
> Does this impact the Fluster score?

Only if you concurrently test VP9 and HEVC at the same time. Fluster does not
parallelized across codecs, could be a nice addition to catch more issues.

Nicolas

> 
> > > > 
> > > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> > > 
> > > I could add this tag:
> > > 
> > > Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
> > 
> > I have tested this on IMX8MQ board using the following GStreamer pipeline.
> > Before the change, the HEVC window was entirely corrupted. The streams don't
> > matter as long as they use both HEVC and VP9 codec.
> > 
> > gst-launch-1.0 \
> >   filesrc location=hevc.mp4 ! parsebin ! v4l2slh265dec ! fakevideosink \
> >   filesrc location=vp9.mkv ! parsebin ! v4l2slvp9dec ! fakevideosink
> > 
> > Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> > 
> > 
> > > 
> > > > ---
> > > >   drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c b/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
> > > > index 85a44143b378..0e212198dd65 100644
> > > > --- a/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
> > > > +++ b/drivers/media/platform/verisilicon/hantro_g2_hevc_dec.c
> > > > @@ -518,6 +518,7 @@ static void set_buffers(struct hantro_ctx *ctx)
> > > >     hantro_reg_write(vpu, &g2_stream_len, src_len);
> > > >     hantro_reg_write(vpu, &g2_strm_buffer_len, src_buf_len);
> > > >     hantro_reg_write(vpu, &g2_strm_start_offset, 0);
> > > > +   hantro_reg_write(vpu, &g2_start_bit, 0);
> > > >     hantro_reg_write(vpu, &g2_write_mvs_e, 1);
> > 
> > I've also crossed against "decoder_swreg_map_g2.xlsx" documentation, if you are
> > lucky to have access to that, and within swreg5 there is only g2_tempor_mvp_e
> > that is also shared, and its already being set in both drivers.
> > 
> > Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> > 
> > 
> > > > 
> > > >     hantro_write_addr(vpu, G2_TILE_SIZES_ADDR, ctx->hevc_dec.tile_sizes.dma);
> > > 
> > 
> > 


      parent reply	other threads:[~2025-01-20 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20  8:10 Benjamin Gaignard
2025-01-20 10:00 ` Benjamin Gaignard
2025-01-20 14:10   ` Nicolas Dufresne
2025-01-20 14:15     ` Adam Ford
2025-01-20 14:19       ` Benjamin Gaignard
2025-01-20 14:43       ` Nicolas Dufresne [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=e307cb3980711ed9d0ad06648b127ec8f6a9ffa9.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=aford173@gmail.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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

all inboxes | Powered by JetHome®