Skip to content
Snippets Groups Projects
Commit 88023dba authored by Ezequiel Garcia's avatar Ezequiel Garcia
Browse files

media: uapi: h264: Redo DPB interface


Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
parent b0c9b721
No related branches found
No related tags found
No related merge requests found
......@@ -64,10 +64,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].reference & V4L2_H264_DPB_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].reference & V4L2_H264_DPB_BOTTOM_REF)
pic_order_count = dpb[i].bottom_field_order_cnt;
else
pic_order_count = dpb[i].top_field_order_cnt;
......
......@@ -951,11 +951,11 @@ static void config_registers(struct rkvdec_ctx *ctx,
RKVDEC_COLMV_USED_FLAG_REF;
if (!(dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_FIELD))
refer_addr |= RKVDEC_TOPFIELD_USED_REF |
RKVDEC_BOTFIELD_USED_REF;
else if (dpb[i].flags & V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD)
refer_addr |= RKVDEC_FIELD_REF;
if (dpb[i].reference & V4L2_H264_DPB_TOP_REF)
refer_addr |= RKVDEC_BOTFIELD_USED_REF;
else
else if (dpb[i].reference & V4L2_H264_DPB_BOTTOM_REF)
refer_addr |= RKVDEC_TOPFIELD_USED_REF;
writel_relaxed(dpb[i].top_field_order_cnt,
......
......@@ -188,7 +188,12 @@ struct v4l2_ctrl_h264_slice_params {
#define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x02
#define V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM 0x04
#define V4L2_H264_DPB_ENTRY_FLAG_FIELD 0x08
#define V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD 0x10
enum v4l2_h264_dpb_reference {
V4L2_H264_DPB_TOP_REF = 0x1,
V4L2_H264_DPB_BOTTOM_REF = 0x2,
V4L2_H264_DPB_FRAME_REF = 0x3,
};
struct v4l2_h264_dpb_entry {
__u64 reference_ts;
......@@ -198,6 +203,7 @@ struct v4l2_h264_dpb_entry {
/* Note that field is indicated by v4l2_buffer.field */
__s32 top_field_order_cnt;
__s32 bottom_field_order_cnt;
enum v4l2_h264_dpb_reference reference;
__u32 flags; /* V4L2_H264_DPB_ENTRY_FLAG_* */
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment