mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
LibGfx/JPEGLoader: Use ceil_div
No behavior change.
This commit is contained in:
parent
393fb1f7b9
commit
002eb0ad03
Notes:
sideshowbarker
2024-07-16 21:51:02 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/002eb0ad03 Pull-request: https://github.com/SerenityOS/serenity/pull/22989 Reviewed-by: https://github.com/LucasChollet ✅
@ -1237,8 +1237,8 @@ static inline bool validate_sampling_factors_and_modify_context(SamplingFactors
|
||||
|
||||
static inline void set_macroblock_metadata(JPEGLoadingContext& context)
|
||||
{
|
||||
context.mblock_meta.hcount = (context.frame.width + 7) / 8;
|
||||
context.mblock_meta.vcount = (context.frame.height + 7) / 8;
|
||||
context.mblock_meta.hcount = ceil_div<u32>(context.frame.width, 8);
|
||||
context.mblock_meta.vcount = ceil_div<u32>(context.frame.height, 8);
|
||||
context.mblock_meta.hpadded_count = context.mblock_meta.hcount;
|
||||
context.mblock_meta.vpadded_count = context.mblock_meta.vcount;
|
||||
context.mblock_meta.total = context.mblock_meta.hcount * context.mblock_meta.vcount;
|
||||
|
Loading…
Reference in New Issue
Block a user