Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928126 - www-client/firefox: add a flag to enable JPEG XL support
Summary: www-client/firefox: add a flag to enable JPEG XL support
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 13:23 UTC by Michał Górny
Modified: 2024-04-18 05:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
screenshot of test page (jxl.jpeg,341.88 KB, image/jpeg)
2024-04-02 19:32 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-29 13:23:32 UTC
Could we have a flag to build it with JPEG XL support?  Looking at toolkit/moz.configure, it may be necessary to patch it a little, as FWIU it enables it only for "nightly" builds:

    @depends("--disable-jxl", milestone.is_nightly)
    def jxl(value, is_nightly):
        if is_nightly and value:
            return True
Comment 1 tt_1 2024-03-29 14:42:21 UTC
Hasn't mozilla stopped implementing jpeg-xl about a year ago? Or did they revert that position lately?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-29 15:02:28 UTC
No clue.  The bug is, well, inconclusive.  The code's still there, and apparently enabled on nightly builds.  Since Safari implemented it, they have some motivation now.
Comment 3 Joonas Niilola gentoo-dev 2024-03-30 09:21:23 UTC
Yeah, the jpeg-xl support was never fully implemented and doesn't look lik there's much happening after the policy update "rejecting" jpeg-xl. However and to my surprise they've updated the bundled jpeg-xl to 0.9.0 from December 2022. Highway is a bit older, 1.0.4 from March 2023 (before the policy update). 

I'm kind of against patching these things because we end up carrying these custom patches and they're PITA to rebase every few releases. But if jpeg-xl can be easily enabled, I'm in for enabling it as package.use.masked for now, and trying to get some real-life use for it with Gentoo. 

There's probably more than one condition in the code though to enable it, but haven't checked. Another thing is, enabling support for system-jxl instead of the bundled one could be painful.
Comment 4 Joonas Niilola gentoo-dev 2024-03-30 09:22:09 UTC
(In reply to Joonas Niilola from comment #3)
> However
> and to my surprise they've updated the bundled jpeg-xl to 0.9.0 from
> December 2022. 

* 2023
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-30 09:29:26 UTC
I wanted to try enabling it, but I've got stuck on bug #928137.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-02 19:32:28 UTC
Created attachment 889285 [details]
screenshot of test page

Well, indeed it seems that they didn't finish it.  Animations don't work and the image with alpha channel looks weird.
Comment 7 Joonas Niilola gentoo-dev 2024-04-15 06:35:07 UTC
So uhh do we want to pursue this or not?
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-15 11:58:36 UTC
I honestly don't know.  I'm using the following patch, though I suppose it could be made shorter:

diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index b616109..b669b42 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -763,17 +763,8 @@ set_define("MOZ_AV1", av1)
 
 # JXL Image Codec Support
 # ==============================================================
-option("--disable-jxl", help="Disable jxl image support")
-
-
-@depends("--disable-jxl", milestone.is_nightly)
-def jxl(value, is_nightly):
-    if is_nightly and value:
-        return True
-
-
-set_config("MOZ_JXL", jxl)
-set_define("MOZ_JXL", jxl)
+set_config("MOZ_JXL", True)
+set_define("MOZ_JXL", True)
 
 set_config("MOZ_SAMPLE_TYPE_FLOAT32", True)
 set_define("MOZ_SAMPLE_TYPE_FLOAT32", True)


So it's trivial to do, and a nice way to test stuff.  Also, you need to enable it via about:config, so it's not exactly harmful to build with it (except for the extra rebuilds due to SOVERSION changes).  But then, it's not really useful right now either.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-18 05:48:17 UTC
...and in 125.0.1, it doesn't build anymore.