Skip to content

Add a 360 stereo left-right video projection mode - #2054

Merged
svillar merged 1 commit into
Igalia:mainfrom
vil-it:upstream-360-stereo-lr
Aug 20, 2026
Merged

Add a 360 stereo left-right video projection mode#2054
svillar merged 1 commit into
Igalia:mainfrom
vil-it:upstream-360-stereo-lr

Conversation

@NataleVIL

Copy link
Copy Markdown
Contributor

Split out of #2038 so the three changes can be reviewed individually, as suggested there.

Full-sphere stereo was only available as over/under. Side-by-side existed for 180 degree and flat 3D video but not for 360, so side-by-side 360 content could not be viewed in stereo at all.

Adds VIDEO_PROJECTION_360_STEREO_LEFT_RIGHT with both a mesh and a compositor-layer implementation, a menu entry with icon, and the mozVideoProjection=360lr query parameter. The 360 labels and icons now follow the naming and divider-bar convention the 180 modes already use, so the menu says which layout it means:

360 Stereo -> Stereo 360 Top to Bottom
(new) -> Stereo 360 Left to Right

On reachability

@svillar you noted in #2038 that 360lr and 360tb are never reached. That is correct for the URL parameter - the YouTube extension only emits 360_auto and 360s_auto, and nothing in the tree emits 360tb.

The new mode is reached through the video projection menu instead, which is how it was verified on device. Automatic selection would need the inference in fxr_youtube's overrideVideoProjection(). Worth noting if you do pick it up: Automatic selection is based on the video title and description. So an "Xbox 360" Video is treated as a 360 video, for example. Also isSBSVideo() is tested before is360Video(), so a video with "360 SBS" in its title already resolves to flat 3D side-by-side today.

I would exclude the automatic selection from this PR.

Changed since #2038

360s is no longer replaced by 360tb. Instead 360tb is added alongside it. The earlier version dropped 360s, which both fxr_youtubeandfxr_vimeoemit - that would have routed every YouTube and Vimeo 360 stereo video toVIDEO_PROJECTION_360` and played it mono.

How to test

ffmpeg -f lavfi -i color=c=red:s=2048x1024:d=10
-f lavfi -i color=c=blue:s=2048x1024:d=10
-filter_complex hstack -pix_fmt yuv420p 360lr.mp4

Open it, enter fullscreen and pick Stereo 360 Left to Right: the left eye
shows red, the right eye blue. Picking Stereo 360 Top to Bottom on the same
file shows both colours in both eyes, which is the expected mismatch.

Tested on a Pico Neo 3.

Full-sphere stereo was only available as over/under. Side-by-side
existed for 180 degree and flat 3D video, but not for 360, so
side-by-side 360 content could not be viewed in stereo at all.

Adds VIDEO_PROJECTION_360_STEREO_LEFT_RIGHT with both a mesh and a
compositor-layer implementation, a menu entry with icon, and the
mozVideoProjection=360lr query parameter. 360tb is added alongside 360s
so the query-string vocabulary matches 180tb/180lr/3dtb; 360s is kept
because it is what the bundled YouTube and Vimeo extensions emit. The
specific values are matched before the bare 360 prefix, as already
needed for 180lr and 180tb. The menu lists left-right before top-bottom,
following the order the 180 degree modes already use.

Neither the "360 Stereo" label nor its icon said that it means
over/under, which makes diagnosing content format problems harder than
it needs to be. Both 360 modes now follow the naming scheme and the
divider-bar icon convention already used by the 180 modes:

  360 Stereo -> Stereo 360 Top to Bottom
  (new)      -> Stereo 360 Left to Right

The new mode is reached through the video projection menu. Automatic
selection from the URL would additionally require the inference in the
YouTube extension, which is left out of this change on purpose.

Translations are updated for de, en-rGB and it only; the remaining locales
fall back to English until they are handled by the l10n process. The
string key is kept so existing translations are not orphaned.

Verified on a Pico Neo 3 (OpenXR) with an equirect test video whose left
half is red and right half blue: the left eye shows red, the right blue.
@svillar svillar added the release_candidate PR that should be part of the next release label Aug 19, 2026

@svillar svillar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this is "only" adding the support for the menu. I was mixing it with the autodetection heuristics. I agree to add them later, the whole heuristic system is quite fragile and easy to break. Thanks for the patch!

@svillar
svillar merged commit a1c36e5 into Igalia:main Aug 20, 2026
6 checks passed
@NataleVIL
NataleVIL deleted the upstream-360-stereo-lr branch August 27, 2026 14:04
@svillar svillar added this to the v1.9.1 milestone Sep 1, 2026
@svillar svillar removed the release_candidate PR that should be part of the next release label Sep 1, 2026
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