Gitweb links:

...log 
http://git.netsurf-browser.org/libnsgif.git/shortlog/6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0
...commit 
http://git.netsurf-browser.org/libnsgif.git/commit/6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0
...tree 
http://git.netsurf-browser.org/libnsgif.git/tree/6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0

The branch, master has been updated
       via  6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0 (commit)
       via  550b6fa74e7f5c6a7800d2f6f4841636a3f93544 (commit)
       via  0837e397a55e4a6c2993f67276d9921ab9f2974b (commit)
      from  5d3093f8c79e54827864b04ec6b470488d72c960 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libnsgif.git/commit/?id=6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0
commit 6dee5d6e11540aa9a7c0e4db58cdeb45392a2ba0
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    test: nsgif: Print whether frames are interlaced

diff --git a/test/nsgif.c b/test/nsgif.c
index 16a4bc9..29341e7 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -187,6 +187,7 @@ static void print_gif_frame_info(const nsgif_frame_info_t 
*info, uint32_t i)
        fprintf(stdout, "    local palette: %s\n", info->local_palette ? "yes" 
: "no");
        fprintf(stdout, "    disposal-method: %s\n", disposal);
        fprintf(stdout, "    transparency: %s\n", info->transparency ? "yes" : 
"no");
+       fprintf(stdout, "    interlaced: %s\n", info->interlaced ? "yes" : 
"no");
        fprintf(stdout, "    display: %s\n", info->display ? "yes" : "no");
        fprintf(stdout, "    delay: %"PRIu32"\n", info->delay);
        fprintf(stdout, "    rect:\n");


commitdiff 
http://git.netsurf-browser.org/libnsgif.git/commit/?id=550b6fa74e7f5c6a7800d2f6f4841636a3f93544
commit 550b6fa74e7f5c6a7800d2f6f4841636a3f93544
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    gif: Set interlaced bool in frame info

diff --git a/src/gif.c b/src/gif.c
index 44c60a9..dafee1a 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -600,20 +600,15 @@ static inline nsgif_error nsgif__decode(
                const uint8_t *data,
                uint32_t *restrict frame_data)
 {
-       enum {
-               GIF_MASK_INTERLACE = 0x40,
-       };
-
        nsgif_error ret;
        uint32_t width  = frame->info.rect.x1 - frame->info.rect.x0;
        uint32_t height = frame->info.rect.y1 - frame->info.rect.y0;
        uint32_t offset_x = frame->info.rect.x0;
        uint32_t offset_y = frame->info.rect.y0;
-       uint32_t interlace = frame->flags & GIF_MASK_INTERLACE;
        uint32_t transparency_index = frame->transparency_index;
        uint32_t *restrict colour_table = gif->colour_table;
 
-       if (interlace == false && offset_x == 0 &&
+       if (frame->info.interlaced == false && offset_x == 0 &&
                        width == gif->info.width &&
                        width == gif->rowspan) {
                ret = nsgif__decode_simple(gif, height, offset_y,
@@ -621,7 +616,7 @@ static inline nsgif_error nsgif__decode(
                                frame_data, colour_table);
        } else {
                ret = nsgif__decode_complex(gif, width, height,
-                               offset_x, offset_y, interlace,
+                               offset_x, offset_y, frame->info.interlaced,
                                data, transparency_index,
                                frame_data, colour_table);
        }
@@ -1020,6 +1015,7 @@ static nsgif_error nsgif__parse_image_descriptor(
        enum {
                NSGIF_IMAGE_DESCRIPTOR_LEN = 10u,
                NSGIF_IMAGE_SEPARATOR      = 0x2Cu,
+               NSGIF_MASK_INTERLACE       = 0x40u,
        };
 
        assert(gif != NULL);
@@ -1047,6 +1043,8 @@ static nsgif_error nsgif__parse_image_descriptor(
                frame->info.rect.x1 = x + w;
                frame->info.rect.y1 = y + h;
 
+               frame->info.interlaced = frame->flags & NSGIF_MASK_INTERLACE;
+
                /* Allow first frame to grow image dimensions. */
                if (gif->info.frame_count == 0) {
                        if (x + w > gif->info.width) {


commitdiff 
http://git.netsurf-browser.org/libnsgif.git/commit/?id=0837e397a55e4a6c2993f67276d9921ab9f2974b
commit 0837e397a55e4a6c2993f67276d9921ab9f2974b
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    api: Add interlaced bool to frame info

diff --git a/include/nsgif.h b/include/nsgif.h
index 7df8981..26897df 100644
--- a/include/nsgif.h
+++ b/include/nsgif.h
@@ -429,7 +429,8 @@ typedef struct nsgif_frame_info {
        bool transparency;
        /** whether the frame has a local colour table */
        bool local_palette;
-
+       /** whether the frame is interlaced */
+       bool interlaced;
        /** Disposal method for previous frame; affects plotting */
        uint8_t disposal;
        /** delay (in cs) before animating the frame */


-----------------------------------------------------------------------

Summary of changes:
 include/nsgif.h |    3 ++-
 src/gif.c       |   12 +++++-------
 test/nsgif.c    |    1 +
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/nsgif.h b/include/nsgif.h
index 7df8981..26897df 100644
--- a/include/nsgif.h
+++ b/include/nsgif.h
@@ -429,7 +429,8 @@ typedef struct nsgif_frame_info {
        bool transparency;
        /** whether the frame has a local colour table */
        bool local_palette;
-
+       /** whether the frame is interlaced */
+       bool interlaced;
        /** Disposal method for previous frame; affects plotting */
        uint8_t disposal;
        /** delay (in cs) before animating the frame */
diff --git a/src/gif.c b/src/gif.c
index 44c60a9..dafee1a 100644
--- a/src/gif.c
+++ b/src/gif.c
@@ -600,20 +600,15 @@ static inline nsgif_error nsgif__decode(
                const uint8_t *data,
                uint32_t *restrict frame_data)
 {
-       enum {
-               GIF_MASK_INTERLACE = 0x40,
-       };
-
        nsgif_error ret;
        uint32_t width  = frame->info.rect.x1 - frame->info.rect.x0;
        uint32_t height = frame->info.rect.y1 - frame->info.rect.y0;
        uint32_t offset_x = frame->info.rect.x0;
        uint32_t offset_y = frame->info.rect.y0;
-       uint32_t interlace = frame->flags & GIF_MASK_INTERLACE;
        uint32_t transparency_index = frame->transparency_index;
        uint32_t *restrict colour_table = gif->colour_table;
 
-       if (interlace == false && offset_x == 0 &&
+       if (frame->info.interlaced == false && offset_x == 0 &&
                        width == gif->info.width &&
                        width == gif->rowspan) {
                ret = nsgif__decode_simple(gif, height, offset_y,
@@ -621,7 +616,7 @@ static inline nsgif_error nsgif__decode(
                                frame_data, colour_table);
        } else {
                ret = nsgif__decode_complex(gif, width, height,
-                               offset_x, offset_y, interlace,
+                               offset_x, offset_y, frame->info.interlaced,
                                data, transparency_index,
                                frame_data, colour_table);
        }
@@ -1020,6 +1015,7 @@ static nsgif_error nsgif__parse_image_descriptor(
        enum {
                NSGIF_IMAGE_DESCRIPTOR_LEN = 10u,
                NSGIF_IMAGE_SEPARATOR      = 0x2Cu,
+               NSGIF_MASK_INTERLACE       = 0x40u,
        };
 
        assert(gif != NULL);
@@ -1047,6 +1043,8 @@ static nsgif_error nsgif__parse_image_descriptor(
                frame->info.rect.x1 = x + w;
                frame->info.rect.y1 = y + h;
 
+               frame->info.interlaced = frame->flags & NSGIF_MASK_INTERLACE;
+
                /* Allow first frame to grow image dimensions. */
                if (gif->info.frame_count == 0) {
                        if (x + w > gif->info.width) {
diff --git a/test/nsgif.c b/test/nsgif.c
index 16a4bc9..29341e7 100644
--- a/test/nsgif.c
+++ b/test/nsgif.c
@@ -187,6 +187,7 @@ static void print_gif_frame_info(const nsgif_frame_info_t 
*info, uint32_t i)
        fprintf(stdout, "    local palette: %s\n", info->local_palette ? "yes" 
: "no");
        fprintf(stdout, "    disposal-method: %s\n", disposal);
        fprintf(stdout, "    transparency: %s\n", info->transparency ? "yes" : 
"no");
+       fprintf(stdout, "    interlaced: %s\n", info->interlaced ? "yes" : 
"no");
        fprintf(stdout, "    display: %s\n", info->display ? "yes" : "no");
        fprintf(stdout, "    delay: %"PRIu32"\n", info->delay);
        fprintf(stdout, "    rect:\n");


-- 
NetSurf GIF Decoder
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to