summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2021-12-01 17:23:01 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2022-02-23 11:32:42 +0000
commit2013c162af618e701ba4caf84fa304ac38c92501 (patch)
treeb761fb90d2d1afc893f97f6c192c308976dbbbf1
parent958ea3a13e8d5ffd23f2540d7a0eb2926667a206 (diff)
downloadlibnsgif-2013c162af618e701ba4caf84fa304ac38c92501.tar.gz
libnsgif-2013c162af618e701ba4caf84fa304ac38c92501.tar.bz2
GIF: Scope reduce frame interlace mask.
-rw-r--r--src/gif.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gif.c b/src/gif.c
index 74fe4f4..cfd5278 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -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
@@ -497,12 +496,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;