]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/gif: fix off by one in column offsetting finding
authorClément Bœsch <clement@stupeflix.com>
Mon, 16 Feb 2015 16:23:34 +0000 (17:23 +0100)
committerClément Bœsch <clement@stupeflix.com>
Mon, 16 Feb 2015 16:47:35 +0000 (17:47 +0100)
libavcodec/gif.c
tests/ref/fate/gifenc-bgr8
tests/ref/fate/gifenc-pal8
tests/ref/fate/gifenc-rgb8

index db2cee9412eef4f101674e03f679012b38fdda0c..cf5d438a7283ac45b048a273d8fe5a0a87a1315c 100644 (file)
@@ -108,7 +108,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
         /* skip common columns */
         while (x_start < x_end) {
             int same_column = 1;
-            for (y = y_start; y < y_end; y++) {
+            for (y = y_start; y <= y_end; y++) {
                 if (ref[y*ref_linesize + x_start] != buf[y*linesize + x_start]) {
                     same_column = 0;
                     break;
@@ -120,7 +120,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
         }
         while (x_end > x_start) {
             int same_column = 1;
-            for (y = y_start; y < y_end; y++) {
+            for (y = y_start; y <= y_end; y++) {
                 if (ref[y*ref_linesize + x_end] != buf[y*linesize + x_end]) {
                     same_column = 0;
                     break;
index 9f4a593f4d704ae9a00977f78f45a2f6fb021fe2..f3b7772785914373fde54fa408cd3df1ea07f5c9 100644 (file)
 0,         33,         33,        1,     4295, 0xf71b0b38, S=1,     1024, 0xf351799f
 0,         34,         34,        1,     2044, 0x5adcb93b, S=1,     1024, 0xf351799f
 0,         35,         35,        1,     3212, 0xcf79eeed, S=1,     1024, 0xf351799f
-0,         36,         36,        1,     2281, 0x68464d30, S=1,     1024, 0xf351799f
+0,         36,         36,        1,     2292, 0xb4386334, S=1,     1024, 0xf351799f
 0,         37,         37,        1,     3633, 0x0010992f, S=1,     1024, 0xf351799f
 0,         38,         38,        1,     3552, 0x23697490, S=1,     1024, 0xf351799f
 0,         39,         39,        1,     3690, 0x62afdbb8, S=1,     1024, 0xf351799f
-0,         40,         40,        1,     1558, 0x7a13e53b, S=1,     1024, 0xf351799f
-0,         41,         41,        1,      940, 0xb1b6cba2, S=1,     1024, 0xf351799f
+0,         40,         40,        1,     1559, 0x5baef54a, S=1,     1024, 0xf351799f
+0,         41,         41,        1,      954, 0xca75ca79, S=1,     1024, 0xf351799f
 0,         42,         42,        1,      273, 0x3687799b, S=1,     1024, 0xf351799f
 0,         43,         43,        1,      930, 0x29f3b0c4, S=1,     1024, 0xf351799f
-0,         44,         44,        1,      271, 0xe7af807c, S=1,     1024, 0xf351799f
+0,         44,         44,        1,      271, 0x305e8094, S=1,     1024, 0xf351799f
 0,         45,         45,        1,      196, 0xf5ab51ee, S=1,     1024, 0xf351799f
 0,         46,         46,        1,     4299, 0x67ec0d55, S=1,     1024, 0xf351799f
 0,         47,         47,        1,     4895, 0xb394406c, S=1,     1024, 0xf351799f
@@ -56,7 +56,7 @@
 0,         54,         54,        1,     5179, 0x860fc6a1, S=1,     1024, 0xf351799f
 0,         55,         55,        1,     5046, 0xce9183d3, S=1,     1024, 0xf351799f
 0,         56,         56,        1,     5140, 0xa6d7b9af, S=1,     1024, 0xf351799f
-0,         57,         57,        1,     4289, 0xb415f717, S=1,     1024, 0xf351799f
+0,         57,         57,        1,     4301, 0x03b6ef3f, S=1,     1024, 0xf351799f
 0,         58,         58,        1,     5079, 0xa8d59e01, S=1,     1024, 0xf351799f
 0,         59,         59,        1,     5284, 0xea34e3b3, S=1,     1024, 0xf351799f
 0,         60,         60,        1,     5426, 0x556a15cd, S=1,     1024, 0xf351799f
index ede614c21d4c470c1c618c4b5855c0356210b07b..a84efa0a06b22aa42ca7bee6d95e28bf4bcbffd0 100644 (file)
 0,         33,         33,        1,     4295, 0xf71b0b38, S=1,     1024, 0xf351799f
 0,         34,         34,        1,     2044, 0x5adcb93b, S=1,     1024, 0xf351799f
 0,         35,         35,        1,     3212, 0xcf79eeed, S=1,     1024, 0xf351799f
-0,         36,         36,        1,     2281, 0x68464d30, S=1,     1024, 0xf351799f
+0,         36,         36,        1,     2292, 0xb4386334, S=1,     1024, 0xf351799f
 0,         37,         37,        1,     3633, 0x0010992f, S=1,     1024, 0xf351799f
 0,         38,         38,        1,     3552, 0x23697490, S=1,     1024, 0xf351799f
 0,         39,         39,        1,     3690, 0x62afdbb8, S=1,     1024, 0xf351799f
-0,         40,         40,        1,     1558, 0x7a13e53b, S=1,     1024, 0xf351799f
-0,         41,         41,        1,      940, 0xb1b6cba2, S=1,     1024, 0xf351799f
+0,         40,         40,        1,     1559, 0x5baef54a, S=1,     1024, 0xf351799f
+0,         41,         41,        1,      954, 0xca75ca79, S=1,     1024, 0xf351799f
 0,         42,         42,        1,      273, 0x3687799b, S=1,     1024, 0xf351799f
 0,         43,         43,        1,      930, 0x29f3b0c4, S=1,     1024, 0xf351799f
-0,         44,         44,        1,      271, 0xe7af807c, S=1,     1024, 0xf351799f
+0,         44,         44,        1,      271, 0x305e8094, S=1,     1024, 0xf351799f
 0,         45,         45,        1,      196, 0xf5ab51ee, S=1,     1024, 0xf351799f
 0,         46,         46,        1,     4299, 0x67ec0d55, S=1,     1024, 0xf351799f
 0,         47,         47,        1,     4895, 0xb394406c, S=1,     1024, 0xf351799f
@@ -56,7 +56,7 @@
 0,         54,         54,        1,     5179, 0x860fc6a1, S=1,     1024, 0xf351799f
 0,         55,         55,        1,     5046, 0xce9183d3, S=1,     1024, 0xf351799f
 0,         56,         56,        1,     5140, 0xa6d7b9af, S=1,     1024, 0xf351799f
-0,         57,         57,        1,     4289, 0xb415f717, S=1,     1024, 0xf351799f
+0,         57,         57,        1,     4301, 0x03b6ef3f, S=1,     1024, 0xf351799f
 0,         58,         58,        1,     5079, 0xa8d59e01, S=1,     1024, 0xf351799f
 0,         59,         59,        1,     5284, 0xea34e3b3, S=1,     1024, 0xf351799f
 0,         60,         60,        1,     5426, 0x556a15cd, S=1,     1024, 0xf351799f
index a8941732251a17eda833efbc327fbab69845d891..d1a990d07e51caf4abb6d2ec92eece446bc8682f 100644 (file)
 0,         33,         33,        1,     4295, 0xc1850a80, S=1,     1024, 0xcfc8799f
 0,         34,         34,        1,     2044, 0x0440c072, S=1,     1024, 0xcfc8799f
 0,         35,         35,        1,     3212, 0xe91af08f, S=1,     1024, 0xcfc8799f
-0,         36,         36,        1,     2281, 0x6a414aa1, S=1,     1024, 0xcfc8799f
+0,         36,         36,        1,     2292, 0x6765633e, S=1,     1024, 0xcfc8799f
 0,         37,         37,        1,     3633, 0xac779aa3, S=1,     1024, 0xcfc8799f
 0,         38,         38,        1,     3552, 0xed2c75b2, S=1,     1024, 0xcfc8799f
 0,         39,         39,        1,     3690, 0x2020dd0d, S=1,     1024, 0xcfc8799f
-0,         40,         40,        1,     1558, 0x2c14e4b2, S=1,     1024, 0xcfc8799f
-0,         41,         41,        1,      940, 0x4927cd90, S=1,     1024, 0xcfc8799f
+0,         40,         40,        1,     1559, 0x596ef330, S=1,     1024, 0xcfc8799f
+0,         41,         41,        1,      954, 0xac12c9c5, S=1,     1024, 0xcfc8799f
 0,         42,         42,        1,      273, 0x138c7831, S=1,     1024, 0xcfc8799f
 0,         43,         43,        1,      930, 0xf1c3ae3f, S=1,     1024, 0xcfc8799f
-0,         44,         44,        1,      271, 0x6d338044, S=1,     1024, 0xcfc8799f
+0,         44,         44,        1,      271, 0x921a80af, S=1,     1024, 0xcfc8799f
 0,         45,         45,        1,      196, 0xa5de5322, S=1,     1024, 0xcfc8799f
 0,         46,         46,        1,     4299, 0x5bac0d86, S=1,     1024, 0xcfc8799f
 0,         47,         47,        1,     4895, 0xc43639a6, S=1,     1024, 0xcfc8799f
@@ -56,7 +56,7 @@
 0,         54,         54,        1,     5179, 0x97aac3a1, S=1,     1024, 0xcfc8799f
 0,         55,         55,        1,     5046, 0x836a80cd, S=1,     1024, 0xcfc8799f
 0,         56,         56,        1,     5140, 0xa725c1e7, S=1,     1024, 0xcfc8799f
-0,         57,         57,        1,     4289, 0x7b3afbc0, S=1,     1024, 0xcfc8799f
+0,         57,         57,        1,     4301, 0x0203f239, S=1,     1024, 0xcfc8799f
 0,         58,         58,        1,     5079, 0xb2e7a2de, S=1,     1024, 0xcfc8799f
 0,         59,         59,        1,     5284, 0xb757dfe1, S=1,     1024, 0xcfc8799f
 0,         60,         60,        1,     5426, 0xf9f11e57, S=1,     1024, 0xcfc8799f