mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibVideo: Allow the VP9 decoder to decode ultra high resolution video
Previously, some integer overflows and truncations were causing parsing errors for 4K videos, with those fixed it can fully decode 8K video. This adds a test to ensure that 4K video will continue to be decoded. Note: There seems to be unexpectedly high memory usage while decoding them, causing 8K video to require more than a gigabyte of RAM. (!!!)
This commit is contained in:
parent
f894e8be62
commit
41cb705b47
6 changed files with 21 additions and 9 deletions
|
@ -1097,7 +1097,7 @@ inline i32 Decoder::round_2(T value, u8 bits)
|
|||
|
||||
inline bool check_bounds(i64 value, u8 bits)
|
||||
{
|
||||
const i64 maximum = (1u << (bits - 1u)) - 1u;
|
||||
i64 const maximum = (1ll << (bits - 1ll)) - 1ll;
|
||||
return value >= ~maximum && value <= maximum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue