From patchwork Tue Dec 20 08:39:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13077632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BAB0C4332F for ; Tue, 20 Dec 2022 08:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RpclpMx/1Ago+afyrC/Gct1xDSakDqJiQm10mfHx3No=; b=lC/ivjqpoNF9dI mXP4syl2MRqCqTqxRoYHxbKIFImt6DQs6Vnq73+j4bvxK0sExTNuzuLP6FyCPvmCGctuk162zyXMN O6P7zPcpVNmJx+k8atg5s07OYc5fJn+a2E/nhfNGGSJ+eB5J0GJ7sq5Wz3O04wyYKj669zIOHrd0e zXD0oT7nDyP0s9TPVVCjJT3rJ31cr53xOOq7/NAmIxteQ2OqEEkXppSoAghH3m7ee8wGJsFFSYWcp jOJItSod5eZiYaPgszWQepNFNZSgKnvepz/X2Q27o2AFbMEk9LgRvq5rjX3BP/hK0WG2lj2OAfCnE wL4hcDx+v9+35QOEGTHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7YAV-00CFrP-Sd; Tue, 20 Dec 2022 08:40:12 +0000 Received: from mail-vi1eur05on2062.outbound.protection.outlook.com ([40.107.21.62] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7YAD-00CFUb-AC for linux-arm-kernel@lists.infradead.org; Tue, 20 Dec 2022 08:39:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KsyFXuOej+EwMgHhb6fsBhmC/ZY/enH/E4VJCj5yz++WGjicir64Qu5Dh9oTXFdCaVSsdOgGGTEvHBWifpLNzesyQ4Vz2GI3pYGSZMZiVWLOUTX2pmijDJ+FaJ8UOG6/YYbOtOJ2naXjnuFA5fCQNZ35Arlo21dzAiYeT8WmkTASNX1u8RabCoPVPmgCVYQ7E0j186TwGPKUG0g9c+itdgI0gdvb+lGuvuYs2r82FfrvhAt5KnEwRmSKhZbnSINrHZEW+RhSxp0vNxw875I6BL7f5EyQzXiEHg0F+0bAYIZf0KOd52GuF7NX6RVt5f2Lp2NRUWXOaM3PtKPTs77l1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=whHUPORmun3BFMevsg7TwKmjp6JejX9t/s/Y9QImNg0=; b=ixMH2dRkQdPiPhNO76bZ36dIjLdfRhSD0SczcOtU0+dv9u9SewJ6NRHC/7JMsidIRbhs6w0vE7fufBppOptw84NOewN/f4sxVKgV56S2PmDr65jQwUeCbYPlQoWbP9Anaart7UL2zz3K9bXOOgvaoKVC/Aa5ZQEHarjYJ7AQxjqSjEr3FrY0+d8jj2IpQfMuDv8ygHIyyOzT8grZS+29/NuPheqB2125jQXJE6Z/isanf4LSXKSlbA0o3XZJ5bpq8CjCm+W3epQ/wrxMkvxOWBTDxsxhY4qEwoczSslG117VG5AhGh6lCcQVDsFGTCnZ0pcjHUcHipZ/Mr69Wijgdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=whHUPORmun3BFMevsg7TwKmjp6JejX9t/s/Y9QImNg0=; b=F7zFSDo2Rbk18oYZkMuM79CXHg+GrKQB3jTIewpT0KoTsBsAaF0e7NGXtkXImKfiosW5fQ7NY2Yn1+iZifuSDbkTZ7j+uj1nD0b0DCwgKD0mECrUlfEgZPBQMS+rFQ4y7/wUKek1NEzGxvr8DqG0k8YjcHR91t5cjx95pnv/+OI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by PAXPR04MB9255.eurprd04.prod.outlook.com (2603:10a6:102:2bb::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Tue, 20 Dec 2022 08:39:49 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::3a82:42b3:f1ed:5c3d%7]) with mapi id 15.20.5924.016; Tue, 20 Dec 2022 08:39:49 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, ming.zhou@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] media: add RealMedia format Date: Tue, 20 Dec 2022 16:39:19 +0800 Message-Id: <969b6905c945a1cf0986a2188290ddf3c52c5511.1671525379.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SG2PR03CA0098.apcprd03.prod.outlook.com (2603:1096:4:7c::26) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|PAXPR04MB9255:EE_ X-MS-Office365-Filtering-Correlation-Id: 441ab82f-0718-449f-e270-08dae265c170 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ekTP+uGs2Ual3FH4orfCAGmr3YTRustcV22Xt8ifG7jSTL9SeswZwgt/boO7/ZH26bVaUsFhxzJ+jXtIlrOYrhsLrOm9HU9fjrp5H9lZHa/JASkmtQTfydbUj6jSaPr7gY22yvPMvd1S0ryrRLTGL44FibHUTMrWDE+7dWWrS2RWGzx2ZDR3ZVbp3q0kK1hzcsdj7XKAMQeQS6dOZMv3Qsczlk1qr1giQRGYXl7q0RqTMavUnjtXKkRwMDKz9PW+uoRkoesjYvB9vmOTBRoK4cxSoRdY/nCyV6k/pvpxyoEnIjMHHdXQHa13yxE8lzgn7N9uJdWV3iT37BnapYJqnWDm4E8huDB5nxipPuoZ48E/m7G6i4RaLCoEu2Xv9T0wplARaGXiwjceCvxkrv8jJl0+uCEQfBV0IZ2c1NR7DHwObMDa4P+l9Ix8cPIje9PAUGdTBlhmbmFVc7OZvCmwDgFmdjQJdOjJdOGndbzVqhybbsw1dS6gfhVUi2sCrxMMA+oYc2DxWPvxseSdGgwsS3iIBKVH04SzoMt4SFnW2n4ivvl+JF9uvtAVyXcZNtgBi7QWmITJT7cuYaVXTMbGvMvntpuqG5nAFzwyPsxHU796vF23hEAAKlFd6MxOISb9uRoOcCubk371kAnVGfD0qwWoHmV17OLC/zcBx1c5A86ECDUvI0e1vJ/MttVnazbjM1YdSAtKYfB08BBnmfJxFw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(366004)(136003)(376002)(396003)(451199015)(5660300002)(7416002)(86362001)(6512007)(52116002)(186003)(26005)(316002)(6486002)(44832011)(36756003)(6506007)(478600001)(66476007)(38100700002)(66946007)(66574015)(2616005)(38350700002)(66556008)(2906002)(8936002)(4326008)(6666004)(8676002)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: l/PznE0gxOMrTDNb8EIvNJUs8mJMk2VPvHX+t7FPGphzA7RfnOlje0arsIdMV2yFIcsgDam5Zij4CCGH4IcxzpkM9JNEvaeuerU1zK7un7ta+ysEr20z3FByjKFAnhq4y65hFffrvtN4ypKA5KVmySzGCgwWJWhgiZJB77xGvoCbc8V+WneFciSqkLfi2TxGCxyOM0thTj26oVx1L3iERNg3aOfc4nYEBQoHeFEr7UeN64rkt/KobK52TFsl8vCEItsUgoN/tsZ7mXczhnsNatbRF5fcv1otTj3bWSHPtpUW1zvlu0DrIaXBnt2j3P1q/mh89IZX9biRvVO8vMb/0FuPIJRgEKcA6OqrzFO2nzjvNF+PMj7vKYe1jQAHNqfTmrOuxnDnHAU20K12uHwBD8VCVUgj8+w2CQ1rLFG7wXuO+epOoQ0KMQvTSqJ3nB9JKe8SbhKxuGqBsZO9MkxnJGYUr9XrhhXITpZgS9u6zNFou3a5pyvOCifw80yRN3J7WZXeWkcj9UJh3ak562lqR2YamQA4Jd3ghAHt39TYmBZQAitNVH99mZq8K6kqZtuZj7PVGC+QMmj3r+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change-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2022 08:39:49.3196 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a19TAyWtwCF0ZVtxbFmiqJ4mxH0YVhenE8+c+LcQBV7ooUDZmzaB88xHOXKAh3HCeMU0ZX3n7AEtoaUfMGoVdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9255 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221220_003953_529636_2A40BF36 X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org RealMedia is a proprietary multimedia container format created by RealNetworks with the filename extension .rm. RealMedia is generally used in conjunction with RealVideo and RealAudio, while also being used for streaming content over the Internet. Signed-off-by: Ming Qian --- .../userspace-api/media/v4l/pixfmt-compressed.rst | 11 +++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 13 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst index 8794b92fde36..31ba2c00091e 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst @@ -237,6 +237,17 @@ Compressed Formats Metadata associated with the frame to decode is required to be passed through the ``V4L2_CID_STATELESS_FWHT_PARAMS`` control. See the :ref:`associated Codec Control ID `. + * .. _V4L2-PIX-FMT-RV: + + - ``V4L2_PIX_FMT_RV`` + - 'RealMedia' + - RealMedia is a proprietary multimedia container format + created by RealNetworks with the filename extension .rm. + RealMedia is generally used in conjunction with RealVideo and RealAudio, + while also being used for streaming content over the Internet. + Typically these streams are in CBR (constant bitrate), + but a container for VBR (variable bitrate) streams + named RMVB (RealMedia variable bitrate) has been developed. .. raw:: latex diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 9b5b04b8aa69..a4d12eea7fc5 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1473,6 +1473,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_FWHT: descr = "FWHT"; break; /* used in vicodec */ case V4L2_PIX_FMT_FWHT_STATELESS: descr = "FWHT Stateless"; break; /* used in vicodec */ case V4L2_PIX_FMT_SPK: descr = "Sorenson Spark"; break; + case V4L2_PIX_FMT_RV: descr = "RealMedia"; break; case V4L2_PIX_FMT_CPIA1: descr = "GSPCA CPiA YUV"; break; case V4L2_PIX_FMT_WNVA: descr = "WNVA"; break; case V4L2_PIX_FMT_SN9C10X: descr = "GSPCA SN9C10X"; break; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 262ef10cfa02..a7a7969ae4f8 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -740,6 +740,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */ #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */ #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */ +#define V4L2_PIX_FMT_RV v4l2_fourcc('R', 'V', '0', '0') /* RealMedia */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */