Re: JPEG-XL as Content-Encoding?

Julian Reschke <julian.reschke@gmx.de> Fri, 21 August 2020 12:26 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 115213A08E1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 21 Aug 2020 05:26:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.847
X-Spam-Level:
X-Spam-Status: No, score=-3.847 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, NICE_REPLY_A=-0.949, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wg_WUOAV2OzJ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 21 Aug 2020 05:26:45 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6E17B3A08DE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 21 Aug 2020 05:26:45 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1k9653-00032b-PR for ietf-http-wg-dist@listhub.w3.org; Fri, 21 Aug 2020 12:23:37 +0000
Resent-Date: Fri, 21 Aug 2020 12:23:37 +0000
Resent-Message-Id: <E1k9653-00032b-PR@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1k9652-00031l-IU for ietf-http-wg@listhub.w3.org; Fri, 21 Aug 2020 12:23:36 +0000
Received: from mout.gmx.net ([212.227.17.21]) by mimas.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1k9650-0008Dk-Fi for ietf-http-wg@w3.org; Fri, 21 Aug 2020 12:23:36 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598012600; bh=I/gsbWSjxtbLVEQCaeXKoJ34/xxn3MZo2wfkhL5dXx4=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=Cu4v/ZVwhy3WtLBMxoQlipzAg1kdvV/roPGHqquTVZUdbIA2JmxUD17Bz5I6gOPle nA0FXxpsZUzXHyiG6Wqsu5EJoCLcPADW36Rwp2VL0tzpL5e0tpGNyVRnwmYsWY8M3Y eUq9jzJK/ffkPanQAs7JQkwSLRdGNEILujq4cXL4=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.236] ([217.91.35.233]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Msq24-1kxcGG2eoS-00t9Jv for <ietf-http-wg@w3.org>; Fri, 21 Aug 2020 14:23:20 +0200
To: ietf-http-wg@w3.org
References: <CACj=BEjdwH1OtS=uQXsgPN3XVJvVEUeisjeF5_iro1vg0omqWQ@mail.gmail.com> <20200820151401.GB21689@1wt.eu> <20200820183008.GA8086@lubuntu> <18159.1597960275@critter.freebsd.dk> <CADR0UcWkxb4ZtMgjqDeAv=m6G3ks2P75L-5pvt-ctz8WyJF29g@mail.gmail.com> <CAGd9gwhR5zTjsCugrZeSr7Yt_N6wxv7k5evrLBGW=dkKt257ZA@mail.gmail.com>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <8f2e15c4-1b49-2ef9-3346-baf9bc610d14@gmx.de>
Date: Fri, 21 Aug 2020 14:23:19 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.1.1
MIME-Version: 1.0
In-Reply-To: <CAGd9gwhR5zTjsCugrZeSr7Yt_N6wxv7k5evrLBGW=dkKt257ZA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:RYMg7zMMO6JlGaahcXBwnbXA6VsGNnuNAy5SHGXiu44mwSW5R9U Kr/AcAuIKkDZT5mjTP46IjnW8yPdCJBNmrfPtqS3sc0+Ct659N62x3n8R4QTMWuuXjzGLVM agBk3PX4c+E2mqGLq1crNPgFkgyetvR6/2zdOG3nqKfclbLwEKPres+1H9ZF/YT6oLoQCmr nFodc1e5tm7j3dC9fZF+w==
X-UI-Out-Filterresults: notjunk:1;V03:K0:FTlAZRIOrKY=:JoOHYipi8WowmMQ9JlhkGR c9kQRHPT7Ar+5OKUR/P3volN+sZn2jU76AxEyT2ZSUQ70OPnDmc9QNuWtDgw0l4s7LUlqknD8 7baDtdqwzSouFUCk5EmuJiCtrdXm74eEarfeWQgHl7l8fbCNUWvIcCaN1+BqCCGe1ttQDafoY ivIgZLni7t0GGX/RKL0qC8A8wDha5B2hNGskw0gmAU8LYCMCCODcpZJBtNjUq/3omfrXRaxqs o0l1DuUl99vnDIHSPd0xyaJzePrvtruGc1XVWSU5ul8EwU3C9ouejVW6xl3i6zJR2wAbEhy// hjRbPHA+Z8VV0O5sx/t7EZYpsaaC4sV0eHM7F+sVaZeX8wmCKrwybNfUFOu/S6kmNELDAN4Np Q7pcyXnkIrSCWCRjqVlqL0B+0ez956sUoOkRr0x+gLpIMPCJb2q7H9whN91TOEt7EZE6BIIy8 l7yYF7YLwyXFze9HZoHdNVyD5UddJmVBTGLCyNjiW4Q3nP/0ICUr0hDzWIi1cHii7Tley2Oe9 FdjhArWLllIrex6bxvzP66fAGfGEIgS/PtJjvaP2rdk/kY0nT5RrNwKXKcFF9KZeI0YuCTRlN 7rsf/UESDFR1F/YxdwAb7Zo3+g5zW6zk/mOlvn1zKdtlYL7cdwUcqAD29HTYehq1o/X3pT0GM PNm/P2l/lpSPMmOkTC+z2Rv0ohi5h46t2N6y+aubcprrvEiPgTYMdevZkJI9pU0rxDTOw5J0s aeUXUpX89aB7D15vhXL7u+3Zx5s9itRaH+UocS1IXgPYk6sMYcDLOgAjm5mdtYrYShLoXTHlV 9ofzOwAJyx8hr8cHr8Dvn7wFcHQwjiT4gFkCjaciXdpRnxSSVvc8oQ2ILMjmMD9IoHmYztWlP ddg34t8ZyDU9ZyA8OUYEG/oojIgagNi/eFP9YDFOquLRl7+l9JEzFilfhdAJrn0ltvx/VwZnV o4rgf5hchnPOxz0Ue0ih3DA02qhGyITErSXRnNTTlg8eBoEIrCuNfwxI3hPOvHnalgZAYpQMA /YCGkI7/eRs/4BPWpQekdGpZFXcVDR3raQgTtsJhSl0CyPjhIRlIbSUgwt6AJ0VUTsp92uu/+ OOsL3btT3t9XsRBDzJNGL/uzMQZzMCWyWIRX63Z+gzXFaZllvKdUfie/yRKIWFzoRl2Megjd7 3aQCwewKazUhuJH1lBZWK1DoFKfui915tsJ9cOth7vBn5Ik8hiKCXKzyFpiXI+47fGivlHJMb lzxWzinXWe0T4Ca58yyiuXmcRbvSpGRn087h94Q==
Received-SPF: pass client-ip=212.227.17.21; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-7.7
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-2.079, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1k9650-0008Dk-Fi 55b70afbe0aeacde23fe643e8e8c8221
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JPEG-XL as Content-Encoding?
Archived-At: <https://www.w3.org/mid/8f2e15c4-1b49-2ef9-3346-baf9bc610d14@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37948
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Am 21.08.2020 um 14:00 schrieb Alex Deymo:
> Hi,
> I'm Alex and I'm working in the JPEG XL project. The transcoding being
> discussed for this is indeed the lossless recompression of JPEG files
> feature in JXL.
>
> JXL has many more features as a codec than what the lossless JPEG
> recompression can offer, you would get a lot better compression density
> for similar visual quality if you don't need to be able to reconstruct
> the exact same original JPEG file (or if your original was not a JPEG to
> start with but RAW data from a camera), so it makes a lot of sense to
> add jxl as an image codec on its own.
>
> However, on top of that, the lossless recompression of JPEG files allows
> you to get this ~20% gain for existing files. When you deploy a new
> lossy codec there is the question of what to do with the existing
> images. If you have a website with photos and want to convert your
> already lossy JPEG files to a new codec to save storage and bandwidth
> and you decide to decode them to pixels and encode them back to the new
> format you will end up with more artifacts or worse compression density
> trying to accurately represent the JPEG artifacts in the new codec,
> whatever the codec is. It's impractical to do this lossy transcoding to
> a new codec at large scale on existing images, each application would
> need to evaluate whether they want to do this for existing images. This
> story is different if you start with a large and high quality image
> (like a JPEG from a camera) and want to encode in a smaller form for the
> web, since there you already have a high quality file.

That makes it sound a bit as if a losslessly-re-encoded JPG file is not
a valid JXL file. Is that the case?

> ...
> I think the only shocking thing about a content-encoding for JPEGs is
> that it can't encode any arbitrary file only JPEGs, but if you look at
> "general purpose" compressors like Brotli they still can't compress to a
> smaller file every file; many binary files that are already compressed
> like .zip or even a JPEG files (unless they have a large ICC) won't
> compress to a smaller file so you just don't do it even if Brotli is
> able to compress them to a ~similar size file.
> ...

That's indeed a concern. For the other currently registered encodings,
you *can* apply them, but they do not necessarily help.

This one can't be applied to any file type. One way to address this
would be to tune the format that it *can* handle any file type (by just
adding a tiny wrapper around it and preserving the actual octet stream
within).

> ...

Best regards, Julian