Unified · Split
| @@ -58,6 +58,7 @@ · 57 unmodified lines | ||
| 58 | 58 | #include <stdlib.h> |
| 59 | 59 | #include <string.h> |
| 60 | 60 | #include "checkasm.h" |
| 61 | +#include "libavutil/avassert.h" | |
| 61 | 62 | #include "libavutil/common.h" |
| 62 | 63 | #include "libavutil/cpu.h" |
| 63 | 64 | #include "libavutil/intfloat.h" |
| @@ -1189,10 +1190,12 @@ int checkasm_check_##type(const char *file, int line, \ · 1125 unmodified lines | ||
| 1189 | 1190 | int align_w, int align_h, \ |
| 1190 | 1191 | int padding) \ |
| 1191 | 1192 | { \ |
| 1192 | − int aligned_w = (w + align_w - 1) & ~(align_w - 1); \ | |
| 1193 | − int aligned_h = (h + align_h - 1) & ~(align_h - 1); \ | |
| 1193 | + int64_t aligned_w = (w - 1LL + align_w) & ~(align_w - 1); \ | |
| 1194 | + int64_t aligned_h = (h - 1LL + align_h) & ~(align_h - 1); \ | |
| 1194 | 1195 | int err = 0; \ |
| 1195 | 1196 | int y = 0; \ |
| 1197 | + av_assert0(aligned_w == (int32_t)aligned_w);\ | |
| 1198 | + av_assert0(aligned_h == (int32_t)aligned_h);\ | |
| 1196 | 1199 | stride1 /= sizeof(*buf1); \ |
| 1197 | 1200 | stride2 /= sizeof(*buf2); \ |
| 1198 | 1201 | for (y = 0; y < h; y++) \ |