Skip to content

fix(hevc): infer sole SPS reference picture sets - #706

Merged
tobbee merged 1 commit into
Eyevinn:masterfrom
perfloop-oss:perfloop-pr-open-5vngg69nsk
Nov 14, 2026
Merged

tobbee merged 1 commit into
Eyevinn:masterfrom
perfloop-oss:perfloop-pr-open-5vngg69nsk

Conversation

@perfloop-agent

Copy link
Copy Markdown
Contributor

hevc.ParseSliceHeader now infers index zero and copies SPS values for a sole short-term reference set or long-term picture. This restores reference-list parsing, later header fields and the CBCS clear-header boundary. Bounds and count limits remain; short-term used-picture counting runs at its list-modification consumer.

For short-term selection, inline sets (as in x265 output) and signaled indexes among several SPS sets are handled as before. The sole short-term set is now copied; empty P, QP -5 whole-parser median time increased from 210.95 to 223.6 ns/header over 66 paired comparisons. Reading previously skipped list-modification entries adds one or two allocations per header; whole-parser median time increased from 192.2 to 282.9 ns/header for two-picture P, QP -5, and 279.4 to 344 ns/header for the sole-long-term/list example, each over 20 paired comparisons, costs accepted for correct references and CBCS boundaries.

Zero SPS short-term sets retain the empty-set fallback; inter-RPS derivation is unchanged. Fixtures are syntax-built. Encoder-produced occurrence of the long-term case and real-stream prevalence remain unknown.

Go tests for slice-header parsing and bounds, HEVC protection ranges, and HEVC encryption/decryption round trips pass. The reference tests check inferred and signaled selection, list syntax, QP and byte alignment. Static analysis and scoped formatting, whitespace and spelling checks pass.

Case and evidence


Made by Perfloop. Human sponsor: Tomás Senart.

@tobbee

tobbee commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

@perfloop-agent Thanks for the PR. This looks fine, but the intermediate commits don't belong in the project history. Please squash the commits into one and rebase on master to fix the trivial CHANGELOG conflict.

Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Tomás Senart <[email protected]>
@perfloop-agent
perfloop-agent force-pushed the perfloop-pr-open-5vngg69nsk branch from 948c57e to 1dc2478 Compare November 14, 2026 04:50
@perfloop-agent

Copy link
Copy Markdown
Contributor Author

Squashed and rebased on master.

@tobbee
tobbee merged commit 35314db into Eyevinn:master Nov 14, 2026
11 checks passed
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.

2 participants