From patchwork Tue Feb 4 09:59:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Grover X-Patchwork-Id: 3574711 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 624109F2E9 for ; Tue, 4 Feb 2014 09:59:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71F6020176 for ; Tue, 4 Feb 2014 09:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A59020170 for ; Tue, 4 Feb 2014 09:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbaBDJ6f (ORCPT ); Tue, 4 Feb 2014 04:58:35 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:37609 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753983AbaBDJ6B (ORCPT ); Tue, 4 Feb 2014 04:58:01 -0500 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0G00CF8UCN9650@mailout4.samsung.com>; Tue, 04 Feb 2014 18:57:59 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id EF.DF.14803.7A9B0F25; Tue, 04 Feb 2014 18:57:59 +0900 (KST) X-AuditID: cbfee691-b7efc6d0000039d3-83-52f0b9a7b34a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 90.B1.29263.7A9B0F25; Tue, 04 Feb 2014 18:57:59 +0900 (KST) Received: from user-laptop.sisodomain.com ([107.109.108.128]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N0G00AM7UC4PY00@mmp2.samsung.com>; Tue, 04 Feb 2014 18:57:59 +0900 (KST) 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 1/2] [media] v4l2: Add settings for Horizontal and Vertical MV Search Range Date: Tue, 04 Feb 2014 15:29:58 +0530 Message-id: <1391507999-31437-2-git-send-email-amit.grover@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1391507999-31437-1-git-send-email-amit.grover@samsung.com> References: <52E0ED10.2020901@samsung.com> <1391507999-31437-1-git-send-email-amit.grover@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsWyRsSkSnf5zg9BBj+6lC2e9X1itXjZW2jR 3GFr8fHUbVaL+Z9usli8aU+yWPJzF5PFqcnPmCz6H61ntJh9/zGLxZG1V5ksfry+wGZxtukN u8Wmx9dYLRa2LWGxuLxrDptFz4atQMPur2C2ePrqOZvF4TftrBZtXVMZHUQ9pvzeyOqxc9Zd do9Xq2eyemxeUu8x68Jmdo8vq64xe/RtWcXo8XmTnMepr5/ZAzijuGxSUnMyy1KL9O0SuDLW n1zEVLBYvuLy12fMDYy3pboYOTkkBEwkruz+zAxhi0lcuLe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LbF9xnKwhIjABiaJh90X2UEcZoFX jBLHJq9gBhkrLBArseVSAUgDi4CqxPz2v4wgNq+Au8Sb6buZIDYrSMyZBLaZU8BD4sTeC0wg tpBAhsS745fYJjDyLmBkWMUomlqQXFCclJ5rqFecmFtcmpeul5yfu4kRHPHPpHYwrmywOMQo wMGoxMOroPIhSIg1say4MvcQowQHs5IIr/k2oBBvSmJlVWpRfnxRaU5q8SHGZKCjJjJLiSbn A5NRXkm8obGJuamxqaWJhYmZJWnCSuK8B1qtA4UE0hNLUrNTUwtSi2C2MHFwSjUwno3f9s0z 6VFLvp13wC+Wb/xp22QDF+sfF/5650N98uavr1Y+NNNiO878tLnm62QF84p3sj/P1P44szRl 0szCpX4MtvyvljYoGEqcWWA6Z21pJHO2MO/DIi+Fkl/bRBQO7WUNvvHqVI1E/N4rzgrTV3Tn v7/h2rvx3C5ruc/C7K2a3ondnie4lFiKMxINtZiLihMBunxYJzwDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Hans Verkuil Acked-by: Lad, Prabhakar --- Documentation/DocBook/media/v4l/controls.xml | 20 ++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 6 ++++++ include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 28 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index a5a3188..0e1770c 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 6ff002b..e9e12c4 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 */ @@ -910,6 +912,10 @@ 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: + case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: + *type = V4L2_CTRL_TYPE_INTEGER; + 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 2cbe605..cda6fa0 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -376,6 +376,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)