diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2020-08-25 05:52:32 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-01 14:13:28 +0200 |
commit | c02ff21952a6a19ca375b9dc4f9a5609616a82b8 (patch) | |
tree | 9fe8bc6e515c8ae1a5191960373ffc9519cbf772 /drivers/media/v4l2-core/v4l2-h264.c | |
parent | 4245232fa6ca58f79710732bd16cefe78b8b8bc4 (diff) |
media: uapi: h264: Clean DPB entry interface
As discussed recently, the current interface for the
Decoded Picture Buffer is not enough to properly
support field coding.
This commit introduces enough semantics to support
frame and field coding, and to signal how DPB entries
are "used for reference".
Reserved fields will be added by a follow-up commit.
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 'drivers/media/v4l2-core/v4l2-h264.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-h264.c b/drivers/media/v4l2-core/v4l2-h264.c index edf6225f0522..f4742408436b 100644 --- a/drivers/media/v4l2-core/v4l2-h264.c +++ b/drivers/media/v4l2-core/v4l2-h264.c @@ -66,10 +66,10 @@ v4l2_h264_init_reflist_builder(struct v4l2_h264_reflist_builder *b, else b->refs[i].frame_num = dpb[i].frame_num; - if (!(dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_FIELD)) + if (dpb[i].fields == V4L2_H264_FRAME_REF) pic_order_count = min(dpb[i].top_field_order_cnt, dpb[i].bottom_field_order_cnt); - else if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD) + else if (dpb[i].fields & V4L2_H264_BOTTOM_FIELD_REF) pic_order_count = dpb[i].bottom_field_order_cnt; else pic_order_count = dpb[i].top_field_order_cnt; |