Skip to content

test: play real sizes and formats the GPU refuses in the media player - #325

Merged
devopvoid merged 1 commit into
mainfrom
test/hardware-decoding-sizes
Oct 4, 2026
Merged

devopvoid merged 1 commit into
mainfrom
test/hardware-decoding-sizes

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Stacked on #323: the base is its branch, so the diff is this commit only. Retarget to main once #323 is merged.

The hardware decoding tests used 320x240 media only, which needs no padding and no cropping, and VP9 4:4:4 was the one stream a decoder refuses.

New media (2.7 MB together, one second at 15 fps each, made with FFmpeg as the test's comment describes): 1080p H.264 with B-frames, 1080p VP9, 4K H.264, H.264 at 1366x768, and H.264 High 10 and High 4:4:4 Predictive.

  • Hardware and software must give the same pictures at the same size. That covers the crop of the padded surface (1080 rows in 1088 or more) and the odd width of 1366, which is cropped on the right as well as at the bottom.
  • 10-bit and 4:4:4 H.264, which no hardware decoder takes, must play on in software without an error.

Run on an NVIDIA GeForce RTX 3080 on Windows (Direct3D 11): all 20 tests of HardwareDecodingTest pass with webrtc.test.hardwareDecoding set.

A side finding, from a throwaway benchmark that is not part of this change (steady state, 15 fps, noisy synthetic content, one 8 s run per setting): on this machine the D3D11 path saves little CPU. 1080p H.264 took 7.2 to 8.7 ms of CPU per frame in hardware against 8.7 ms in software; 4K took about 26 ms against 12 to 14 ms. The 7 to 8 times of the Apple M2 does not carry over, so the default should stay software on Windows until the readback and conversion are looked at.

Base automatically changed from test/hardware-decoding-lifecycle to main October 4, 2026 18:29
The hardware decoding tests used 320x240 media only, which needs no padding
and no cropping, and VP9 4:4:4 was the one stream a decoder refuses.

New media: 1080p H.264 with B-frames and 1080p VP9 (decoders put 1080 rows in
a surface of 1088 or more, and the player has to crop them), 4K H.264, H.264
at 1366x768 (cropped on the right as well as at the bottom), and H.264 High
10 and High 4:4:4 Predictive, which no hardware decoder takes. Each is one
second at 15 fps, 2.7 MB together, made with FFmpeg as the test's comment
describes.

Hardware and software must give the same pictures at the same size, and the
two formats must play on in software without an error.

Run on an NVIDIA GeForce RTX 3080 on Windows (Direct3D 11): 20 tests pass
with hardware required.
@devopvoid
devopvoid force-pushed the test/hardware-decoding-sizes branch from 9e0f328 to 41a9a8a Compare October 4, 2026 18:52
@devopvoid
devopvoid added this pull request to stack #327 October 4, 2026 19:10
@devopvoid
devopvoid merged commit 3e539f7 into main Oct 4, 2026
22 checks passed
@devopvoid
devopvoid deleted the test/hardware-decoding-sizes branch October 4, 2026 19:10
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.

1 participant