Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752687AbaA3Fku (ORCPT ); Thu, 30 Jan 2014 00:40:50 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:51262 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbaA3Fko (ORCPT ); Thu, 30 Jan 2014 00:40:44 -0500 X-AuditID: cbfee691-b7efc6d0000039d3-6d-52e9e5dbbc46 From: Amit Grover To: linux-media@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kyungmin.park@samsung.com, k.debski@samsung.com, prabhakar.csengg@gmail.com, s.nawrocki@samsung.com, hans.verkuil@cisco.com, hverkuil@xs4all.nl, swaminath.p@samsung.com Cc: jtp.park@samsung.com, Rrob@landley.net, andrew.smirnov@gmail.com, anatol.pomozov@gmail.com, jmccrohan@gmail.com, joe@perches.com, awalls@md.metrocast.net, arun.kk@samsung.com, amit.grover@samsung.com, austin.lobo@samsung.com Subject: [PATCH v2 1/2] drivers/media: v4l2: Add settings for Horizontal and Vertical MV Search Range Date: Thu, 30 Jan 2014 11:12:42 +0530 Message-id: <1391060563-27015-2-git-send-email-amit.grover@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1391060563-27015-1-git-send-email-amit.grover@samsung.com> References: <52E0ED10.2020901@samsung.com> <1391060563-27015-1-git-send-email-amit.grover@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHIsWRmVeSWpSXmKPExsWyRsSkWvf205dBBusbZSye9X1itXjZW2jR 3GFr8fHUbVaL+Z9usli8aU+yWPJzF5PFqcnPmCz6H61ntJh9/zGLxZG1V5ksfry+wGZxtukN u8Wmx9dYLRa2LWGxuLxrDptFz4atQMPur2C2ePrqOZvF4TftrBZtXVMZHUQ9pvzeyOqxc9Zd do9Xq2eyemxeUu8x68Jmdo8vq64xe/RtWcXo8XmTnMepr5/ZAziju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6i5GTQ0LARGL2lSWMELaY xIV769m6GLk4hAQWMUqc6u1ihnB6mCRaj31kBqliE9CW2D5jOViViMAGJomH3RfZQRxmgVeM EscmrwCrEhZIl/h+eRs7iM0ioCox8+INFhCbV8BdYs3ay6xdjBxA+xQk5kyyAQlzCnhI3P3/ BuwMIYEMiWct11gnMPIuYGRYxSiaWpBcUJyUnmukV5yYW1yal66XnJ+7iREc9c+kdzCuarA4 xCjAwajEw7ti8ssgIdbEsuLK3EOMEhzMSiK8cXeBQrwpiZVVqUX58UWlOanFhxiTgY6ayCwl mpwPTEh5JfGGxibmpsamliYWJmaWpAkrifMebLUOFBJITyxJzU5NLUgtgtnCxMEp1cA488Jm Wc1fsqcurynUu3Bf6aO2v8VWsd4VKpMZPff1SR/i3XPpRezqGfv3ZHQlxE40nfd9kWXA9OBp q9cve6wgaH5ffu3BFUsv7MpquaHII3fAPPBQNY/pjQSVL78rtGb/4J+YtVzSTfeMnGxLsfLZ Q75xVQ5yq1+xV9VLprtOfH5X6ppzQ88pJZbijERDLeai4kQAKwGpCz4DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding V4L2 controls for horizontal and vertical search range in pixels for motion estimation module in video encoder. Signed-off-by: Swami Nathan Signed-off-by: Amit Grover --- Documentation/DocBook/media/v4l/controls.xml | 20 ++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 14 ++++++++++++++ include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 36 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 7a3b49b..be04d18 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -2258,6 +2258,26 @@ Applicable to the MPEG1, MPEG2, MPEG4 encoders. VBV buffer control. + + + V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE  + integer + + Horizontal search range defines maximum horizontal search area in pixels +to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set +horizontal search range for motion estimation module in video encoder. + + + + + V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE  + integer + + Vertical search range defines maximum vertical search area in pixels +to search and match for the present Macroblock (MB) in the reference picture. This V4L2 control macro is used to set +vertical search range for motion estimation module in video encoder. + + V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE  diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index fb46790..e775388 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -735,6 +735,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS"; case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count"; case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV Control"; + case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: return "Horizontal MV Search Range"; + case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: return "Vertical MV Search Range"; case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER: return "Repeat Sequence Header"; /* VPX controls */ @@ -905,6 +907,18 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, *min = 0; *max = *step = 1; break; + case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: + *type = V4L2_CTRL_TYPE_INTEGER; + *min = 16; + *max = 128; + *step = 16; + break; + case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: + *type = V4L2_CTRL_TYPE_INTEGER; + *min = 16; + *max = 128; + *step = 16; + break; case V4L2_CID_PAN_RESET: case V4L2_CID_TILT_RESET: case V4L2_CID_FLASH_STROBE: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 1666aab..80e1def 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -372,6 +372,8 @@ enum v4l2_mpeg_video_multi_slice_mode { #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226) +#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227) +#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/