Commit 9047d90e authored by Irui Wang's avatar Irui Wang Committed by Hans Verkuil

media: mediatek: vcodec: Skip unsupported h264 encoder profile

The encoder driver supports h264 baseline, main, high encoder
profile. Set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip
the unsupported profile.

get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L
h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4
        0: Baseline
        2: Main
        4: High
Signed-off-by: default avatarIrui Wang <irui.wang@mediatek.com>
Tested-by: default avatarAllen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: default avatarYunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 062fa935
......@@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx)
0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE);
v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_H264_PROFILE,
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH);
~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) |
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) |
(1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)),
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH);
v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_H264_LEVEL,
h264_max_level,
0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
......
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