1 From 88eb3b015b6f61252fd214d39fc7fc0379ee0442 Mon Sep 17 00:00:00 2001
2 From: Jernej Skrabec <jernej.skrabec@siol.net>
3 Date: Fri, 13 Dec 2019 17:04:27 +0100
4 Subject: [PATCH] media: uapi: hevc: Add segment address field
6 From https://patchwork.linuxtv.org/patch/60725/
7 Changes requested, but mainly docs.
9 If HEVC frame consists of multiple slices, segment address has to be
10 known in order to properly decode it.
12 Add segment address field to slice parameters.
14 Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
16 Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 5 ++++-
17 include/media/hevc-ctrls.h | 5 ++++-
18 2 files changed, 8 insertions(+), 2 deletions(-)
20 --- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
21 +++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
22 @@ -3969,6 +3969,9 @@ enum v4l2_mpeg_video_hevc_size_of_length
25 - Offset (in bits) to the video data in the current slice data.
27 + - ``slice_segment_addr``
32 @@ -4046,7 +4049,7 @@ enum v4l2_mpeg_video_hevc_size_of_length
33 - ``num_rps_poc_lt_curr``
34 - The number of reference pictures in the long-term set.
38 - Applications and drivers must set this to zero.
39 * - struct :c:type:`v4l2_hevc_dpb_entry`
40 - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``
41 --- a/include/media/hevc-ctrls.h
42 +++ b/include/media/hevc-ctrls.h
43 @@ -167,6 +167,9 @@ struct v4l2_ctrl_hevc_slice_params {
45 __u32 data_bit_offset;
47 + /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
48 + __u32 slice_segment_addr;
50 /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */
52 __u8 nuh_temporal_id_plus1;
53 @@ -200,7 +203,7 @@ struct v4l2_ctrl_hevc_slice_params {
54 __u8 num_rps_poc_st_curr_after;
55 __u8 num_rps_poc_lt_curr;
60 /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
61 struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];