From patchwork Fri Jan 13 04:13:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13099740 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 206A8C54EBD for ; Fri, 13 Jan 2023 04:14:42 +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=ruivmMdg1A4q1EcpEsnAqwBz2X/H/m2fCa9id7P7hEs=; b=ruV5DOqMUcEQ6+ q1DKZahu69lqAfR16TszD2Fg7j7MpiKjl0yVaGdWuPRzn2gI3oBuUZKuqKNbkoEnm8yVJH3O0NIE6 lzZFzobheRoRLJoSgcadzN65XCVkcCI9D2V5HAhb9T6dYOeJl/VNO/3qL0P5TF0ukE7kQX/rgBFWF K+2pSzn2zKr436bwDVqTGyaNdX4uVReYES9TMMKb9lIm7iZXs4v2folG3rx8fxRrR7huvX4nDJGkh 0EGAkhxgFHVoq5xBMk3krcbRpSjM52tdVUzPuMayWdukHuBrHs69CZcvElVQMrC7h9HiTBqmfM2es bF3qwBGQrOYa/XW1R8FA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGBRm-000MaC-Ck; Fri, 13 Jan 2023 04:13:42 +0000 Received: from mail-am6eur05on2071.outbound.protection.outlook.com ([40.107.22.71] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGBRb-000MVk-5f for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 04:13:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b+bu4Fi10AlbhlwUIgOFWo7iEzXFY8ZBLjSFxZV601aRVc7VO2K1SQlV6cXp/r7on22Ws2JRJbSFkIflQtRQxXt2z0lccbX/Gs/i6tKdhcF8ZiNFeYY9Hrh0D1322E2r+nQ/k3sDEmDOe1wFc4QPVUpAToN/7rfkC01p5snYfN6/VA4zM4OSAVrx/bXa+uT/i6oXDSHlqarkN6abAUGj28s6FiYOhwjaD3kCxmEAheJ4aNCe+rhY/PcSgGGBq8F8Q2NFGU2MYbsHkdIevuhwK2Ncwnhj6x/FaasdSk4+zwQ84QnvQr/TTmN+iWjG0nKDe00DH6VWE8MiOJdF8nx1wg== 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=8cStn8w9CF1LPdHQ48xYYM6XzYl0qHNvDi1MjnrnI+U=; b=k6Il67Wx8uCrSKG9RQ5QdRj/TDIUrTVls3OwX2EoX4xmHd4Jtzn00rA+Bv8+UYYl04YW1opvwAJ5xdmL8XndM8J7wFengzvDvCAp86/Kmnu7UtqUxvaFWZy1BzYZOHKUVb+Z+5V/a6FwRVrQ+/eQ3N2kDTFfG+9/zSABo2DFKsytzskY3PCKLSz40k2q0BFhNicMDoxysDDzf3QhZcWBGG2ZUNNOduPozOYLLFgcAkv+bDOu2cnzKaOOoVaqQkHqHm4W3+c+l/Y1ZvMpcYvVZW8ph74Ig6hJXYnc0u0BAeg2fizlMS8EZSjwpFmx+1azxyzHdLxdQq9piQQSI9xkXw== 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=8cStn8w9CF1LPdHQ48xYYM6XzYl0qHNvDi1MjnrnI+U=; b=nbXen0SNEI43/5AIV9WCqarNPQywlF9IbgthfA20PtXNFQB4RJ1SfcqhLT+LgSomduTs2rfwcBD3Are7X+jgW25ueZxR8SAnfWMjvSmTHsV2ex0lBIYQ7z7GSu2rLI6cItXGT5LbcVWQliCKS9BCHT5QyLu25Du+V+n3TOO/4xs= 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 AM8PR04MB7441.eurprd04.prod.outlook.com (2603:10a6:20b:1c4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Fri, 13 Jan 2023 04:13:27 +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.6002.013; Fri, 13 Jan 2023 04:13:27 +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, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/2] media: add RealVideo format RV30 and RV40 Date: Fri, 13 Jan 2023 12:13:06 +0800 Message-Id: <8cbe08de42af1ecf0df39970d57742445fd0d488.1673582851.git.ming.qian@nxp.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: X-ClientProxiedBy: SG2PR06CA0230.apcprd06.prod.outlook.com (2603:1096:4:ac::14) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|AM8PR04MB7441:EE_ X-MS-Office365-Filtering-Correlation-Id: a0823b29-c3be-4f28-c09e-08daf51c855a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D/uACnbROTbUq5RPoppU5F7AmMs7g1IM5acj0nMupfhaQKleWMGggnN2AR2goF2ZcjsWSm9XG2v9kmIaPuh5QNCylt85OO/yttY8fKCatadtUsrEId5qcteY2GLy/8/MWyiT9KM1vLPQYg3c9w/9i5at8SIVoLB3CBGSuRv7qIIrE36I5brCN0uJbwmwhZpw2wCJfHATS1rjJ1qUDNr1V5gJuvNZrBNo8EWKVtFEFolHftjnT3ZT7tkLp8sPIEvp7drKPptD89ElO1arP8gwh6ZiCR+ShlPRjExXX0fWnpng0AeV/F1uhDNvg/MCuTvj/eGdCX9kvjLr+FR1yTZ2hzov8xKCV1MEQB4kJha7xJBwHkaHwZQYC15qK/UQDFjoUL1M04fOH/eO+N7Rwp9g5SKq/FjSxzaqJWbF7XDHm78cw4dc8nmCUQuUhuDxma+LE0eDA5eF/t+0Om40SIvTDZq1RafD0Haw7DGa9zNX0CG+XPjemPUpes3496HYNRVa/9RX6/0VJ7XHGYW23qlC/IJAPM/1mNBCCWUtTlYENviE21/oYBORhUu6+v/58KWVsHkQ+dkkRszdrWt+2fME8QUwDF1yN0qr0Sy3+zzHCOPTUnJPDnS/MrJj6oxOs3f6ZivSTCORv+ViiiNsvOOBkqThRRc4cnGkVYzbkKR+2DM7kxGrv1U5x/AVA51VbNqiM0qKuNQo+pbnU3DyXw602Q== 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)(376002)(366004)(136003)(396003)(39860400002)(346002)(451199015)(26005)(6486002)(478600001)(52116002)(6512007)(186003)(316002)(2616005)(8676002)(66556008)(66946007)(66476007)(6506007)(4326008)(6666004)(41300700001)(2906002)(44832011)(8936002)(5660300002)(7416002)(38350700002)(38100700002)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mxIzGrzRphB46fE9vbEMk+V9ITmbXP3dOJ9vqGRvwZvsPVUmCzVsuG+72Vax2yJlw/F65nIGw8e8Ndg5FAcS+ltYQO313+F8gVmbteeafeLloZKRyfmFqJOAyBO+ni6W4x5pvLMyYJN4blFSzYifEmNF1mRH/MHL1IaDlCaiHo36JMhb1jZWQqHASILirgZhFGmQKoaZfZw0nEuaCeYQnMfTUh5nXx+nnzYq8/mcVoEOgXtp8lPqRabfSOkZ0xv0GVOlqF8n9eji7uELDP1olIiRWU5MT7ELmJbdVCZdf2Ewmqiw5jVoSVkhi1Zg/nvU732tuc+L+H4DASmWZAF2Rvy+vR1SHl4xg4hM0JVDCStbY6JRHucWiXFFDJMAdWZqsDP0oQqfI+njl9Djby3dzZQjxmvWwfJyPV2LukgQTL2BZjxu9BDCeMbWyfMe+c6fKyUDTca2rfFL6YFV4sgb42HvA/lPnxFm9CJlDYS4dwffTtItOkd7DTXbqjwAPE/xVHx1XMyObFWidlYZR8hLkwO7dONUgTg8xcugYzJaox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Exchange-CrossTenant-Network-Message-Id: a0823b29-c3be-4f28-c09e-08daf51c855a X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2023 04:13:27.3740 (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: Z65g5OtYK8A5U7W3pyWRURs7CnxMWN8PFnAq8eIRYoKr6r+azU34fVAz8npgvNEVDWEHy2+9KAwhqQkJdQBZFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7441 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_201331_257988_1FFA203B X-CRM114-Status: GOOD ( 12.73 ) 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 RealVideo, or also spelled as Real Video, is a suite of proprietary video compression formats developed by RealNetworks - the specific format changes with the version. RealVideo codecs are identified by four-character codes. RV30 and RV40 are RealNetworks' proprietary H.264-based codecs. Signed-off-by: Ming Qian Reviewed-by: Nicolas Dufresne --- .../media/v4l/pixfmt-compressed.rst | 21 +++++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 2 ++ 3 files changed, 25 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst index a0230f357680..50ac095c1f16 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst @@ -237,6 +237,27 @@ 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-RV30: + + - ``V4L2_PIX_FMT_RV30`` + - 'RV30' + - RealVideo, or also spelled as Real Video, is a suite of proprietary + video compression formats developed by RealNetworks - + the specific format changes with the version. + RealVideo codecs are identified by four-character codes. + RV30 corresponds to RealVideo 8, suspected to based largely on an early draft of H.264 + * .. _V4L2-PIX-FMT-RV40: + + - ``V4L2_PIX_FMT_RV40`` + - 'RV40' + - RV40 represents RealVideo 9 and RealVideo 10. + RealVideo 9, suspected to be based on H.264, + RealVideo 10, aka RV9 EHQ, This refers to + an improved encoder for the RV9 format + that is fully backwards compatible with RV9 players - + the format and decoder did not change, + only the encoder did. + As a result, it uses the same FourCC. .. raw:: latex diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 9b5b04b8aa69..0546b00d3fc9 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1473,6 +1473,8 @@ 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_RV30: descr = "RealVideo 8"; break; + case V4L2_PIX_FMT_RV40: descr = "RealVideo 9 & 10"; 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..b121154a6e24 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -740,6 +740,8 @@ 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_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */ +#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */