From patchwork Wed Jul 11 14:17:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar K X-Patchwork-Id: 13317 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1SoxVc-000081-JO for patchwork@linuxtv.org; Wed, 11 Jul 2012 16:03:16 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1SoxVb-0001ZB-HC; Wed, 11 Jul 2012 16:03:16 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932726Ab2GKODL (ORCPT ); Wed, 11 Jul 2012 10:03:11 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:52457 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932674Ab2GKODJ (ORCPT ); Wed, 11 Jul 2012 10:03:09 -0400 Received: from epcpsbgm2.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M70003ZD1P10YU0@mailout2.samsung.com> for linux-media@vger.kernel.org; Wed, 11 Jul 2012 23:03:08 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-ac-4ffd879c82db Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BE.4F.23690.C978DFF4; Wed, 11 Jul 2012 23:03:08 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M7000LFC1OYVM10@mmp2.samsung.com> for linux-media@vger.kernel.org; Wed, 11 Jul 2012 23:03:08 +0900 (KST) From: Arun Kumar K To: linux-media@vger.kernel.org Cc: jtp.park@samsung.com, janghyuck.kim@samsung.com, jaeryul.oh@samsung.com, ch.naveen@samsung.com, arun.kk@samsung.com, m.szyprowski@samsung.com, k.debski@samsung.com, s.nawrocki@samsung.com, hverkuil@xs4all.nl, mchehab@infradead.org, kmpark@infradead.org, joshi@samsung.com Subject: [PATCH v1 1/2] [media] v4l: Add fourcc definitions for new formats Date: Wed, 11 Jul 2012 19:47:09 +0530 Message-id: <1342016230-14278-2-git-send-email-arun.kk@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1342016230-14278-1-git-send-email-arun.kk@samsung.com> References: <1342016230-14278-1-git-send-email-arun.kk@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd057X/9DXZv5bPo2bCV1YHR4/Mm uQDGKC6blNSczLLUIn27BK6MB5vmsRS0GVRcebKVvYHxvEYXIyeHhICJxImbC1ggbDGJC/fW s3UxcnEICUxnlJh56wgLhLOcSeLEo4fMIFVsAhoS9048ZgWxRQTkJZ703gDrYBaYySSxpPUr G0hCWMBbYn37brAGFgFVifWr1jKC2LwCzhKnJt1gglinING67BA7iM0p4CLxdd9toG0cQNuc JRYtlZ3AyLuAkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRrDPn0nvYFzVYHGIUYCDUYmH 90LFX38h1sSy4srcQ4wSHMxKIrxShUAh3pTEyqrUovz4otKc1OJDjNIcLErivCbeX/2FBNIT S1KzU1MLUotgskwcnFINjI77rJ4G/hJ4dCgz+uS3L26K61zO63yawLp1cxGDxPyPwqVfruye cKbZfm+7iEjIT2GZ1WK6fOLVxif5v9Qv0P1Zt/VDbT5DpVZfe+G75NRZD5Y13L4pEXDT0zjv +9Y1q72eieunH9v0Tb5wW9TqtxxeJveYbT1vfZimdHbDXGW9s+v+Gcpp3FViKc5INNRiLipO BADBWSXd9QEAAA== X-TM-AS-MML: No Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.7.11.135720 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_6000_6999 0, BODY_SIZE_7000_LESS 0, FROM_NAME_PHRASE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' From: Jeongtae Park Adds the following new fourcc definitions. For multiplanar YCbCr - V4L2_PIX_FMT_NV21M - V4L2_PIX_FMT_NV12MT_16X16 and compressed formats - V4L2_PIX_FMT_H264_MVC - V4L2_PIX_FMT_VP8 Signed-off-by: Jeongtae Park Signed-off-by: Naveen Krishna Chatradhi Signed-off-by: Arun Kumar K Cc: Marek Szyprowski Cc: Kamil Debski --- Documentation/DocBook/media/v4l/pixfmt-nv12m.xml | 17 ++++++++++++----- Documentation/DocBook/media/v4l/pixfmt.xml | 10 ++++++++++ include/linux/videodev2.h | 4 ++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml index 5274c24..a990b34 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml @@ -1,11 +1,13 @@ - + - V4L2_PIX_FMT_NV12M ('NM12') + V4L2_PIX_FMT_NV12M ('NM12'), V4L2_PIX_FMT_NV21M ('NM21'), V4L2_PIX_FMT_NV12MT_16X16 &manvol; - V4L2_PIX_FMT_NV12M - Variation of V4L2_PIX_FMT_NV12 with planes + V4L2_PIX_FMT_NV12M + V4L2_PIX_FMT_NV21M + V4L2_PIX_FMT_NV12MT_16X16 + Variation of V4L2_PIX_FMT_NV12 and V4L2_PIX_FMT_NV21 with planes non contiguous in memory. @@ -22,7 +24,12 @@ The CbCr plane is the same width, in bytes, as the Y plane (and of the image), but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example, Cb0/Cr0 belongs to Y'00, Y'01, -Y'10, Y'11. +Y'10, Y'11. +V4L2_PIX_FMT_NV12MT_16X16 is the tiled version of +V4L2_PIX_FMT_NV12M with 16x16 macroblock tiles. Here pixels +are arranged in 16x16 2D tiles and tiles are arranged in linear order in memory. +V4L2_PIX_FMT_NV21M is the same as V4L2_PIX_FMT_NV12M +except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte. V4L2_PIX_FMT_NV12M is intended to be used only in drivers and applications that support the multi-planar API, diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index e58934c..424b335 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -757,6 +757,11 @@ extended control V4L2_CID_MPEG_STREAM_TYPE, see 'AVC1' H264 video elementary stream without start codes. + + V4L2_PIX_FMT_H264_MVC + 'MVC' + H264 MVC video elementary stream. + V4L2_PIX_FMT_H263 'H263' @@ -792,6 +797,11 @@ extended control V4L2_CID_MPEG_STREAM_TYPE, see 'VC1L' VC1, SMPTE 421M Annex L compliant stream. + + V4L2_PIX_FMT_VP8 + 'VP8' + VP8 video elementary stream. + diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f79d0cc..e23e6a7 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -359,7 +359,9 @@ struct v4l2_pix_format { /* two non contiguous planes - one Y, one Cr + Cb interleaved */ #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ +#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ +#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */ /* three non contiguous planes - Y, Cb, Cr */ #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ @@ -395,6 +397,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ +#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */ #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ @@ -402,6 +405,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ +#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */