summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.utkin@corp.bluecherry.net>2014-07-08 12:23:32 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 20:04:20 -0300
commit569811160561225d05b945d829ab831b87a044b1 (patch)
tree534ea7c719618e6b4a1442f85b88d8cec9f2e3b6
parent3ffd7166e41de75faf6fd908c63feffa45596ea4 (diff)
downloadlinux-569811160561225d05b945d829ab831b87a044b1.tar.bz2
[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: Andrey Utkin <andrey.utkin@corp.bluecherry.net> Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
index 968666a544dc..748a73a5f32d 100644
--- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
@@ -1121,6 +1121,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
solo_enc->gop = ctrl->val;
return 0;
+ case V4L2_CID_MPEG_VIDEO_H264_MIN_QP:
+ solo_enc->qp = ctrl->val;
+ return 0;
case V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD:
solo_enc->motion_thresh = ctrl->val << 8;
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,
V4L2_CID_SHARPNESS, 0, 15, 1, 0);
v4l2_ctrl_new_std(hdl, &solo_ctrl_ops,
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_CID_DETECT_MD_MODE,
V4L2_DETECT_MD_MODE_THRESHOLD_GRID, 0,