(V4L2_CID_MPEG_MFC_BASE + 181)
#define V4L2_CID_MPEG_VIDEO_VP9_PROFILE \
(V4L2_CID_MPEG_MFC_BASE + 182)
+#define V4L2_CID_MPEG_VIDEO_VP9_LEVEL \
+ (V4L2_CID_MPEG_MFC_BASE + 183)
/* CIDs for new common interface */
#define V4L2_CID_MPEG_VIDEO_ROI_CONTROL \
#define ENC_SET_COLOR_ASPECT (1 << 9)
#define ENC_SET_HP_BITRATE_CONTROL (1 << 10)
#define ENC_SET_STATIC_INFO (1 << 11)
+#define ENC_SET_VP9_PROFILE_LEVEL (1 << 13)
#define MFC_VER_MAJOR(dev) ((dev->pdata->ip_ver >> 8) & 0xFF)
#define MFC_VER_MINOR(dev) (dev->pdata->ip_ver & 0xFF)
*/
struct mfc_vp9_enc_params {
/* VP9 Only */
- u8 vp9_version;
u8 profile;
+ u8 level;
u8 rc_min_qp;
u8 rc_max_qp;
u8 rc_min_qp_p;
.step = 1,
.default_value = 0,
},
+ {
+ .id = V4L2_CID_MPEG_VIDEO_VP9_PROFILE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "VP9 profile",
+ .minimum = 0,
+ .maximum = 3,
+ .step = 1,
+ .default_value = 0,
+ },
+ {
+ .id = V4L2_CID_MPEG_VIDEO_VP9_LEVEL,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "VP9 level",
+ .minimum = 10,
+ .maximum = 62,
+ .step = 1,
+ .default_value = 10,
+ },
{
.id = V4L2_CID_MPEG_VIDEO_VP9_I_FRAME_QP,
.type = V4L2_CTRL_TYPE_INTEGER,
/* profile*/
reg = 0;
- mfc_set_bits(reg, 0xF, 0, p_vp9->vp9_version);
+ mfc_set_bits(reg, 0xF, 0, p_vp9->profile);
+ /* level */
+ mfc_set_bits(reg, 0xFF, 8, p_vp9->level);
/* bit depth minus8 */
if (ctx->is_10bit) {
mfc_set_bits(reg, 0x3F, 17, 0x2);
/* for only information about wrong setting */
if (ctx->is_422) {
- if ((p_vp9->vp9_version != MFC_REG_E_PROFILE_VP9_PROFILE1) &&
- (p_vp9->vp9_version != MFC_REG_E_PROFILE_VP9_PROFILE3)) {
+ if ((p_vp9->profile != MFC_REG_E_PROFILE_VP9_PROFILE1) &&
+ (p_vp9->profile != MFC_REG_E_PROFILE_VP9_PROFILE3)) {
mfc_err_ctx("4:2:2 format is not matched with profile(%d)\n",
- p_vp9->vp9_version);
+ p_vp9->profile);
}
}
if (ctx->is_10bit) {
- if ((p_vp9->vp9_version != MFC_REG_E_PROFILE_VP9_PROFILE2) &&
- (p_vp9->vp9_version != MFC_REG_E_PROFILE_VP9_PROFILE3)) {
+ if ((p_vp9->profile != MFC_REG_E_PROFILE_VP9_PROFILE2) &&
+ (p_vp9->profile != MFC_REG_E_PROFILE_VP9_PROFILE3)) {
mfc_err_ctx("[10BIT] format is not matched with profile(%d)\n",
- p_vp9->vp9_version);
+ p_vp9->profile);
}
}
if (MFC_FEATURE_SUPPORT(dev, dev->pdata->static_info_enc))
val |= ENC_SET_STATIC_INFO;
+ if (dev->pdata->support_422)
+ val |= ENC_SET_VP9_PROFILE_LEVEL;
+
mfc_debug(5, "[CTRLS] ext info val: %#x\n", val);
return val;
p->codec.vp8.num_hier_layer = ctrl->value;
break;
case V4L2_CID_MPEG_VIDEO_VP9_VERSION:
- p->codec.vp9.vp9_version = ctrl->value;
+ p->codec.vp9.profile = ctrl->value;
break;
case V4L2_CID_MPEG_VIDEO_VP9_RC_FRAME_RATE:
p->rc_framerate = ctrl->value;
case V4L2_CID_MPEG_VIDEO_VP9_PROFILE:
p->codec.vp9.profile = ctrl->value;
break;
+ case V4L2_CID_MPEG_VIDEO_VP9_LEVEL:
+ p->codec.vp9.level = ctrl->value;
+ break;
case V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP:
p->codec.hevc.rc_frame_qp = ctrl->value;
break;