Skip to content

Commit

Permalink
media: rkvdec: h264: Support profile and level controls
Browse files Browse the repository at this point in the history
The Rockchip Video Decoder used in RK3399 supports H.264 profiles from
Baseline to High 4:2:2 up to Level 5.1, except for the Extended profile.

Expose the V4L2_CID_MPEG_VIDEO_H264_PROFILE and the
V4L2_CID_MPEG_VIDEO_H264_LEVEL control, so that userspace can query the
driver for the list of supported profiles and level.

Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Ezequiel Garcia <[email protected]>
  • Loading branch information
Kwiboo authored and sigmaris committed Aug 3, 2020
1 parent 624cef0 commit 4bb2341
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/staging/media/rkvdec/rkvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = {
.cfg.def = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B,
.cfg.max = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B,
},
{
.cfg.id = V4L2_CID_MPEG_VIDEO_H264_PROFILE,
.cfg.min = V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE,
.cfg.max = V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422,
.cfg.menu_skip_mask =
BIT(V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED),
.cfg.def = V4L2_MPEG_VIDEO_H264_PROFILE_MAIN,
},
{
.cfg.id = V4L2_CID_MPEG_VIDEO_H264_LEVEL,
.cfg.min = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
.cfg.max = V4L2_MPEG_VIDEO_H264_LEVEL_5_1,
},
};

static const struct rkvdec_ctrls rkvdec_h264_ctrls = {
Expand Down

0 comments on commit 4bb2341

Please sign in to comment.