LibGfx/JPEG: Replace magic numbers with their specified name
This commit is contained in:
parent
bfe0df5677
commit
6b8b45c8a3
Notes:
sideshowbarker
2024-07-17 00:49:59 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/6b8b45c8a3 Pull-request: https://github.com/SerenityOS/serenity/pull/17652 Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/nico ✅
1 changed files with 4 additions and 2 deletions
|
@ -60,6 +60,8 @@
|
|||
#define JPEG_RST6 0xFFD6
|
||||
#define JPEG_RST7 0xFFD7
|
||||
|
||||
#define JPEG_ZRL 0xF0
|
||||
|
||||
#define JPEG_DHP 0xFFDE
|
||||
#define JPEG_EXP 0xFFDF
|
||||
|
||||
|
@ -353,8 +355,8 @@ static ErrorOr<void> add_ac(JPEGLoadingContext& context, Macroblock& macroblock,
|
|||
if (ac_symbol == 0)
|
||||
break;
|
||||
|
||||
// ac_symbol = 0xF0 means we need to skip 16 zeroes.
|
||||
u8 run_length = ac_symbol == 0xF0 ? 16 : ac_symbol >> 4;
|
||||
// ac_symbol = JPEG_ZRL means we need to skip 16 zeroes.
|
||||
u8 run_length = ac_symbol == JPEG_ZRL ? 16 : ac_symbol >> 4;
|
||||
j += run_length;
|
||||
|
||||
if (j > scan.spectral_selection_end) {
|
||||
|
|
Loading…
Add table
Reference in a new issue