diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2021-12-01 17:23:01 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2021-12-01 17:23:01 +0000 |
commit | 56b04ab7b2617e090c1c82f828782b7e3253dfa9 (patch) | |
tree | 8224e868d3e5197c9f7ffcfae901ff5606dc35d0 | |
parent | 3efe269c0ea83df2b8fc5885d36e0074ff904527 (diff) | |
download | libnsgif-56b04ab7b2617e090c1c82f828782b7e3253dfa9.tar.gz libnsgif-56b04ab7b2617e090c1c82f828782b7e3253dfa9.tar.bz2 |
GIF: Scope reduce frame interlace mask.
-rw-r--r-- | src/gif.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -52,7 +52,6 @@ enum nsgif_disposal { }; /* GIF Flags */ -#define NSGIF_INTERLACE_MASK 0x40 #define NSGIF_COLOUR_TABLE_MASK 0x80 #define NSGIF_COLOUR_TABLE_SIZE_MASK 0x07 #define NSGIF_BLOCK_TERMINATOR 0x00 @@ -426,12 +425,16 @@ static inline nsgif_result nsgif__decode( const uint8_t *data, uint32_t *restrict frame_data) { + enum { + GIF_MASK_INTERLACE = 0x40, + }; + nsgif_result ret; uint32_t offset_x = frame->redraw_x; uint32_t offset_y = frame->redraw_y; uint32_t width = frame->redraw_width; uint32_t height = frame->redraw_height; - uint32_t interlace = frame->flags & NSGIF_INTERLACE_MASK; + uint32_t interlace = frame->flags & GIF_MASK_INTERLACE; uint32_t transparency_index = frame->transparency_index; uint32_t *restrict colour_table = gif->colour_table; |