Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp216802pxh; Wed, 10 Nov 2021 00:26:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcscJda5C7mrtYJ+KNZ1GX0P/9sjq8pU3eh4qnDdXl2LTfS77cnTB36O++r0WaVTCx24j7 X-Received: by 2002:a92:c54c:: with SMTP id a12mr9769691ilj.260.1636532792570; Wed, 10 Nov 2021 00:26:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636532792; cv=none; d=google.com; s=arc-20160816; b=XszblSi4IE8Y+um2OiSi+XpLNAx/pYZ3uUnPD7Qn1ou4nR878GKCdG7rbSq4XOE2iv YqyJBtaBVObGa62RMWg1gmvXHuxLCP9uLmkN9aRavdqLc75At1detf+YBM+UnTOuHOnN XV8SyC6+nVfVDnig7V0jQC4Ko7+P61mdiImr6DN6+wzMfd53PuEJRedv8j/kcG8tte5N W842lsOWh/wuqdS4M2JQvzr6MWYqTTQWsa/GFsPCYWbcS/0SO+THWBP6weXO8jk0CGyC 3lqpej7i0+/ruYpUwofbem3LAnJNLUWaKi4nTc0yyOFYv2AXLa3rr2g7h6OTENQBgGtT DjGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=BcUVA9s8ZJy+4O1jwipqD5yXI4l2XH+GCSbhqDCosdw=; b=uWURc1ayora/V2nNoEK8pIOaySQWg8nz0QJlvZ2hSBEE+K7ShYQsAaFgq5YqDrgxMr Ed5v0lwyA4wU+TX9L/WDgLSi1J773vFFRq+jGPFYmNSo01o7qvEMctZhmf+k8iQiQ/AP xLsqv53IL2xoNzEAeN7TjykQdsdKfSO4qGpxwNk3NZ332CBh14fejJsG8dDV981uBoLH JMu6e95rp8zIJtCXqdcnJQJPza11AYTgIJML7cNLtq0bZTW8J1nR4cFQo8SImP3qYTXw RentdCRgOP/rPogVuDNv1rz9hm4e0i1WZlFDdwjclYo9h2JpoCLVzbSPsTTiporEQxC0 oc+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=dTB8q1sl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si31859625ilr.152.2021.11.10.00.26.14; Wed, 10 Nov 2021 00:26:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xs4all.nl header.s=s2 header.b=dTB8q1sl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230136AbhKJI04 (ORCPT + 99 others); Wed, 10 Nov 2021 03:26:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbhKJI0z (ORCPT ); Wed, 10 Nov 2021 03:26:55 -0500 Received: from lb1-smtp-cloud9.xs4all.net (lb1-smtp-cloud9.xs4all.net [IPv6:2001:888:0:108::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61B6EC061764; Wed, 10 Nov 2021 00:24:08 -0800 (PST) Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud9.xs4all.net with ESMTPA id kithmlZONfwDFkitkmFH2X; Wed, 10 Nov 2021 09:24:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1636532645; bh=BcUVA9s8ZJy+4O1jwipqD5yXI4l2XH+GCSbhqDCosdw=; h=Subject:To:From:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=dTB8q1sl3OhvQ2TG0q80dfbi15TtxAoOgon7cVeYvAR1byBH1qNZPxN6HQBwI7F6+ lGnPafAJ3TKq5s4+XNVIheq/yhnpeC6iNUrgTASIkKLWLdgtcCDZpGiibgRdCdmy8F ezDpH6Abgjqcc2EuIoNXXEiXqeYnIjYzhNPQDrNiMmnOMKST/MqLnGLrVb5y4hQ7oq 2It37F30E9nV20uZs+H/yoXH0yaD3jAJCQVu6uvgHyWhi6ybeKsLebjC2FaRXd4bdN JSvEXxzcqSEKZ7ZYt2ucocFneP4Nr5s39oYJkcNoEX90puYLnRCBomV20zTeTokIq5 Be9tYLZR297qA== Subject: Re: [PATCH v3 5/7] media: aspeed: Support aspeed mode to reduce compressed data To: Jammy Huang , "eajames@linux.ibm.com" , "mchehab@kernel.org" , "joel@jms.id.au" , "andrew@aj.id.au" , "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" References: <20211022065539.12392-1-jammy_huang@aspeedtech.com> <20211022065539.12392-6-jammy_huang@aspeedtech.com> <75ea5824-e241-6548-bdc2-7ac9ec6346b6@xs4all.nl> <7d6ced4a-fea1-1163-40cb-65b4ea929a51@aspeedtech.com> <34ce1814-349b-d7a9-6118-341eea9ecf5f@xs4all.nl> From: Hans Verkuil Message-ID: Date: Wed, 10 Nov 2021 09:23:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfLouZZIVOHH2IEWkESGsSZ/L0X4GAeYl2HwMKD4Ftc52FZnMJAwj0Dzl+SLxci9cPR1ZWjYzYc216FINXx0YqSFY0SF8edPQvP2dK5GwtVcZdjFljfT8 ywHJhW4yRAXi6IhWquTM9YedVS030x25r1F0LdTqzaPGQGK/FgQXg3bmVWfBP1jUwEdrOxG4sory5ltMwRhqIH2iubIKFbMrKdA36Gpqsc45R4Fz/efW8OAt f6OCgsCR+wLuyweTgDGW5/9itDGzLQmAhgwfTMqINt5LKNpMkxVpxeguchYnmoOb0ouLwnL+51OgIh00tX69WGFLawkjGAO2XwQE7JORe/5mjYfvLgaWS9dG qdOjd6Tj71b9ZQHasixuZEWNK9zCbpDN7kj5AcHqsf8Jl6jdLz5eEq2oLNJCxN7sPrdyeNEZ8X3yZbEV59K3KDl2kE4By/HxzHGGRgXoD3U7wMXirmIzgNED 2/Iw/aRqDctKNsdX15TNciPNVKNuZohAOyT21WG3eFoeVyDzW1tp+dO9Xis= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/2021 03:40, Jammy Huang wrote: > Dear Hans, > > On 2021/11/9 下午 06:17, Hans Verkuil wrote: >> On 11/9/21 2:56 AM, Jammy Huang wrote: >>> Dear Hans, >>> >>> Thanks for your review. >>> >>> On 2021/11/8 下午 05:09, Hans Verkuil wrote: >>>> On 22/10/2021 08:55, Jammy Huang wrote: >>>>> aspeed supports differential jpeg format which only compress the parts >>>>> which are changed. In this way, it reduces both the amount of data to be >>>>> transferred by network and those to be decoded on the client side. >>>>> >>>>> 4 new ctrls are added: >>>>> * Aspeed JPEG Format: to control aspeed's partial jpeg on/off >>>>> 0: standard jpeg, 1: aspeed jpeg >>>> What exactly is 'aspeed jpeg'? >>> 'aspeed jpeg' is aspeed proprietary compression format. It will compare >>> the new frame >>> with previous one to decide which macroblock's data is changed, and only >>> the changed >>> macroblock will be compressed. In this way, the amount of compressed data is >>> significantly reduced. This is similar to the concept of I/P-frames of >>> video compression. >> Right, but that makes this a new vendor-specific pixelformat, not a control. > OK, I will add a new vendor-specific pixelformat for this. >> >>> For example, the video is static in first 3 frames and then a object in >>> the video moved in >>> 4th frame. >>> >>>         Frame Content      |    Standard    |    Aspeed >>> ----------------------------------------------------------------------- >>> 1th                                 |    Full             | Full >>> 2th    identical with 1st   |    Full             |   none (only about >>> 12 Bytes for header data) >>> 3th    identical with 1st   |    Full             |   none >>> 4th    a object moved     |    Full             |   Only the Macroblocks >>> that have data changed are compressed >>> >>> I have implemented a javascript aspeed decoder in novnc to support this >>> format, but >>> the performance isn't good enough. I am working on a web-assembly to >>> improve it. >> Is this format documented in a datasheet or something similar, ideally freely >> available? > This format is documented in ast2400/2500/2600's datasheet, but it's not > freely available. OK. Make sure to document the new pixelformat in Documentation/userspace-api/media/v4l/pixfmt-reserved.rst with a reference to where it is defined in the datasheet. If there is publicly available source code that converts it to 'normal' JPEG, then a reference to that would be very nice as well. >> >>>>> * Aspeed Compression Mode: to control aspeed's compression mode >>>>> 0: DCT Only, 1: DCT VQ mix 2-color, 2: DCT VQ mix 4-color >>>>> This is AST2400 only. It will adapt JPEG or VQ encoding method according >>>>> to the context automatically. >>>> What exactly does this do? >>>> >>>> Is this very aspeed-specific, or could this be a standard JPEG control? >>> Yes, this is aspeed-specific. Its compression algorithm is a modified >>> JPEG algorithm. >> Is this specific to the aspeed jpeg format, or also to the 'regular' jpeg format? > > It's specific to the aspeed jpeg format. Regular jpeg is based on DCT > and doesn't support VQ > compression OK, that makes it an aspeed-specific control. Good to know. Regards, Hans