1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:07:34 +00:00

LibVideo/VP9: Index inter-frame references with named fields or an enum

Previously, we were using size_t, often coerced from bool or u8, to
index reference pairs. Now, they must either be taken directly from
named fields or indexed using the `ReferenceIndex` enum with options
`primary` and `secondary`. With a more explicit method of indexing
these, the compiler can aid in using reference pairs correctly, and
fuzzers may be able to detect undefined behavior more easily.
This commit is contained in:
Zaggy1024 2022-11-25 03:03:22 -06:00 committed by Andreas Kling
parent 3af4deba6d
commit f4761dab09
8 changed files with 174 additions and 157 deletions

View file

@ -66,6 +66,11 @@ enum ReferenceMode : u8 {
ReferenceModeSelect = 2,
};
enum class ReferenceIndex : u8 {
Primary = 0,
Secondary = 1,
};
enum BlockSubsize : u8 {
Block_4x4 = 0,
Block_4x8 = 1,