forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/engine/tests/data/test_hevc_4k_wpp.mkvClear filter

2026-08-12

🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32Ahmet Kaan Gümüş · 65ea910
🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32

A 4K wavefront HEVC film (3840x2160, CTB 64,
entropy_coding_sync) writes num_entry_point_offsets = 33 in every slice
header -- exactly
PicHeightInCtbsY - 1, which is what ITU-T H.265 §7.4.7.1 allows -- and the
vendored parser kept them in a [u32; 32]. The 33rd panicked, the plugin edge
caught it, and the user got a black picture and an instant eof.

The list is now sized by the stream. Same shape swept through the rest of the
h265 parser, where a parsed count could outrun a fixed array: tile columns/rows
(the CTB grid allows far more than the 19/21 the VA-API picture parameter
holds), the long-term ref pic block, and sps/vps_max_sub_layers_minus1, which
u(3) can read as 7 into 7-long arrays. Those refuse by name instead.

And the door now asks the plugin for one picture before it lets a file in: a
session that opens and then decodes nothing was the black screen with no
explanation, so it is refused in its own words rather than in the missing-plugin
ones.