Fixes stack-buffer-overflow errors running under asan.
Unified · Split
| @@ -549,21 +549,21 @@ static void check_yuv2packed1(void) · 548 unmodified lines | |||
| 549 | const int16_t *chrv[2]; | 549 | const int16_t *chrv[2]; |
| 550 | const int16_t *alpha; | 550 | const int16_t *alpha; |
| 551 | 551 | ||
| 552 | LOCAL_ALIGNED_8(int32_t, src_y, [INPUT_SIZE]); | 552 | LOCAL_ALIGNED_8(int32_t, src_y, [2 * INPUT_SIZE]); |
| 553 | LOCAL_ALIGNED_8(int32_t, src_u, [INPUT_SIZE]); | 553 | LOCAL_ALIGNED_8(int32_t, src_u, [2 * INPUT_SIZE]); |
| 554 | LOCAL_ALIGNED_8(int32_t, src_v, [INPUT_SIZE]); | 554 | LOCAL_ALIGNED_8(int32_t, src_v, [2 * INPUT_SIZE]); |
| 555 | LOCAL_ALIGNED_8(int32_t, src_a, [INPUT_SIZE]); | 555 | LOCAL_ALIGNED_8(int32_t, src_a, [2 * INPUT_SIZE]); |
| 556 | 556 | ||
| 557 | LOCAL_ALIGNED_8(uint8_t, dst0, [INPUT_SIZE * sizeof(int32_t[4])]); | 557 | LOCAL_ALIGNED_8(uint8_t, dst0, [INPUT_SIZE * sizeof(int32_t[4])]); |
| 558 | LOCAL_ALIGNED_8(uint8_t, dst1, [INPUT_SIZE * sizeof(int32_t[4])]); | 558 | LOCAL_ALIGNED_8(uint8_t, dst1, [INPUT_SIZE * sizeof(int32_t[4])]); |
| 559 | 559 | ||
| 560 | randomize_buffers((uint8_t*)src_y, INPUT_SIZE * sizeof(int32_t)); | 560 | randomize_buffers((uint8_t*)src_y, 2 * INPUT_SIZE * sizeof(int32_t)); |
| 561 | randomize_buffers((uint8_t*)src_u, INPUT_SIZE * sizeof(int32_t)); | 561 | randomize_buffers((uint8_t*)src_u, 2 * INPUT_SIZE * sizeof(int32_t)); |
| 562 | randomize_buffers((uint8_t*)src_v, INPUT_SIZE * sizeof(int32_t)); | 562 | randomize_buffers((uint8_t*)src_v, 2 * INPUT_SIZE * sizeof(int32_t)); |
| 563 | randomize_buffers((uint8_t*)src_a, INPUT_SIZE * sizeof(int32_t)); | 563 | randomize_buffers((uint8_t*)src_a, 2 * INPUT_SIZE * sizeof(int32_t)); |
| 564 | 564 | ||
| 565 | /* Limit to 14 bit input range */ | 565 | /* Limit to 14 bit input range */ |
| 566 | for (int i = 0; i < INPUT_SIZE; i++) { | 566 | for (int i = 0; i < 2 * INPUT_SIZE; i++) { |
| 567 | src_y[i] &= 0x3FFF3FFF; | 567 | src_y[i] &= 0x3FFF3FFF; |
| 568 | src_a[i] &= 0x3FFF3FFF; | 568 | src_a[i] &= 0x3FFF3FFF; |
| 569 | src_u[i] &= 0x3FFF3FFF; | 569 | src_u[i] &= 0x3FFF3FFF; |