Skip to content

AVIF image format support - #596

Draft
newbie-461 wants to merge 1 commit into
Feodor2:mainfrom
newbie-461:avif-support
Draft

AVIF image format support#596
newbie-461 wants to merge 1 commit into
Feodor2:mainfrom
newbie-461:avif-support

Conversation

@newbie-461

@newbie-461 newbie-461 commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

TODO:

  1. use dav1d to decode AVIF image
  2. alpha channel / HDR to SDR support (qcms_profile_create_cicp, qcms 0.2.0 requires a higher Rust version)
  3. auto add MIME to HTTP Accept header when AVIF decoder is enabled
  4. x64 and sse x86 test

Modules are mostly copied from firefox-93.0.source.tar.xz
(update)
gfx/ycbcr
media/libyuv
media/mp4parse 0.11.5
(rust dependency)
fallible_collections
ahash

@Feodor2

Feodor2 commented May 12, 2025

Copy link
Copy Markdown
Owner

Also

  1. Do not copy first junk lines "mode...."
  2. Telemtry is unnecessary

@Feodor2

Feodor2 commented May 12, 2025

Copy link
Copy Markdown
Owner

More when I examine all, if many code most likely the config switch for not to build like for webrender

@newbie-461

Copy link
Copy Markdown
Contributor Author

Ok, i will try to simplify this patch

@dainiusb

Copy link
Copy Markdown

Cleanup patch (meant to be applied on top of this PR) generated by LLM.

  1. Telemetry removed — stripped all AccumulateCategorical, RecordPixiTelemetry, RecordDecodeResultTelemetry, and the AVIF histograms from Histograms.json

  2. Build config switch added — MOZ_AVIF (--disable-avif), defaults ON when AV1 is enabled, gates the decoder, MIME type, and content registration independently

  3. SpeedHistogram() returns Nothing()

Stats: +27 / −421 on top of the PR commit. The .patch applies cleanly on ad6e2a0.

The merge conflicts are from the original PR — it's based on an older main that has since moved mp4parse and fallible_collections to third_party/rust/. The PR needs a rebase first.
Cargo.lock / Cargo.toml drift: Dependencies have changed on main since the PR was authored.
After rebasing, the simplification patch (strip telemetry + add MOZ_AVIF switch) applies cleanly with no conflicts — I tested the 7 files it touches auto-merge fine.

0001-simplify-avif-strip-telemetry-add-MOZ_AVIF.patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants