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]
Date:   Mon, 2 Jul 2018 18:37:42 +0900
From:   Tomasz Figa <tfiga@...omium.org>
To:     vgarodia@...eaurora.org
Cc:     Alexandre Courbot <acourbot@...omium.org>,
        Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans Verkuil <hverkuil@...all.nl>,
        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>,
        linux-media-owner@...r.kernel.org
Subject: Re: [PATCH v4 24/27] venus: helpers: move frame size calculations on
 common place

On Mon, Jul 2, 2018 at 6:35 PM Vikash Garodia <vgarodia@...eaurora.org> wrote:
>
> On 2018-07-02 14:16, Alexandre Courbot wrote:
> > On Thu, Jun 28, 2018 at 12:28 AM Stanimir Varbanov
> > <stanimir.varbanov@...aro.org> wrote:
> >>
> >> This move the calculations of raw and compressed buffer sizes
> >> on common helper and make it identical for encoder and decoder.
> >>
> >> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
> >> ---
> >>  drivers/media/platform/qcom/venus/helpers.c | 98
> >> +++++++++++++++++++++++++++++
> >>  drivers/media/platform/qcom/venus/helpers.h |  2 +
> >>  drivers/media/platform/qcom/venus/vdec.c    | 54 ++++------------
> >>  drivers/media/platform/qcom/venus/venc.c    | 56 ++++-------------
> >>  4 files changed, 126 insertions(+), 84 deletions(-)
> >>
> >> diff --git a/drivers/media/platform/qcom/venus/helpers.c
> >> b/drivers/media/platform/qcom/venus/helpers.c
> >> index 6b31c91528ed..a342472ae2f0 100644
> >> --- a/drivers/media/platform/qcom/venus/helpers.c
> >> +++ b/drivers/media/platform/qcom/venus/helpers.c
> >> @@ -452,6 +452,104 @@ int venus_helper_get_bufreq(struct venus_inst
> >> *inst, u32 type,
> >>  }
> >>  EXPORT_SYMBOL_GPL(venus_helper_get_bufreq);
> >>
> >> +static u32 get_framesize_raw_nv12(u32 width, u32 height)
> >> +{
> >> +       u32 y_stride, uv_stride, y_plane;
> >> +       u32 y_sclines, uv_sclines, uv_plane;
> >> +       u32 size;
> >> +
> >> +       y_stride = ALIGN(width, 128);
> >> +       uv_stride = ALIGN(width, 128);
> >> +       y_sclines = ALIGN(height, 32);
> >> +       uv_sclines = ALIGN(((height + 1) >> 1), 16);
> >> +
> >> +       y_plane = y_stride * y_sclines;
> >> +       uv_plane = uv_stride * uv_sclines + SZ_4K;
> >> +       size = y_plane + uv_plane + SZ_8K;
> >
> > Do you know the reason for this extra 8K at the end?
>
> As explained about the hardware requirement over bug [1], 8k is not
> needed.
> I am working on a patch to fix the alignment requirement for ubwc format
> as
> well.
> In downstream driver, this 8k was added to accomodate the video
> extradata.
>
> [1] https://partnerissuetracker.corp.google.com/u/1/issues/110448791

Thanks Vikash.

I'd also ask the same question about the extra 4K at the end of UV plane.

Best regards,
Tomasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ