Commit 5e815fe0 authored by Jonas Karlman's avatar Jonas Karlman Committed by Mauro Carvalho Chehab

media: uapi: h264: Add DPB entry field reference flags

Using the field information attached to v4l2 buffers is not enough to
determine the type of field referenced by a DPB entry: the decoded
frame might contain the full picture (both top and bottom fields)
but the reference only point to one of them.
Let's add new V4L2_H264_DPB_ENTRY_FLAG_ flags to express that.

[Keep only 2 flags and add some details about they mean]
Signed-off-by: default avatarJonas Karlman <jonas@kwiboo.se>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 62d19285
...@@ -2028,6 +2028,22 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type - ...@@ -2028,6 +2028,22 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
* - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM`` * - ``V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM``
- 0x00000004 - 0x00000004
- The DPB entry is a long term reference frame - The DPB entry is a long term reference frame
* - ``V4L2_H264_DPB_ENTRY_FLAG_FIELD``
- 0x00000008
- The DPB entry is a field reference, which means only one of the field
will be used when decoding the new frame/field. When not set the DPB
entry is a frame reference (both fields will be used). Note that this
flag does not say anything about the number of fields contained in the
reference frame, it just describes the one used to decode the new
field/frame
* - ``V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD``
- 0x00000010
- The DPB entry is a bottom field reference (only the bottom field of the
reference frame is needed to decode the new frame/field). Only valid if
V4L2_H264_DPB_ENTRY_FLAG_FIELD is set. When
V4L2_H264_DPB_ENTRY_FLAG_FIELD is set but
V4L2_H264_DPB_ENTRY_FLAG_BOTTOM_FIELD is not, that means the
DPB entry is a top field reference
``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)`` ``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
Specifies the decoding mode to use. Currently exposes slice-based and Specifies the decoding mode to use. Currently exposes slice-based and
......
...@@ -185,6 +185,8 @@ struct v4l2_ctrl_h264_slice_params { ...@@ -185,6 +185,8 @@ struct v4l2_ctrl_h264_slice_params {
#define V4L2_H264_DPB_ENTRY_FLAG_VALID 0x01 #define V4L2_H264_DPB_ENTRY_FLAG_VALID 0x01
#define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x02 #define V4L2_H264_DPB_ENTRY_FLAG_ACTIVE 0x02
#define V4L2_H264_DPB_ENTRY_FLAG_LONG_TERM 0x04 #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
struct v4l2_h264_dpb_entry { struct v4l2_h264_dpb_entry {
__u64 reference_ts; __u64 reference_ts;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment