Skip to content

Accept AVIF lsel property with layer_id 0xffff#453

Merged
kinetiknz merged 2 commits into
mozilla:masterfrom
tnikkel:avif-lsel-layer-id-ffff
Jul 17, 2026
Merged

Accept AVIF lsel property with layer_id 0xffff#453
kinetiknz merged 2 commits into
mozilla:masterfrom
tnikkel:avif-lsel-layer-id-ffff

Conversation

@tnikkel

@tnikkel tnikkel commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Currently any lsel (LayerSelectorProperty) is treated as an unsupported
essential property, so its item is forbidden and consumers reject the whole
image.

A layer_id of 0xffff, however, does not select a specific spatial layer. It
only enables (without requiring) progressive rendering: a client may render
progressively or just show the final image — which is also what ignoring the
property does — so no client can get it wrong. Such a property therefore should
not make the item unsupported.

This parses the lsel layer_id (previously the box was skipped) and, when it
is 0xffff, accepts the item and does not report lsel as an unsupported
feature. Other layer_id values remain unsupported as before, and the
requirement that lsel be marked essential is still enforced for all
layer_id values.

Adds public_avif_lsel_no_layer_selection and a fixture
(tests/lsel-layer-id-ffff.avif, a green image carrying an essential lsel
with layer_id 0xffff).

Spec: https://aomediacodec.github.io/av1-avif/#layer-selector-property
Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2055634

tnikkel and others added 2 commits July 17, 2026 05:24
Currently any lsel (LayerSelectorProperty) is treated as an unsupported
essential property, so its item is forbidden and consumers reject the
whole image.

A layer_id of 0xffff, however, does not select a specific spatial layer.
It only enables (without requiring) progressive rendering: a client may
render progressively or just show the final image, which is also what
ignoring the property does, so no client can get it wrong. Such a
property therefore should not make the item unsupported.

Parse the lsel layer_id (previously the box was skipped) and, when it is
0xffff, accept the item and don't report lsel as an unsupported feature.
Other layer_id values remain unsupported as before, and the requirement
that lsel be marked essential is still enforced for all layer_id values.

Adds a test and fixture (tests/lsel-layer-id-ffff.avif, a green image
carrying an essential lsel with layer_id 0xffff).

See https://aomediacodec.github.io/av1-avif/#layer-selector-property
@kinetiknz
kinetiknz merged commit 8a49a07 into mozilla:master Jul 17, 2026
15 checks passed
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.

2 participants