Videos with non-1:1 pixel aspect ratios do not correctly scale.
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: Zaggy1024, Assigned: Zaggy1024)
Details
Attachments
(2 files)
Currently, VP9 and AV1 videos with the render size not equal to the frame size are not scaled correctly. An example of this is this attachment from Bug 1697316. Another example will be attached.
The pixel aspect ratio should be derived from the frame and render sizes and stored by MediaChangeMonitor to be able to apply the ratio to any subsequent image sizes found in-band.
Note that VP9 allows a sample to change the render size independently of the frame size, so in cases where that flag is set, we should probably also change the pixel aspect ratio to match. I currently don't have any test cases for that, as I haven't found a way to make libvpx write a render size to the bitstream with FFmpeg. If there is a way, it would be good to test that in other media players for consistency.
(In reply to Zaggy1024 from comment #0)
Currently, VP9 and AV1 videos with the render size not equal to the frame size are not scaled correctly. An example of this is this attachment from Bug 1697316. Another example will be attached.
In this attachment, the video is displayed at almost double the size that is intended, because MediaChangeMonitor assumes that it should leave the render resolution unchanged since the aspect ratio doesn't match. Instead, the render size after it encounters the first sample should have the height set to 384px, and the width should be scaled by the PAR to 681px.
In continuous_vp9_res.webm, the render resolution update is rejected on the third and last sequence in the video, as it is an imperfect 16:9 resolution, 1366x768 with a ratio of 16.0078125:9. When scaling by the pixel aspect ratio instead, the resolution is correctly set to 1366x768.
Fixes issues where frame size changes in-band would not be applied if the aspect ratio changed.
Depends on D143558
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Backed out for causing mochitest failures on test_eme_waitingforkey.html
Failure line(s): TEST-UNEXPECTED-FAIL | dom/media/test/test_eme_waitingforkey.html | Test timed out!
Fix is attached to Bug 1764478.
Comment 7•3 years ago
|
||
bugherder |
Description
•