GNU bug report logs - #74476
[PATCH] Explore JPEG loading without quantization

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Fri, 22 Nov 2024 14:54:01 UTC

Severity: normal

Tags: patch

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Subject: bug#74476: closed (Re: bug#74476: [PATCH] Explore JPEG loading
 without quantization)
Date: Mon, 02 Dec 2024 10:49:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#74476: [PATCH] Explore JPEG loading without quantization

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 74476 <at> debbugs.gnu.org.

-- 
74476: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74476
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Third <alan <at> idiocy.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74476-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#74476: [PATCH] Explore JPEG loading without quantization
Date: Mon, 2 Dec 2024 10:47:42 +0000
On Sun, Dec 01, 2024 at 12:13:53PM +0100, Manuel Giraud wrote:
> Alan Third <alan <at> idiocy.org> writes:
> 
> > I think it should be done for each load. And I just noticed you need
> > to add a free_color_table call after you're done with it.
> 
> Yes, I have re-add it in the attached new version of the patch.  I also
> re-add the ir, ig and ib indices computation.  WDYT?

Looks good to me.

I've pushed this to master. Thanks!
-- 
Alan Third

[Message part 3 (message/rfc822, inline)]
From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Explore JPEG loading without quantization
Date: Fri, 22 Nov 2024 15:53:18 +0100
[Message part 4 (text/plain, inline)]
Tags: patch

Hi,

While trying to speed up "emacs as an image viewer", I found that emacs
is using libjpeg with color quantization and it seems that removing this
quantization could speed up JPEG loading a bit.

My simple limited benchmark:

          - M-: (clear-image-cache)
          - Open an image in folder with some large enough pictures in
            it (4000x3000 here)
          - M-: (benchmark-run 10 (image-next-file 1))

Here are the results I get:

without this path: (5.415405491 1 0.09232176400000025)
with: (3.079911418 1 0.0751190459999993)

I don't think that this patch could be applied as is (it is rather
ugly).  And I also think that I probably have missed some (many?) use
case (where color quantization is mandatory).  But I'm submitting this
patch anyway as a conversation starter on the subject.

Thanks,

In GNU Emacs 31.0.50 (build 9, x86_64-unknown-openbsd7.6, X toolkit) of
 2024-11-22 built on computer
Repository revision: c66c0942ea9ac10e6d6324e472150de403a03b69
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
System Description: OpenBSD computer 7.6 GENERIC.MP#437 amd64

Configured using:
 'configure CC=egcc CPPFLAGS=-I/usr/local/include
 LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --bindir=/home/manuel/bin --with-x-toolkit=lucid
 --with-toolkit-scroll-bars=no --without-cairo
 --without-compress-install'

[0001-Explore-JPEG-loading-without-quantization.patch (text/patch, attachment)]
[Message part 6 (text/plain, inline)]
-- 
Manuel Giraud

This bug report was last modified 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.