aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEzequiel Garcia2020-08-25 05:52:33 +0200
committerMauro Carvalho Chehab2020-09-01 14:13:28 +0200
commitf9879eb378295e8a912d2d10c872c45f3e19421b (patch)
treed26a45b4ea8b003861b2334d616dc20c0aa1ad9c /include
parentc02ff21952a6a19ca375b9dc4f9a5609616a82b8 (diff)
media: uapi: h264: Increase size of DPB entry pic_num
DPB entry PicNum maximum value is 2*MaxFrameNum for interlaced content (field_pic_flag=1). As specified, MaxFrameNum is 2^(log2_max_frame_num_minus4 + 4) and log2_max_frame_num_minus4 is in the range of 0 to 12, which means pic_num should be a 32-bit field. The v4l2_h264_dpb_entry struct needs to be padded to avoid a hole, which might be also useful to allow future uAPI extensions. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/media/h264-ctrls.h3
-rw-r--r--include/media/v4l2-h264.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/media/h264-ctrls.h b/include/media/h264-ctrls.h
index 0529e75cce5f..91f6f0d43e11 100644
--- a/include/media/h264-ctrls.h
+++ b/include/media/h264-ctrls.h
@@ -213,9 +213,10 @@ struct v4l2_ctrl_h264_slice_params {
struct v4l2_h264_dpb_entry {
__u64 reference_ts;
+ __u32 pic_num;
__u16 frame_num;
- __u16 pic_num;
__u8 fields;
+ __u8 reserved[5];
/* Note that field is indicated by v4l2_buffer.field */
__s32 top_field_order_cnt;
__s32 bottom_field_order_cnt;
diff --git a/include/media/v4l2-h264.h b/include/media/v4l2-h264.h
index bc9ebb560ccf..1a5f26fc2a9a 100644
--- a/include/media/v4l2-h264.h
+++ b/include/media/v4l2-h264.h
@@ -33,7 +33,7 @@ struct v4l2_h264_reflist_builder {
struct {
s32 pic_order_count;
int frame_num;
- u16 pic_num;
+ u32 pic_num;
u16 longterm : 1;
} refs[V4L2_H264_NUM_DPB_ENTRIES];
s32 cur_pic_order_count;