From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74476: [PATCH] Explore JPEG loading without quantization Date: Sat, 30 Nov 2024 19:32:10 +0100 Message-ID: <878qt0bmj9.fsf@ledu-giraud.fr> References: <871pz39v6p.fsf@ledu-giraud.fr> <86iks581nf.fsf@gnu.org> <87y11093gx.fsf@ledu-giraud.fr> <87h67obpn6.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16119"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 74476@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 19:33:35 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tHSHe-00040C-Kz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 19:33:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHSHB-0003hf-27; Sat, 30 Nov 2024 13:33:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tHSH9-0003h0-0f for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:33:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHSH8-0002P0-Nw for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=/08tm0xQZty8cO+BSKaPBfKaWARDl3BCF4lRZNABgOw=; b=eDEudb0wB4z2Vj+AlcROf2Ou1AnWiRribVut4UJEGQwRO5k9jqzJjzW5yWeG6NS4ZLEQr/MmD3BAywmYZqb6Rp+5i84S29L+ABs4LrzeApDslD1XJf0k42QyRybSCY4V0Z4Oe6vxlmUrc2GiBPkY0CkBzJMvoI4ZkRQE7cAUsaypbZG9kW+kdn7pLjpqPgWLCndnJSe8izEjdLmGgNxBacKOf2zTxS8Yyvy4lN9dzx0EGBgIpqS0JSXCDcfx4qYjWT9JgQN3ak9WjhILw+jJuVVEgcpHALonLZ0BmvVnLXGbl0G1aE5mk1LGhb52IoD+dSisUAftU4N76HZzt5UBWA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHSH8-0001Io-Hl for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 13:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74476-submit@debbugs.gnu.org id=B74476.17329915364883 (code B ref 74476); Sat, 30 Nov 2024 18:33:02 +0000 Original-Received: (at 74476) by debbugs.gnu.org; 30 Nov 2024 18:32:16 +0000 Original-Received: from localhost ([127.0.0.1]:48999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSGO-0001Gh-3W for submit@debbugs.gnu.org; Sat, 30 Nov 2024 13:32:16 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:12550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSGL-0001GW-4G for 74476@debbugs.gnu.org; Sat, 30 Nov 2024 13:32:14 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=i7xJmC90 78SQyB0KEHmwt2PTOHdrS/Okw84y+rlpoOs=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=YCU5AlrxKEHuZ1fp1laFHU7WGM9xaA TJAY0b2nbKzX8WI0dD06dOOpZD7GuAnziJm2Zsb/ApA5KoSqrAUTxAAA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=i7xJmC9078SQyB0K EHmwt2PTOHdrS/Okw84y+rlpoOs=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=IMTRKRy/2KTS/5o+QLHZzKDA8SkT+5nnvU3UwA dk/6UWxPCIxB21wJV7CQAEzWtCToQ3/2JADbbVdLMkWK4ydILmA9JtrN9OC+QHg/BD8r1Z RWGI/Z3hfyLHZtpcfZLYxZ02YZ+P7gdvQohzt5gCJJGZ0QJjUmao5YwMEw/z/fUb2f8b/7 yr8I3vsOM3b6G1eyBvRu8vISg75ntqy5biqVjj7kHPdNOsW/AbB6opyPjcxKe4hjlX1gdP tecjQBXr1f3wcsixxWQdRpZEwoCZXDFBt/gMH/b2TP7JuZdJBBweyK5bfOQJbu6Wen0PgA iht4i3S4nBCZA2kVr/bFPr0w== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id f946cfc2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 30 Nov 2024 19:32:11 +0100 (CET) In-Reply-To: (Alan Third's message of "Sat, 30 Nov 2024 18:16:39 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296193 Archived-At: Alan Third writes: > On Sat, Nov 30, 2024 at 06:25:01PM +0100, Manuel Giraud wrote: >> Here is a new version with Alan suggestions. >> >> FTR, the gain is much less interesting. Here is the new timing with >> same benchmark (see below): >> (4.381739669 1 0.1034133749999997) > > That's unfortunate, although here I see an improvement of greater than > 2x. That's good news. > Probably I could do with finding some larger images as the whole thing > completes in under a second even without your patch. FYI, I have used images of 4000 by 3000 pixels. > I've had a quick dig into lookup_rgb_color and assuming you have a > true colour display and there's no gamma calculation going on (I don't > know when that happens) it shouldn't be doing a whole lot more. > Perhaps it's just the extra over-head of calling a function? It seems a bit much for just a function call. Or maybe it is the init_color_table call? Should it be done for each jpeg_load? -- Manuel Giraud