[v10,3/5] media: Documentation: aspeed-video: Add user documentation for the aspeed-video driver
Message ID | 20221025090203.5623-4-jammy_huang@aspeedtech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp892540wru; Tue, 25 Oct 2022 02:09:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4JoVc7tUzSBV0z+S67YF53SFqWAQ0fWEsfkw/tem8TzKteoZckoEwCsR2NfQEjb7YT9AAr X-Received: by 2002:a17:907:3188:b0:741:4bf7:ec1a with SMTP id xe8-20020a170907318800b007414bf7ec1amr32118428ejb.448.1666688975990; Tue, 25 Oct 2022 02:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666688975; cv=none; d=google.com; s=arc-20160816; b=X8U9oFAQaOJl6CwmC5TnubHI0i7k6I3x784mrrJKo4hHI5g5pvLoVcafwxsJ+14mlm inAbwK1U7dy66atnf1WqRnMjOUgXTfclV/71t9qGvDg43w7SaqCHLFG7EzX+nkPp7F41 +B8bNiNPgN3l6W1f17o2TBeKeXR64UyKvVw0UVLeeme1EPLwbHCWIHMhfY8T9SkTK3mF qZVgq6mVh4LnB5yM/aThVrfoNyd/MsSLUZUPBd0nY/Sa5wmjXQanmRaqcC5/ovasCr2u LvteWmSnu1uQXntrqbTRhqBvbz1jE/hpbOJ41ERxEQTiXl2Www9jGGEAbHmrvqmbXiAk ZHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=3jsAo0mZ9ML0tmg3qnGN3gbSkUz6cSv1+uJyWtv19FI=; b=E2B3pWL+MGCqEGN3pQBEUT51L0Hl9q80gY3y81qo9sdd4JzJtZEeaF4arysajnvfmQ /47HMYTCvPhkfnH3zxMqaJ4awYd3Dsm7TbbEe5/zp7oEVkfG+iZQHzISs2sRcJcThJiM IlYWUzYiZ7TCkplQk/pdXJgJW4ycPIls0PBcXNdTrEhaUTy2vvHBMO22PDBffI2fW+Lo rI6c7pPLoLp2VW01I+7l/ilY6URnJakUzTb5KcHFvd5UQf2E17c0I4OGoemQqGK0gnv4 GSMSqNX6U0I255M2leWGXrRXKR3nU4OtXW90+XftorRUb4q+6xTQ+p5EOATxicfS9/zz 1iBg== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a50d709000000b00458c9c8a637si1967514edi.328.2022.10.25.02.09.09; Tue, 25 Oct 2022 02:09:35 -0700 (PDT) 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; 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 S231948AbiJYJE2 (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 05:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231996AbiJYJDx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 05:03:53 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A0D159D64; Tue, 25 Oct 2022 02:03:34 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 29P8dHbv031240; Tue, 25 Oct 2022 16:39:17 +0800 (GMT-8) (envelope-from jammy_huang@aspeedtech.com) Received: from JammyHuang-PC.aspeed.com (192.168.2.115) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Oct 2022 17:02:03 +0800 From: Jammy Huang <jammy_huang@aspeedtech.com> To: <eajames@linux.ibm.com>, <mchehab@kernel.org>, <joel@jms.id.au>, <andrew@aj.id.au>, <hverkuil-cisco@xs4all.nl>, <laurent.pinchart@ideasonboard.com>, <xavier.roumegue@oss.nxp.com>, <ezequiel@vanguardiasur.com.ar>, <stanimir.varbanov@linaro.org>, <nicolas.dufresne@collabora.com>, <sakari.ailus@linux.intel.com>, <ming.qian@nxp.com>, <andrzej.p@collabora.com>, <linux-media@vger.kernel.org>, <openbmc@lists.ozlabs.org>, <linux-arm-kernel@lists.infradead.org>, <linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v10 3/5] media: Documentation: aspeed-video: Add user documentation for the aspeed-video driver Date: Tue, 25 Oct 2022 17:02:01 +0800 Message-ID: <20221025090203.5623-4-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025090203.5623-1-jammy_huang@aspeedtech.com> References: <20221025090203.5623-1-jammy_huang@aspeedtech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.115] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 29P8dHbv031240 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747650059567579443?= X-GMAIL-MSGID: =?utf-8?q?1747650059567579443?= |
Series |
add aspeed-jpeg support for aspeed-video
|
|
Commit Message
Jammy Huang
Oct. 25, 2022, 9:02 a.m. UTC
Add user documentation for the aspeed-video driver.
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
---
v10:
- new
---
.../media/drivers/aspeed-video.rst | 61 +++++++++++++++++++
.../userspace-api/media/drivers/index.rst | 1 +
2 files changed, 62 insertions(+)
create mode 100644 Documentation/userspace-api/media/drivers/aspeed-video.rst
Comments
Hi Jammy, thanks for the addition. Le mardi 25 octobre 2022 à 17:02 +0800, Jammy Huang a écrit : > Add user documentation for the aspeed-video driver. > > Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> > --- > v10: > - new > --- > .../media/drivers/aspeed-video.rst | 61 +++++++++++++++++++ > .../userspace-api/media/drivers/index.rst | 1 + > 2 files changed, 62 insertions(+) > create mode 100644 Documentation/userspace-api/media/drivers/aspeed-video.rst > > diff --git a/Documentation/userspace-api/media/drivers/aspeed-video.rst b/Documentation/userspace-api/media/drivers/aspeed-video.rst > new file mode 100644 > index 000000000000..798a2588b175 > --- /dev/null > +++ b/Documentation/userspace-api/media/drivers/aspeed-video.rst > @@ -0,0 +1,61 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +.. include:: <isonum.txt> > + > +ASPEED video driver > +=================== > + > +ASPEED Video Engine found on AST2400/2500/2600 SoC supports high performance > +video compressions with a wide range of video quality and compression ratio > +options. The adopted compressing algorithm is a modified JPEG algorithm. > + > +There are 2 types of compressions in this IP. > + > +* JPEG JFIF standard mode: for single frame and management compression > +* ASPEED proprietary mode: for multi-frame and differential compression. > + Support 2-pass (high quality) video compression scheme (Patent pending by > + ASPEED). Provide visually lossless video compression quality or to reduce > + the network average loading under intranet KVM applications. I think some of the information disclosed in the following quote could be summarized. Notably the part about the extra buffers. Aspeed JPEG Format requires an additional buffer, called bcd, to store the information about which macro block in the new frame is different from the previous one. To have bcd correctly working, we need to swap the buffers for src0/1 to make src1 refer to previous frame and src0 to the coming new frame. But before I push you this route, have you considered using a dedicated pixel format instead ? Here's my thinking, the output of the JPEG encoder is no longer "compatible" (or at least won't yield the expected images) if used with a normal JPEG decoder. By differentiating these two as dedicated formats, you will only need 1 vendor control, and you avoid the potential risk of software bugs mixing them up. Also note that there is other JPEG based vendor formats that exist in V4L2. Let me know what do you think ? Nicolas > + > +More details on the ASPEED video hardware operations can be found in > +*chapter 6.2.16 KVM Video Driver* of SDK_User_Guide which available on > +AspeedTech-BMC/openbmc/releases. > + > +The ASPEED video driver implements the following driver-specific control: > + > +``V4L2_CID_ASPEED_HQ_MODE`` > +------------------------------- > + Enable/Disable ASPEED's High quality mode. This is a private control > + that can be used to enable high quality for aspeed proprietary mode. > + > +.. flat-table:: > + :header-rows: 0 > + :stub-columns: 0 > + :widths: 1 4 > + > + * - ``(0)`` > + - ASPEED HQ mode is disabled. > + * - ``(1)`` > + - ASPEED HQ mode is enabled. > + > +``V4L2_CID_ASPEED_HQ_JPEG_QUALITY`` > +------------------------------- > + Define the quality of ASPEED's High quality mode. This is a private control > + that can be used to decide compression quality if High quality mode enabled > + . Higher the value, better the quality and bigger the size. > + > +.. flat-table:: > + :header-rows: 0 > + :stub-columns: 0 > + :widths: 1 4 > + > + * - ``(1)`` > + - minimum > + * - ``(12)`` > + - maximum > + * - ``(1)`` > + - step > + * - ``(1)`` > + - default > + > +**Copyright** |copy| 2022 ASPEED Technology Inc. > diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst > index 32f82aed47d9..46a494e00b72 100644 > --- a/Documentation/userspace-api/media/drivers/index.rst > +++ b/Documentation/userspace-api/media/drivers/index.rst > @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. > :maxdepth: 5 > :numbered: > > + aspeed-video > ccs > cx2341x-uapi > dw100
Hi Nicolas, Thanks for your comments. On 2022/10/25 下午 09:18, Nicolas Dufresne wrote: > Hi Jammy, > > thanks for the addition. > > Le mardi 25 octobre 2022 à 17:02 +0800, Jammy Huang a écrit : >> Add user documentation for the aspeed-video driver. >> >> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >> --- >> v10: >> - new >> --- >> .../media/drivers/aspeed-video.rst | 61 +++++++++++++++++++ >> .../userspace-api/media/drivers/index.rst | 1 + >> 2 files changed, 62 insertions(+) >> create mode 100644 Documentation/userspace-api/media/drivers/aspeed-video.rst >> >> diff --git a/Documentation/userspace-api/media/drivers/aspeed-video.rst b/Documentation/userspace-api/media/drivers/aspeed-video.rst >> new file mode 100644 >> index 000000000000..798a2588b175 >> --- /dev/null >> +++ b/Documentation/userspace-api/media/drivers/aspeed-video.rst >> @@ -0,0 +1,61 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +.. include:: <isonum.txt> >> + >> +ASPEED video driver >> +=================== >> + >> +ASPEED Video Engine found on AST2400/2500/2600 SoC supports high performance >> +video compressions with a wide range of video quality and compression ratio >> +options. The adopted compressing algorithm is a modified JPEG algorithm. >> + >> +There are 2 types of compressions in this IP. >> + >> +* JPEG JFIF standard mode: for single frame and management compression >> +* ASPEED proprietary mode: for multi-frame and differential compression. >> + Support 2-pass (high quality) video compression scheme (Patent pending by >> + ASPEED). Provide visually lossless video compression quality or to reduce >> + the network average loading under intranet KVM applications. > I think some of the information disclosed in the following quote could be > summarized. Notably the part about the extra buffers. > > Aspeed JPEG Format requires an additional buffer, called bcd, to store > the information about which macro block in the new frame is different > from the previous one. > > To have bcd correctly working, we need to swap the buffers for src0/1 to > make src1 refer to previous frame and src0 to the coming new frame. > > But before I push you this route, have you considered using a dedicated pixel > format instead ? Here's my thinking, the output of the JPEG encoder is no longer > "compatible" (or at least won't yield the expected images) if used with a normal > JPEG decoder. By differentiating these two as dedicated formats, you will only need > 1 vendor control, and you avoid the potential risk of software bugs mixing them up. > Also note that there is other JPEG based vendor formats that exist in V4L2. > > Let me know what do you think ? Yes, I also add a dedicated formats, V4L2_PIX_FMT_AJPG, in this series. In [PATCH v10 1/5] media: v4l: Add definition for the Aspeed JPEG format, I add the description in pixfmt-reserved.rst. After this series applied, the users can choose either of these two formats by VIDIOC_S_FMT as per their preference. > > Nicolas > >> + >> +More details on the ASPEED video hardware operations can be found in >> +*chapter 6.2.16 KVM Video Driver* of SDK_User_Guide which available on >> +AspeedTech-BMC/openbmc/releases. >> + >> +The ASPEED video driver implements the following driver-specific control: >> + >> +``V4L2_CID_ASPEED_HQ_MODE`` >> +------------------------------- >> + Enable/Disable ASPEED's High quality mode. This is a private control >> + that can be used to enable high quality for aspeed proprietary mode. >> + >> +.. flat-table:: >> + :header-rows: 0 >> + :stub-columns: 0 >> + :widths: 1 4 >> + >> + * - ``(0)`` >> + - ASPEED HQ mode is disabled. >> + * - ``(1)`` >> + - ASPEED HQ mode is enabled. >> + >> +``V4L2_CID_ASPEED_HQ_JPEG_QUALITY`` >> +------------------------------- >> + Define the quality of ASPEED's High quality mode. This is a private control >> + that can be used to decide compression quality if High quality mode enabled >> + . Higher the value, better the quality and bigger the size. >> + >> +.. flat-table:: >> + :header-rows: 0 >> + :stub-columns: 0 >> + :widths: 1 4 >> + >> + * - ``(1)`` >> + - minimum >> + * - ``(12)`` >> + - maximum >> + * - ``(1)`` >> + - step >> + * - ``(1)`` >> + - default >> + >> +**Copyright** |copy| 2022 ASPEED Technology Inc. >> diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst >> index 32f82aed47d9..46a494e00b72 100644 >> --- a/Documentation/userspace-api/media/drivers/index.rst >> +++ b/Documentation/userspace-api/media/drivers/index.rst >> @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. >> :maxdepth: 5 >> :numbered: >> >> + aspeed-video >> ccs >> cx2341x-uapi >> dw100
Le mercredi 26 octobre 2022 à 10:42 +0800, Jammy Huang a écrit : > Hi Nicolas, > > Thanks for your comments. > > On 2022/10/25 下午 09:18, Nicolas Dufresne wrote: > > Hi Jammy, > > > > thanks for the addition. > > > > Le mardi 25 octobre 2022 à 17:02 +0800, Jammy Huang a écrit : > > > Add user documentation for the aspeed-video driver. > > > > > > Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> > > > --- > > > v10: > > > - new > > > --- > > > .../media/drivers/aspeed-video.rst | 61 +++++++++++++++++++ > > > .../userspace-api/media/drivers/index.rst | 1 + > > > 2 files changed, 62 insertions(+) > > > create mode 100644 Documentation/userspace-api/media/drivers/aspeed-video.rst > > > > > > diff --git a/Documentation/userspace-api/media/drivers/aspeed-video.rst b/Documentation/userspace-api/media/drivers/aspeed-video.rst > > > new file mode 100644 > > > index 000000000000..798a2588b175 > > > --- /dev/null > > > +++ b/Documentation/userspace-api/media/drivers/aspeed-video.rst > > > @@ -0,0 +1,61 @@ > > > +.. SPDX-License-Identifier: GPL-2.0 > > > + > > > +.. include:: <isonum.txt> > > > + > > > +ASPEED video driver > > > +=================== > > > + > > > +ASPEED Video Engine found on AST2400/2500/2600 SoC supports high performance > > > +video compressions with a wide range of video quality and compression ratio > > > +options. The adopted compressing algorithm is a modified JPEG algorithm. > > > + > > > +There are 2 types of compressions in this IP. > > > + > > > +* JPEG JFIF standard mode: for single frame and management compression > > > +* ASPEED proprietary mode: for multi-frame and differential compression. > > > + Support 2-pass (high quality) video compression scheme (Patent pending by > > > + ASPEED). Provide visually lossless video compression quality or to reduce > > > + the network average loading under intranet KVM applications. > > I think some of the information disclosed in the following quote could be > > summarized. Notably the part about the extra buffers. > > > > Aspeed JPEG Format requires an additional buffer, called bcd, to store > > the information about which macro block in the new frame is different > > from the previous one. > > > > To have bcd correctly working, we need to swap the buffers for src0/1 to > > make src1 refer to previous frame and src0 to the coming new frame. > > > > But before I push you this route, have you considered using a dedicated pixel > > format instead ? Here's my thinking, the output of the JPEG encoder is no longer > > "compatible" (or at least won't yield the expected images) if used with a normal > > JPEG decoder. By differentiating these two as dedicated formats, you will only need > > 1 vendor control, and you avoid the potential risk of software bugs mixing them up. > > Also note that there is other JPEG based vendor formats that exist in V4L2. > > > > Let me know what do you think ? > > Yes, I also add a dedicated formats, V4L2_PIX_FMT_AJPG, in this series. > In [PATCH v10 1/5] > > media: v4l: Add definition for the Aspeed JPEG format, I add the > description in pixfmt-reserved.rst. > > After this series applied, the users can choose either of these two > formats by VIDIOC_S_FMT as > > per their preference. Sorry about that, I have skipped too much. The approach seems fair then, can you state in the doc that these control applies to V4L2_PIX_FMT_AJPG in some way ? (just a little cross-reference can help). The confusion with normal JPEG is easy. thanks for you patience, Nicolas > > > > > Nicolas > > > > > + > > > +More details on the ASPEED video hardware operations can be found in > > > +*chapter 6.2.16 KVM Video Driver* of SDK_User_Guide which available on > > > +AspeedTech-BMC/openbmc/releases. > > > + > > > +The ASPEED video driver implements the following driver-specific control: > > > + > > > +``V4L2_CID_ASPEED_HQ_MODE`` > > > +------------------------------- > > > + Enable/Disable ASPEED's High quality mode. This is a private control > > > + that can be used to enable high quality for aspeed proprietary mode. > > > + > > > +.. flat-table:: > > > + :header-rows: 0 > > > + :stub-columns: 0 > > > + :widths: 1 4 > > > + > > > + * - ``(0)`` > > > + - ASPEED HQ mode is disabled. > > > + * - ``(1)`` > > > + - ASPEED HQ mode is enabled. > > > + > > > +``V4L2_CID_ASPEED_HQ_JPEG_QUALITY`` > > > +------------------------------- > > > + Define the quality of ASPEED's High quality mode. This is a private control > > > + that can be used to decide compression quality if High quality mode enabled > > > + . Higher the value, better the quality and bigger the size. > > > + > > > +.. flat-table:: > > > + :header-rows: 0 > > > + :stub-columns: 0 > > > + :widths: 1 4 > > > + > > > + * - ``(1)`` > > > + - minimum > > > + * - ``(12)`` > > > + - maximum > > > + * - ``(1)`` > > > + - step > > > + * - ``(1)`` > > > + - default > > > + > > > +**Copyright** |copy| 2022 ASPEED Technology Inc. > > > diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst > > > index 32f82aed47d9..46a494e00b72 100644 > > > --- a/Documentation/userspace-api/media/drivers/index.rst > > > +++ b/Documentation/userspace-api/media/drivers/index.rst > > > @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. > > > :maxdepth: 5 > > > :numbered: > > > > > > + aspeed-video > > > ccs > > > cx2341x-uapi > > > dw100 >
On 2022/10/27 上午 03:02, Nicolas Dufresne wrote: > Le mercredi 26 octobre 2022 à 10:42 +0800, Jammy Huang a écrit : >> Hi Nicolas, >> >> Thanks for your comments. >> >> On 2022/10/25 下午 09:18, Nicolas Dufresne wrote: >>> Hi Jammy, >>> >>> thanks for the addition. >>> >>> Le mardi 25 octobre 2022 à 17:02 +0800, Jammy Huang a écrit : >>>> Add user documentation for the aspeed-video driver. >>>> >>>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >>>> --- >>>> v10: >>>> - new >>>> --- >>>> .../media/drivers/aspeed-video.rst | 61 +++++++++++++++++++ >>>> .../userspace-api/media/drivers/index.rst | 1 + >>>> 2 files changed, 62 insertions(+) >>>> create mode 100644 Documentation/userspace-api/media/drivers/aspeed-video.rst >>>> >>>> diff --git a/Documentation/userspace-api/media/drivers/aspeed-video.rst b/Documentation/userspace-api/media/drivers/aspeed-video.rst >>>> new file mode 100644 >>>> index 000000000000..798a2588b175 >>>> --- /dev/null >>>> +++ b/Documentation/userspace-api/media/drivers/aspeed-video.rst >>>> @@ -0,0 +1,61 @@ >>>> +.. SPDX-License-Identifier: GPL-2.0 >>>> + >>>> +.. include:: <isonum.txt> >>>> + >>>> +ASPEED video driver >>>> +=================== >>>> + >>>> +ASPEED Video Engine found on AST2400/2500/2600 SoC supports high performance >>>> +video compressions with a wide range of video quality and compression ratio >>>> +options. The adopted compressing algorithm is a modified JPEG algorithm. >>>> + >>>> +There are 2 types of compressions in this IP. >>>> + >>>> +* JPEG JFIF standard mode: for single frame and management compression >>>> +* ASPEED proprietary mode: for multi-frame and differential compression. >>>> + Support 2-pass (high quality) video compression scheme (Patent pending by >>>> + ASPEED). Provide visually lossless video compression quality or to reduce >>>> + the network average loading under intranet KVM applications. >>> I think some of the information disclosed in the following quote could be >>> summarized. Notably the part about the extra buffers. >>> >>> Aspeed JPEG Format requires an additional buffer, called bcd, to store >>> the information about which macro block in the new frame is different >>> from the previous one. >>> >>> To have bcd correctly working, we need to swap the buffers for src0/1 to >>> make src1 refer to previous frame and src0 to the coming new frame. >>> >>> But before I push you this route, have you considered using a dedicated pixel >>> format instead ? Here's my thinking, the output of the JPEG encoder is no longer >>> "compatible" (or at least won't yield the expected images) if used with a normal >>> JPEG decoder. By differentiating these two as dedicated formats, you will only need >>> 1 vendor control, and you avoid the potential risk of software bugs mixing them up. >>> Also note that there is other JPEG based vendor formats that exist in V4L2. >>> >>> Let me know what do you think ? >> Yes, I also add a dedicated formats, V4L2_PIX_FMT_AJPG, in this series. >> In [PATCH v10 1/5] >> >> media: v4l: Add definition for the Aspeed JPEG format, I add the >> description in pixfmt-reserved.rst. >> >> After this series applied, the users can choose either of these two >> formats by VIDIOC_S_FMT as >> >> per their preference. > Sorry about that, I have skipped too much. The approach seems fair then, can you > state in the doc that these control applies to V4L2_PIX_FMT_AJPG in some way ? > (just a little cross-reference can help). The confusion with normal JPEG is > easy. > > thanks for you patience, > Nicolas Sure, I will add the words below in next patch. "VIDIOC_S_FMT can be used to choose which format you want. V4L2_PIX_FMT_JPEG stands for JPEG JFIF standard mode; V4L2_PIX_FMT_AJPG stands for ASPEED proprietary mode." Thanks for your help. >>> Nicolas >>> >>>> + >>>> +More details on the ASPEED video hardware operations can be found in >>>> +*chapter 6.2.16 KVM Video Driver* of SDK_User_Guide which available on >>>> +AspeedTech-BMC/openbmc/releases. >>>> + >>>> +The ASPEED video driver implements the following driver-specific control: >>>> + >>>> +``V4L2_CID_ASPEED_HQ_MODE`` >>>> +------------------------------- >>>> + Enable/Disable ASPEED's High quality mode. This is a private control >>>> + that can be used to enable high quality for aspeed proprietary mode. >>>> + >>>> +.. flat-table:: >>>> + :header-rows: 0 >>>> + :stub-columns: 0 >>>> + :widths: 1 4 >>>> + >>>> + * - ``(0)`` >>>> + - ASPEED HQ mode is disabled. >>>> + * - ``(1)`` >>>> + - ASPEED HQ mode is enabled. >>>> + >>>> +``V4L2_CID_ASPEED_HQ_JPEG_QUALITY`` >>>> +------------------------------- >>>> + Define the quality of ASPEED's High quality mode. This is a private control >>>> + that can be used to decide compression quality if High quality mode enabled >>>> + . Higher the value, better the quality and bigger the size. >>>> + >>>> +.. flat-table:: >>>> + :header-rows: 0 >>>> + :stub-columns: 0 >>>> + :widths: 1 4 >>>> + >>>> + * - ``(1)`` >>>> + - minimum >>>> + * - ``(12)`` >>>> + - maximum >>>> + * - ``(1)`` >>>> + - step >>>> + * - ``(1)`` >>>> + - default >>>> + >>>> +**Copyright** |copy| 2022 ASPEED Technology Inc. >>>> diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst >>>> index 32f82aed47d9..46a494e00b72 100644 >>>> --- a/Documentation/userspace-api/media/drivers/index.rst >>>> +++ b/Documentation/userspace-api/media/drivers/index.rst >>>> @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. >>>> :maxdepth: 5 >>>> :numbered: >>>> >>>> + aspeed-video >>>> ccs >>>> cx2341x-uapi >>>> dw100
diff --git a/Documentation/userspace-api/media/drivers/aspeed-video.rst b/Documentation/userspace-api/media/drivers/aspeed-video.rst new file mode 100644 index 000000000000..798a2588b175 --- /dev/null +++ b/Documentation/userspace-api/media/drivers/aspeed-video.rst @@ -0,0 +1,61 @@ +.. SPDX-License-Identifier: GPL-2.0 + +.. include:: <isonum.txt> + +ASPEED video driver +=================== + +ASPEED Video Engine found on AST2400/2500/2600 SoC supports high performance +video compressions with a wide range of video quality and compression ratio +options. The adopted compressing algorithm is a modified JPEG algorithm. + +There are 2 types of compressions in this IP. + +* JPEG JFIF standard mode: for single frame and management compression +* ASPEED proprietary mode: for multi-frame and differential compression. + Support 2-pass (high quality) video compression scheme (Patent pending by + ASPEED). Provide visually lossless video compression quality or to reduce + the network average loading under intranet KVM applications. + +More details on the ASPEED video hardware operations can be found in +*chapter 6.2.16 KVM Video Driver* of SDK_User_Guide which available on +AspeedTech-BMC/openbmc/releases. + +The ASPEED video driver implements the following driver-specific control: + +``V4L2_CID_ASPEED_HQ_MODE`` +------------------------------- + Enable/Disable ASPEED's High quality mode. This is a private control + that can be used to enable high quality for aspeed proprietary mode. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 1 4 + + * - ``(0)`` + - ASPEED HQ mode is disabled. + * - ``(1)`` + - ASPEED HQ mode is enabled. + +``V4L2_CID_ASPEED_HQ_JPEG_QUALITY`` +------------------------------- + Define the quality of ASPEED's High quality mode. This is a private control + that can be used to decide compression quality if High quality mode enabled + . Higher the value, better the quality and bigger the size. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 1 4 + + * - ``(1)`` + - minimum + * - ``(12)`` + - maximum + * - ``(1)`` + - step + * - ``(1)`` + - default + +**Copyright** |copy| 2022 ASPEED Technology Inc. diff --git a/Documentation/userspace-api/media/drivers/index.rst b/Documentation/userspace-api/media/drivers/index.rst index 32f82aed47d9..46a494e00b72 100644 --- a/Documentation/userspace-api/media/drivers/index.rst +++ b/Documentation/userspace-api/media/drivers/index.rst @@ -31,6 +31,7 @@ For more details see the file COPYING in the source distribution of Linux. :maxdepth: 5 :numbered: + aspeed-video ccs cx2341x-uapi dw100