b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 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 |
| 5 | |
| 6 | From https://patchwork.linuxtv.org/patch/60725/ |
| 7 | Changes requested, but mainly docs. |
| 8 | |
| 9 | If HEVC frame consists of multiple slices, segment address has to be |
| 10 | known in order to properly decode it. |
| 11 | |
| 12 | Add segment address field to slice parameters. |
| 13 | |
| 14 | Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> |
| 15 | --- |
| 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(-) |
| 19 | |
| 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 |
| 23 | * - __u32 |
| 24 | - ``data_bit_offset`` |
| 25 | - Offset (in bits) to the video data in the current slice data. |
| 26 | + * - __u32 |
| 27 | + - ``slice_segment_addr`` |
| 28 | + - |
| 29 | * - __u8 |
| 30 | - ``nal_unit_type`` |
| 31 | - |
| 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. |
| 35 | * - __u8 |
| 36 | - - ``padding[7]`` |
| 37 | + - ``padding[5]`` |
| 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 { |
| 44 | __u32 bit_size; |
| 45 | __u32 data_bit_offset; |
| 46 | |
| 47 | + /* ISO/IEC 23008-2, ITU-T Rec. H.265: General slice segment header */ |
| 48 | + __u32 slice_segment_addr; |
| 49 | + |
| 50 | /* ISO/IEC 23008-2, ITU-T Rec. H.265: NAL unit header */ |
| 51 | __u8 nal_unit_type; |
| 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; |
| 56 | |
| 57 | - __u8 padding; |
| 58 | + __u8 padding[5]; |
| 59 | |
| 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]; |