Skip to content

Commit 6464688

Browse files
jernejskpopcornmix
authored andcommitted
media: uapi: hevc: Add segment address field
From https://patchwork.linuxtv.org/patch/60725/ Changes requested, but mainly docs. If HEVC frame consists of multiple slices, segment address has to be known in order to properly decode it. Add segment address field to slice parameters. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
1 parent b587990 commit 6464688

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎Documentation/media/uapi/v4l/ext-ctrls-codec.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3975,6 +3975,9 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
39753975
* - __u32
39763976
- ``data_bit_offset``
39773977
- Offset (in bits) to the video data in the current slice data.
3978+
* - __u32
3979+
- ``slice_segment_addr``
3980+
-
39783981
* - __u8
39793982
- ``nal_unit_type``
39803983
-
@@ -4052,7 +4055,7 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
40524055
- ``num_rps_poc_lt_curr``
40534056
- The number of reference pictures in the long-term set.
40544057
* - __u8
4055-
- ``padding[7]``
4058+
- ``padding[5]``
40564059
- Applications and drivers must set this to zero.
40574060
* - struct :c:type:`v4l2_hevc_dpb_entry`
40584061
- ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]``

‎include/media/hevc-ctrls.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ struct v4l2_ctrl_hevc_slice_params {
167167
__u32 bit_size;
168168
__u32 data_bit_offset;
169169

170+
/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
171+
__u32 slice_segment_addr;
172+
170173
/* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */
171174
__u8 nal_unit_type;
172175
__u8 nuh_temporal_id_plus1;
@@ -200,7 +203,7 @@ struct v4l2_ctrl_hevc_slice_params {
200203
__u8 num_rps_poc_st_curr_after;
201204
__u8 num_rps_poc_lt_curr;
202205

203-
__u8 padding;
206+
__u8 padding[5];
204207

205208
/* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */
206209
struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX];

0 commit comments

Comments
 (0)