Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3790763rwb; Mon, 16 Jan 2023 13:03:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXuHYr3CyrKWHcTD/44R4CTPGlntH95kDST+iTEBR2dF3tAwsWujzr/IFJi9wRQ/h0hFMpzZ X-Received: by 2002:a05:6a20:4a1d:b0:b8:a0e1:2750 with SMTP id fr29-20020a056a204a1d00b000b8a0e12750mr348456pzb.4.1673902986203; Mon, 16 Jan 2023 13:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673902986; cv=none; d=google.com; s=arc-20160816; b=WkQixD4K/yzWvDnd2jFi74uou92Fq3pILUtY3Ksvw8vmH8KPZwHYeKGya/UaghpqQQ VUb+dDWHD39pt5uYHodD3pPJlotzze26AFqiaXNtdhtQFEaUCqEPVzTIQm0iOxoymxeu gF/u6B95PSfXZkg3qC+mSgAEuseBFBMqDzbC7tVBp5gitd8uKfrmIOf8lsvUdLffthku SL2POEjaJivflar8DFfkoXBX29DD+Rp7zRE/01xhyPtAGD9inWT/z97C4ROAqxDe5t1k tt+Wha09MMkKgMFssgz3iKWvOrZYd4qZ1zzhPAa1bjBljY5+s2MrebLbEXK0dSjSHaT4 2XIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=auTQc7ls171FtB9Rdx/AnXWuASX8tEkcbzG+L/Ndly4=; b=BtTLhSd+1DMMZd0vz1OygE1KNBx/MAIyx+MLwjU75d+pCewo/AiiDdRJlOn4fUXFXy oflLxpubPfelKCv8npo2LiHALw+5iK+gHOOZ+ECVbRGuXFEcapZ/wFNfg4XCr6fjstRa bfqO9rrG35yaMm/JWKT9BxbLS+puqaI/j5lKOpAcSzOlIgTo6n/of8eysQomoV9rvOYa wAwDOB3m9A263GshVLoar30VL7q4K0EFUYYtGhC6sMJSqyWBk0R020HjKYo6crI4PckB ddoF7XFB5koiueBKpPP6IHJXHzrxR7Ynvfc8078zcpjWrrdYoWCkmgZwjW6d1/QDDeOa hecQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=aN1JZAow; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k16-20020a63d110000000b0046edf6e538asi30840190pgg.417.2023.01.16.13.02.59; Mon, 16 Jan 2023 13:03:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ndufresne-ca.20210112.gappssmtp.com header.s=20210112 header.b=aN1JZAow; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232590AbjAPUrX (ORCPT + 50 others); Mon, 16 Jan 2023 15:47:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbjAPUrT (ORCPT ); Mon, 16 Jan 2023 15:47:19 -0500 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15BB527D78 for ; Mon, 16 Jan 2023 12:47:18 -0800 (PST) Received: by mail-qt1-x82b.google.com with SMTP id j9so2851491qtv.4 for ; Mon, 16 Jan 2023 12:47:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=auTQc7ls171FtB9Rdx/AnXWuASX8tEkcbzG+L/Ndly4=; b=aN1JZAowCcPnqXMuFHUgpfYS+p0a8c8JGxCVQULJl7zIBYhubq/5B+7M42XVKzYjTU R8f6bBFeDZkOEt2SjkA5jFMAlrXGIc9jvP+JT5hJm743XSo09G92NQpg2a3RZoILq38k JchvWT9JeAnlETFdZ4QMnHA2fycGEWsr3eAAU1i1hn3AoLNw0o3bQPdr6tf+XS24wYCM A7rzh2BBCdtrYVXIbzkytAfAkIVCmkS9Pd5pE0oe46MRJ+lxlWYmx6ZqbPrjhacn3yQt OyLsRkhRglSVOcCAOPzHzZws1qVU+1kDh8PvLOOzua8G5BrQy0OTJ6d9vZnCJKkDNiqM ALqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=auTQc7ls171FtB9Rdx/AnXWuASX8tEkcbzG+L/Ndly4=; b=XSH/gPhDaToTmdoYIutEGJeBS01qC8y+0mYHBlnHGLb7obeBQMP/uDzWr0g2YBH6CT 8xR4oP4afRoNR+3UnTfbYSLWUECrPjtHQhB7KnkAn/z6F2WQMCCWf2WGez3zhEPVLnFY qu3YFY0aH9asZarr3JnbirZNIOMW8ZPDAGivnaL7yJ8JBu8Rczv0sZ+P4rwMiglUHZYa SOfs5Sw8ZMdL9oaVyurJ9pNt6LCb0ltyayMm7YE35m5+C93UikDAOkmmVw+4WIafDK43 Vg7/BZlWYl/fHsXYDODLrXpEbmTxA6Dv11KOSU6pwZ+dMyxsW7MyEZ4VdCd58R0qOYYg qZaQ== X-Gm-Message-State: AFqh2krZIczV14gh2XiQ//3Hpyod8GdqxDHzGWyuhYiFP0F17DZsZ0+d 9zxmNMArPq2M+2pDo6WC8cpsfg== X-Received: by 2002:a05:622a:4a83:b0:3b4:7e41:daa8 with SMTP id fw3-20020a05622a4a8300b003b47e41daa8mr702301qtb.28.1673902037214; Mon, 16 Jan 2023 12:47:17 -0800 (PST) Received: from nicolas-tpx395.localdomain (192-222-136-102.qc.cable.ebox.net. [192.222.136.102]) by smtp.gmail.com with ESMTPSA id br31-20020a05620a461f00b006fa2cc1b0fbsm18713536qkb.11.2023.01.16.12.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 12:47:16 -0800 (PST) Message-ID: Subject: Re: [PATCH v3 1/2] media: add RealVideo format RV30 and RV40 From: Nicolas Dufresne To: Ming Qian , 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 Date: Mon, 16 Jan 2023 15:47:14 -0500 In-Reply-To: <8cbe08de42af1ecf0df39970d57742445fd0d488.1673582851.git.ming.qian@nxp.com> References: <8cbe08de42af1ecf0df39970d57742445fd0d488.1673582851.git.ming.qian@nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 (3.46.2-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le vendredi 13 janvier 2023 =C3=A0 12:13 +0800, Ming Qian a =C3=A9crit=C2= =A0: > 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. >=20 > Signed-off-by: Ming Qian > --- > .../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(+) >=20 > 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 p= assed > 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 propriet= ary > + 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 a= n early draft of H.264 to *be* based on. Just a style comment too, but the flow could be improved while fixing this = typo. Lines in this paragraph seems very uneven. > + * .. _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. It feels this one could be wider ? But again, this is cosmetic at this poin= t. For the API changes, assuming fixed typo and improved style: Reviewed-by: Nicolas Dufresne > =20 > .. raw:: latex > =20 > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-co= re/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 *f= mt) > case V4L2_PIX_FMT_FWHT: descr =3D "FWHT"; break; /* used in vicodec *= / > case V4L2_PIX_FMT_FWHT_STATELESS: descr =3D "FWHT Stateless"; break; /= * used in vicodec */ > case V4L2_PIX_FMT_SPK: descr =3D "Sorenson Spark"; break; > + case V4L2_PIX_FMT_RV30: descr =3D "RealVideo 8"; break; > + case V4L2_PIX_FMT_RV40: descr =3D "RealVideo 9 & 10"; break; > case V4L2_PIX_FMT_CPIA1: descr =3D "GSPCA CPiA YUV"; break; > case V4L2_PIX_FMT_WNVA: descr =3D "WNVA"; break; > case V4L2_PIX_FMT_SN9C10X: descr =3D "GSPCA SN9C10X"; break; > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev= 2.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') /* Sorenso= n Spark */ > +#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVid= eo 8 */ > +#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVid= eo 9 & 10 */ > =20 > /* Vendor-specific formats */ > #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 Y= UV */