Closed Bug 1784109 Opened 2 years ago Closed 2 years ago

Videos zoomed on a corner

Categories

(Core :: Graphics: WebRender, defect, P2)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: kbrosnan, Assigned: jnicol)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

From github: https://github.com/mozilla-mobile/fenix/issues/26408.

Steps to reproduce

  1. Go to Youtube or any video-related website
  2. Watch a video at low resolution

Expected behaviour

Videos should be viewable at all resolutions.

Actual behaviour

When launching a video, and using a low resolution like 360p or 480p, I can only see the top left corner of the video.
However, the more I increase the resolution, the less the video is zoomed in until 1080p where I can see the whole video again.

It seems to be happening after the 101.0 update.

Linked topic: https://www.reddit.com/r/firefox/comments/v6bmg2/firefox_android_shows_videos_incredibly/

Device name

Motorola E4 plus

Android version

Android 7.1.1

Firefox release type

Firefox

Firefox version

103.2.0

Device logs

No response

Additional information

240p

360p

1080p

┆Issue is synchronized with this Jira Task

Change performed by the Move to Bugzilla add-on.

bug 1778150 is fixed in release so this looks like something that is similar but not fixed by the other changes.

Regressed by: 1731980
See Also: → 1778150
Attached image 240p.png
Attached image 360p.png
Attached image 1080p.png

Set release status flags based on info from the regressing bug 1731980

:jnicol, since you are the author of the regressor, bug 1731980, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jnicol)
Severity: -- → S2
Priority: -- → P2
Attached file about:support

about:support from github

Set release status flags based on info from the regressing bug 1731980

On Android, SurfaceTextures provide a transform matrix that should be
applied to texture coordinates when sampling from the texture. Prior
to bug 1731980 we ignored this value, and simply y-flipped the video
instead. On most devices the transform is just a y-flip, so this
produced the correct results. However, on some devices the transform
included a scale as well as the y-flip, meaning that we rendered
videos at an incorrect size.

The fix for bug 1731980 was to correctly apply the transformation.
However, it now appears that on the Moto G4 Plus the transform
provided by the system is incorrect. On this device, videos were
rendered correctly when we ignored the transform and just did a
y-flip, and now that we apply the transform videos are rendered at the
wrong size.

This patch makes it so that we override the system-provided transform
on this device with a simple y-flip. The existing mIgnoreTransform
flag has been changed to an optional "transform override" value to
achieve this. We ensure that we only override the transform for
SurfaceTextures that are output from a MediaCodec, to ensure that we
don't accidentally apply the wrong transform to SurfaceTextures
attached to other sources.

It is entirely possible that other devices are also affected by this
bug, or even that certain software versions on this device are
unnaffected. For now we have applied this workaround on all software
versions and only on this specific device. We can tweak this if and
when users report bugs.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED

In bug 1787459 we have a report of the same issue on a Nokia 3. Both of these have a Mediatek 6737 according to gsmarena, so I'll make the workaround apply to that SOC rather than just this specific device.

Interestingly the Build.HARDWARE field for both devices is "mt6735" rather than 6737, so I'll trust about:support over gsmarena...

Flags: needinfo?(jnicol)
Attachment #9291768 - Attachment description: Bug 1784109 - Override SurfaceTexture transform for videos on Moto G4 Plus. r?#gfx-reviewers → Bug 1784109 - Override SurfaceTexture transform for videos on Mediatek 6735. r?#gfx-reviewers
Pushed by jnicol@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eca556570026
Override SurfaceTexture transform for videos on Mediatek 6735. r=gfx-reviewers,media-playback-reviewers,lsalzman,alwu
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Regressions: 1790188
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: