mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 01:24:08 +08:00
media: venus: vdec: Set/Get VP9 profile/level
Get and set VP9 codec profile and levels. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
2c2dc2fdc1
commit
3cd136713b
@ -22,10 +22,12 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:
|
||||
ctr->profile = ctrl->val;
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
|
||||
case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL:
|
||||
case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:
|
||||
ctr->level = ctrl->val;
|
||||
break;
|
||||
default:
|
||||
@ -49,6 +51,7 @@ static int vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
|
||||
case V4L2_CID_MPEG_VIDEO_H264_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:
|
||||
case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:
|
||||
ret = hfi_session_get_property(inst, ptype, &hprop);
|
||||
if (!ret)
|
||||
ctr->profile = hprop.profile_level.profile;
|
||||
@ -56,6 +59,7 @@ static int vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
|
||||
break;
|
||||
case V4L2_CID_MPEG_VIDEO_H264_LEVEL:
|
||||
case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL:
|
||||
case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:
|
||||
ret = hfi_session_get_property(inst, ptype, &hprop);
|
||||
if (!ret)
|
||||
ctr->level = hprop.profile_level.level;
|
||||
@ -86,7 +90,7 @@ int vdec_ctrl_init(struct venus_inst *inst)
|
||||
struct v4l2_ctrl *ctrl;
|
||||
int ret;
|
||||
|
||||
ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 7);
|
||||
ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 9);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@ -133,6 +137,20 @@ int vdec_ctrl_init(struct venus_inst *inst)
|
||||
if (ctrl)
|
||||
ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
|
||||
ctrl = v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &vdec_ctrl_ops,
|
||||
V4L2_CID_MPEG_VIDEO_VP9_PROFILE,
|
||||
V4L2_MPEG_VIDEO_VP9_PROFILE_3,
|
||||
0, V4L2_MPEG_VIDEO_VP9_PROFILE_0);
|
||||
if (ctrl)
|
||||
ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
|
||||
ctrl = v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &vdec_ctrl_ops,
|
||||
V4L2_CID_MPEG_VIDEO_VP9_LEVEL,
|
||||
V4L2_MPEG_VIDEO_VP9_LEVEL_6_2,
|
||||
0, V4L2_MPEG_VIDEO_VP9_LEVEL_1_0);
|
||||
if (ctrl)
|
||||
ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
|
||||
|
||||
v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
|
||||
V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER, 0, 1, 1, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user