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

LibVideo/VP9: Consolidate frame size calculations

This moves all the frame size calculation to `FrameContext`, where the
subsampling is easily accessible to determine the size for each plane.
The internal framebuffer size has also been reduced to the exact frame
size that is output.
This commit is contained in:
Zaggy1024 2023-04-18 20:16:44 -05:00 committed by Tim Flynn
parent 57c7389200
commit f2c0cee522
5 changed files with 61 additions and 77 deletions

View file

@ -119,4 +119,9 @@ inline u8 transform_size_to_sub_blocks(TransformSize transform_size)
return 1 << transform_size;
}
inline u32 y_size_to_uv_size(bool subsampled, u32 size)
{
return (size + subsampled) >> subsampled;
}
}