From: "Jernej Škrabec" <jernej.skrabec@siol.net>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
mripard@kernel.org, tfiga@chromium.org, jonas@kwiboo.se,
Ezequiel Garcia <ezequiel@collabora.com>
Subject: Re: [PATCHv3 6/8] media: cedrus: Detect first slice of a frame
Date: Fri, 11 Oct 2019 10:49:15 +0200 [thread overview]
Message-ID: <2841216.fgL18TTB4F@jernej-laptop> (raw)
In-Reply-To: <20191010131152.68984-7-hverkuil-cisco@xs4all.nl>
Dne četrtek, 10. oktober 2019 ob 15:11:50 CEST je Hans Verkuil napisal(a):
> From: Jernej Skrabec <jernej.skrabec@siol.net>
>
> When codec supports multiple slices in one frame, VPU has to know when
> first slice of each frame is being processed, presumably to correctly
> clear/set data in auxiliary buffers.
>
> Add first_slice field to cedrus_run structure and set it according to
> the new_frame boolean of the context.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> [hverkuil-cisco@xs4all.nl: rewritten to use the new_frame bool]
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
> drivers/staging/media/sunxi/cedrus/cedrus.h | 1 +
> drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.h
> b/drivers/staging/media/sunxi/cedrus/cedrus.h index
> 2f017a651848..32cb38e541c6 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus.h
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus.h
> @@ -70,6 +70,7 @@ struct cedrus_mpeg2_run {
> struct cedrus_run {
> struct vb2_v4l2_buffer *src;
> struct vb2_v4l2_buffer *dst;
> + bool first_slice;
>
> union {
> struct cedrus_h264_run h264;
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
> b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c index
> 56ca4c9ad01c..7d3dd31e8190 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c
> @@ -31,6 +31,7 @@ void cedrus_device_run(void *priv)
>
> run.src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
> run.dst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
> + run.first_slice = ctx->fh.m2m_ctx->new_frame;
I'm not sure if this patch makes sense anymore now that the flag is part of the
core. I think we can drop this patch and access new_frame directly in next
patch. Any thoughts?
Best regards,
Jernej
>
> /* Apply request(s) controls if needed. */
> src_req = run.src->vb2_buf.req_obj.req;
next prev parent reply other threads:[~2019-10-11 8:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 13:11 [PATCHv3 0/8] media: cedrus: h264: Support multi-slice frames Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 1/8] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 2/8] v4l2-mem2mem: support held capture buffers Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 3/8] videodev2.h: add V4L2_DEC_CMD_FLUSH Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 4/8] media: v4l2-mem2mem: add stateless_(try_)decoder_cmd ioctl helpers Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 5/8] v4l2-mem2mem: add new_frame detection Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 6/8] media: cedrus: Detect first slice of a frame Hans Verkuil
2019-10-11 8:49 ` Jernej Škrabec [this message]
2019-10-11 8:50 ` Hans Verkuil
2019-10-10 13:11 ` [PATCHv3 7/8] media: cedrus: h264: Support multiple slices per frame Hans Verkuil
2019-10-11 9:11 ` Jernej Škrabec
2019-10-10 13:11 ` [PATCHv3 8/8] media: cedrus: Add support for holding capture buffer Hans Verkuil
2019-10-11 9:12 ` Jernej Škrabec
2019-10-11 7:07 ` [PATCHv3 0/8] media: cedrus: h264: Support multi-slice frames Jernej Škrabec
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=2841216.fgL18TTB4F@jernej-laptop \
--to=jernej.skrabec@siol.net \
--cc=ezequiel@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jonas@kwiboo.se \
--cc=linux-media@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=paul.kocialkowski@bootlin.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