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

LibVideo: Improve error reporting for VP9 range decoder

init_bool will now check whether there is enough data in the bitstream
for the range coding size to be fully read.

exit_bool will now read the entire padding element regardless of size,
which the spec does not specify a limit on.
This commit is contained in:
Zaggy1024 2022-10-08 20:06:15 -05:00 committed by Andrew Kaster
parent 7f46033c01
commit 13ccde8637
2 changed files with 19 additions and 9 deletions

View file

@ -32,7 +32,8 @@ public:
ErrorOr<void> init_bool(size_t bytes);
ErrorOr<bool> read_bool(u8 probability);
ErrorOr<void> exit_bool();
ErrorOr<u8> read_literal(size_t n);
ErrorOr<u8> read_literal(u8 bit_count);
size_t range_coding_bits_remaining();
/* (4.9.2) */
ErrorOr<i8> read_s(size_t n);