Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1052,7 +1052,6 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 1051 unmodified lines | ||
| 1052 | 1052 | { |
| 1053 | 1053 | int width, height; |
| 1054 | 1054 | int hdr, zsize, npal, tidx = -1, ret; |
| 1055 | − int i, j; | |
| 1056 | 1055 | const uint8_t *src_end = src + src_size; |
| 1057 | 1056 | uint8_t pal[768], transp[3]; |
| 1058 | 1057 | uLongf dlen = (c->tile_width + 1) * c->tile_height; |
| @@ -1071,11 +1070,10 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 12 unmodified lines | ||
| 1071 | 1070 | hdr = *src++; |
| 1072 | 1071 | sub_type = hdr >> 5; |
| 1073 | 1072 | if (sub_type == 0) { |
| 1074 | − int j; | |
| 1075 | 1073 | memcpy(transp, src, 3); |
| 1076 | 1074 | src += 3; |
| 1077 | − for (j = 0; j < height; j++, dst += c->framebuf_stride) | |
| 1078 | − for (i = 0; i < width; i++) | |
| 1075 | + for (int j = 0; j < height; j++, dst += c->framebuf_stride) | |
| 1076 | + for (int i = 0; i < width; i++) | |
| 1079 | 1077 | memcpy(dst + i * 3, transp, 3); |
| 1080 | 1078 | return 0; |
| 1081 | 1079 | } else if (sub_type == 1) { |
| @@ -1093,7 +1091,7 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 11 unmodified lines | ||
| 1093 | 1091 | memcpy(pal, src, npal * 3); |
| 1094 | 1092 | src += npal * 3; |
| 1095 | 1093 | if (sub_type != 2) { |
| 1096 | − for (i = 0; i < npal; i++) { | |
| 1094 | + for (int i = 0; i < npal; i++) { | |
| 1097 | 1095 | if (!memcmp(pal + i * 3, transp, 3)) { |
| 1098 | 1096 | tidx = i; |
| 1099 | 1097 | break; |
| @@ -1125,8 +1123,8 @@ static int kempf_decode_tile(G2MContext *c, int tile_x, int tile_y, · 25 unmodified lines | ||
| 1125 | 1123 | bstride = FFALIGN(width, 16) >> 3; |
| 1126 | 1124 | // blocks are coded LSB and we need normal bitreader for JPEG data |
| 1127 | 1125 | bits = 0; |
| 1128 | − for (i = 0; i < (FFALIGN(height, 16) >> 4); i++) { | |
| 1129 | − for (j = 0; j < (FFALIGN(width, 16) >> 4); j++) { | |
| 1126 | + for (int i = 0; i < (FFALIGN(height, 16) >> 4); i++) { | |
| 1127 | + for (int j = 0; j < (FFALIGN(width, 16) >> 4); j++) { | |
| 1130 | 1128 | if (!bits) { |
| 1131 | 1129 | if (src >= src_end) |
| 1132 | 1130 | return AVERROR_INVALIDDATA; |