lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAFQd5Ask-mw+uEE0OAEabjaAAYcJyCeexaofOAg1bp2NtvpKA@mail.gmail.com>
Date:   Thu, 29 Nov 2018 11:40:04 -0800
From:   Tomasz Figa <tfiga@...omium.org>
To:     mgottam@...eaurora.org
Cc:     Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        Hans Verkuil <hverkuil@...all.nl>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        Alexandre Courbot <acourbot@...omium.org>,
        vgarodia@...eaurora.org
Subject: Re: [PATCH v3] media: venus: add support for key frame

On Thu, Nov 29, 2018 at 3:10 AM <mgottam@...eaurora.org> wrote:
>
>
> Hi Stan,
>
> On 2018-11-29 16:01, Stanimir Varbanov wrote:
> > Hi Tomasz,
> >
> > On 11/3/18 5:01 AM, Tomasz Figa wrote:
> >> Hi Malathi,
> >>
> >> On Fri, Nov 2, 2018 at 9:58 PM Malathi Gottam <mgottam@...eaurora.org>
> >> wrote:
> >>>
> >>> When client requests for a keyframe, set the property
> >>> to hardware to generate the sync frame.
> >>>
> >>> Signed-off-by: Malathi Gottam <mgottam@...eaurora.org>
> >>> ---
> >>>  drivers/media/platform/qcom/venus/venc_ctrls.c | 20
> >>> +++++++++++++++++++-
> >>>  1 file changed, 19 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c
> >>> b/drivers/media/platform/qcom/venus/venc_ctrls.c
> >>> index 45910172..59fe7fc 100644
> >>> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> >>> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> >>> @@ -79,8 +79,10 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
> >>>  {
> >>>         struct venus_inst *inst = ctrl_to_inst(ctrl);
> >>>         struct venc_controls *ctr = &inst->controls.enc;
> >>> +       struct hfi_enable en = { .enable = 1 };
> >>>         u32 bframes;
> >>>         int ret;
> >>> +       u32 ptype;
> >>>
> >>>         switch (ctrl->id) {
> >>>         case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
> >>> @@ -173,6 +175,19 @@ static int venc_op_s_ctrl(struct v4l2_ctrl
> >>> *ctrl)
> >>>
> >>>                 ctr->num_b_frames = bframes;
> >>>                 break;
> >>> +       case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:
> >>> +               mutex_lock(&inst->lock);
> >>> +               if (inst->streamon_out && inst->streamon_cap) {
> >>
> >> We had a discussion on this in v2. I don't remember seeing any
> >> conclusion.
> >>
> >> Obviously the hardware should generate a keyframe naturally when the
> >> CAPTURE streaming starts, which is where the encoding starts, but the
> >> state of the OUTPUT queue should not affect this.
> >>
> >> The application is free to stop and start streaming on the OUTPUT
> >> queue as it goes and it shouldn't imply any side effects in the
> >> encoded bitstream (e.g. a keyframe inserted). So:
> >> - a sequence of STREAMOFF(OUTPUT),
> >> S_CTRL(V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME), STREAMON(OUTPUT) should
> >> explicitly generate a keyframe,
> >
> > I agree with you, but presently we don't follow strictly the stateful
> > encoder spec. In this spirit I think proposed patch is applicable to
> > the
> > current state of the encoder driver, and your comment should be
> > addressed in the follow-up patches where we have to re-factor a bit
> > start/stop_streaming according to the encoder documentation.
> >
> > But until then we have to get that patch.
>
> So I can see that this patch is good implementation of forcing sync
> frame
> under current encoder state.
>
> Can you please ack the same.

Okay, assuming that when you start streaming you naturally get a
keyframe, I'm okay with this patch, since it actually fixes the
missing key frame request, so from the general encoder interface point
of view:

Acked-by: Tomasz Figa <tfiga@...omium.org>

Best regards,
Tomasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ