Commit 56981116 authored by Andrey Utkin's avatar Andrey Utkin Committed by Mauro Carvalho Chehab

[media] solo6x10: expose encoder quantization setting as V4L2 control

solo6*10 boards have configurable quantization parameter which takes
values from 0 to 31, inclusively.

This change enables setting it with ioctl VIDIOC_S_CTRL with id
V4L2_CID_MPEG_VIDEO_H264_MIN_QP.
Signed-off-by: default avatarAndrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: default avatarIsmael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 3ffd7166
...@@ -1121,6 +1121,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) ...@@ -1121,6 +1121,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDEO_GOP_SIZE: case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
solo_enc->gop = ctrl->val; solo_enc->gop = ctrl->val;
return 0; return 0;
case V4L2_CID_MPEG_VIDEO_H264_MIN_QP:
solo_enc->qp = ctrl->val;
return 0;
case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD: case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD:
solo_enc->motion_thresh = ctrl->val << 8; solo_enc->motion_thresh = ctrl->val << 8;
if (!solo_enc->motion_global || !solo_enc->motion_enabled) if (!solo_enc->motion_global || !solo_enc->motion_enabled)
...@@ -1271,6 +1274,8 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev, ...@@ -1271,6 +1274,8 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev,
V4L2_CID_SHARPNESS, 0, 15, 1, 0); V4L2_CID_SHARPNESS, 0, 15, 1, 0);
v4l2_ctrl_new_std(hdl, &solo_ctrl_ops, v4l2_ctrl_new_std(hdl, &solo_ctrl_ops,
V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 255, 1, solo_dev->fps); V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 255, 1, solo_dev->fps);
v4l2_ctrl_new_std(hdl, &solo_ctrl_ops,
V4L2_CID_MPEG_VIDEO_H264_MIN_QP, 0, 31, 1, SOLO_DEFAULT_QP);
v4l2_ctrl_new_std_menu(hdl, &solo_ctrl_ops, v4l2_ctrl_new_std_menu(hdl, &solo_ctrl_ops,
V4L2_CID_DETECT_MD_MODE, V4L2_CID_DETECT_MD_MODE,
V4L2_DETECT_MD_MODE_THRESHOLD_GRID, 0, V4L2_DETECT_MD_MODE_THRESHOLD_GRID, 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