Closed Bug 2072068 Opened 2 months ago Closed 24 days ago

[wpt-sync] Sync PR 62693 - media: Always decode Opus at 48 kHz in OpusAudioDecoder

Categories

(Core :: Audio/Video: Web Codecs, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(1 file)

Sync web-platform-tests PR 62693 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62693
Details from upstream follow.

Jordan Bayles <jophba@chromium.org> wrote:

media: Always decode Opus at 48 kHz in OpusAudioDecoder

In RFC 7845 Section 5.1, Opus audio is always coded and decoded at 48000
Hz by default. FFmpeg's libopusdec unconditionally sets the output
sample rate to 48000 Hz regardless of the configured sample rate (e.g.,
44100 Hz from WebCodecs).

Previously, OpusAudioDecoder passed config.samples_per_second() directly
to opus_multistream_decoder_create(), which caused initialization to
fail with OPUS_BAD_ARG when configured with non-Opus rates like 44.1
kHz.

This patch normalizes OpusAudioDecoder to always initialize at
kOpusDefaultSampleRate (48000 Hz) and disables phase inversion when
targeting mono output, matching FFmpegAudioDecoder's behavior.

Fixed: 547065816
Change-Id: Ie3ec3e5acf65ce82735b8e7a430cb5abef0b4cd7
TAG=agy
CONV=e613eb01-c26a-4600-820a-03e77c3f7c7d

Reviewed-on: https://chromium-review.googlesource.com/8408705
WPT-Export-Revision: 360817a4603cb8137f3b95277dd04b761315d1e0

Component: web-platform-tests → Audio/Video: Web Codecs
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Attached file Notable wpt changes —

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 265 tests and 6 subtests

Status Summary

Firefox

OK : 26[GitHub] 182[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 246[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 248[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 254[GitHub] 1668[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 2318[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 2416[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL : 8[GitHub] 351[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 362[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PRECONDITION_FAILED: 23[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 125[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 549[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
ERROR : 4[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 12[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
NOTRUN : 40

Chrome

OK : 22
PASS : 198
FAIL : 24
ERROR : 4
NOTRUN : 40

Safari

OK : 22
PASS : 212
FAIL : 10
ERROR : 4
NOTRUN : 40

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

(See attachment for full changes)

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/77ee04f2939e https://hg.mozilla.org/integration/autoland/rev/93d34da6b1e7 [wpt PR 62693] - media: Always decode Opus at 48 kHz in OpusAudioDecoder, a=testonly
Status: NEW → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: