From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Ezequiel Garcia <ezequiel@collabora.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH 2/2] vicodec: set state->info before calling the encode/decode funcs
Date: Mon, 10 Sep 2018 13:16:31 -0400 [thread overview]
Message-ID: <85a5d85cc6fc6bb21dafc78e744c350db25894d2.camel@ndufresne.ca> (raw)
In-Reply-To: <d58b839f60c07bef6e08184de243380550e75171.camel@collabora.com>
[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]
Le lundi 10 septembre 2018 à 12:37 -0300, Ezequiel Garcia a écrit :
> On Mon, 2018-09-10 at 17:00 +0200, Hans Verkuil wrote:
> > From: Hans Verkuil <hans.verkuil@cisco.com>
> >
> > state->info was NULL since I completely forgot to set state->info.
> > Oops.
> >
> > Reported-by: Ezequiel Garcia <ezequiel@collabora.com>
> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>
> For both patches:
>
> Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
>
> With these changes, now this gstreamer pipeline no longer
> crashes:
>
> gst-launch-1.0 -v videotestsrc num-buffers=30 ! video/x-
> raw,width=1280,height=720 ! v4l2fwhtenc capture-io-mode=mmap output-
> io-mode=mmap ! v4l2fwhtdec
> capture-io-mode=mmap output-io-mode=mmap ! fakesink
>
> A few things:
>
> * You now need to mark "[PATCH] vicodec: fix sparse warning" as
> invalid.
> * v4l2fwhtenc/v4l2fwhtdec elements are not upstream yet.
> * Gstreamer doesn't end properly; and it seems to negotiate
Is the driver missing CMD_STOP implementation ? (draining flow)
> different sizes for encoded and decoded unless explicitly set.
>
> Thanks!
>
> > drivers/media/platform/vicodec/vicodec-core.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/media/platform/vicodec/vicodec-core.c
> > b/drivers/media/platform/vicodec/vicodec-core.c
> > index fdd77441a47b..5d42a8414283 100644
> > --- a/drivers/media/platform/vicodec/vicodec-core.c
> > +++ b/drivers/media/platform/vicodec/vicodec-core.c
> > @@ -176,12 +176,15 @@ static int device_process(struct vicodec_ctx
> > *ctx,
> > }
> >
> > if (ctx->is_enc) {
> > - unsigned int size = v4l2_fwht_encode(state, p_in,
> > p_out);
> > -
> > - vb2_set_plane_payload(&out_vb->vb2_buf, 0, size);
> > + state->info = q_out->info;
> > + ret = v4l2_fwht_encode(state, p_in, p_out);
> > + if (ret < 0)
> > + return ret;
> > + vb2_set_plane_payload(&out_vb->vb2_buf, 0, ret);
> > } else {
> > + state->info = q_cap->info;
> > ret = v4l2_fwht_decode(state, p_in, p_out);
> > - if (ret)
> > + if (ret < 0)
> > return ret;
> > vb2_set_plane_payload(&out_vb->vb2_buf, 0, q_cap-
> > >sizeimage);
> > }
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2018-09-10 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 15:00 [PATCH 1/2] vicodec: check for valid format in v4l2_fwht_en/decode Hans Verkuil
2018-09-10 15:00 ` [PATCH 2/2] vicodec: set state->info before calling the encode/decode funcs Hans Verkuil
2018-09-10 15:37 ` Ezequiel Garcia
2018-09-10 17:16 ` Nicolas Dufresne [this message]
2018-09-10 20:20 ` Ezequiel Garcia
2018-09-11 6:56 ` Hans Verkuil
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=85a5d85cc6fc6bb21dafc78e744c350db25894d2.camel@ndufresne.ca \
--to=nicolas@ndufresne.ca \
--cc=ezequiel@collabora.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.