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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Aug 2021 10:50:51 +0100
From:   John Cox <jc@...esim.co.uk>
To:     Benjamin Gaignard <benjamin.gaignard@...labora.com>
Cc:     mchehab@...nel.org, hverkuil-cisco@...all.nl, nicolas@...fresne.ca,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel@...labora.com,
        Benjamin Gaignard <benjamin.gaignard@...labora.com>
Subject: Re: [PATCH] media: hevc: fix pictures lists type

>The lists embedded Picture Order Count values which are s32 so their type
>most be s32 and not u8.

I'm not convinced that you can't calculate all of those lists from the
info already contained in the DPB array so this is probably redundant
info though I grant that having the list pre-calced might make your life
easier, and the userland side will have calculated the lists to
calculate other required things so it isn't much extra work for it.

Even if you do need the lists wouldn't it be a better idea to have them
as indices into the DPB (you can't have a frame in any of those lists
that isn't in the DPB) which already contains POCs then it will still
fit into u8 and be smaller?

Full disclosure: Pi decode doesn't use this info at all so I'm only
arguing from a theoretical point of view - I think it is only relevant
if your h/w is parsing the reference list setups.

Regards

John Cox

>Reported-by: John Cox <jc@...esim.co.uk>
>Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
>---
> Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 6 +++---
> include/media/hevc-ctrls.h                                | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
>diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>index 976d34445a24..db9859ddc8b2 100644
>--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>@@ -3323,15 +3323,15 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
>     * - __u8
>       - ``num_poc_lt_curr``
>       - The number of reference pictures in the long-term set.
>-    * - __u8
>+    * - __s32
>       - ``poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
>       - PocStCurrBefore as described in section 8.3.2 "Decoding process for reference
>         picture set.
>-    * - __u8
>+    * - __s32
>       - ``poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
>       - PocStCurrAfter as described in section 8.3.2 "Decoding process for reference
>         picture set.
>-    * - __u8
>+    * - __s32
>       - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
>       - PocLtCurr as described in section 8.3.2 "Decoding process for reference
>         picture set.
>diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
>index 781371bff2ad..04cd62e77f25 100644
>--- a/include/media/hevc-ctrls.h
>+++ b/include/media/hevc-ctrls.h
>@@ -219,9 +219,9 @@ struct v4l2_ctrl_hevc_decode_params {
> 	__u8	num_poc_st_curr_before;
> 	__u8	num_poc_st_curr_after;
> 	__u8	num_poc_lt_curr;
>-	__u8	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
>-	__u8	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
>-	__u8	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
>+	__s32	poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
>+	__s32	poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
>+	__s32	poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];
> 	__u64	flags;
> };
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ