diff options
author | Henrik Gramner <gramner@twoorioles.com> | 2022-09-08 14:30:00 +0300 |
---|---|---|
committer | Henrik Gramner <gramner@twoorioles.com> | 2022-09-08 14:58:48 +0300 |
commit | fab6427e2a37f995beced2bbe15b8f7a2404bec2 (patch) | |
tree | 6e96fb60823db550005511b7c887c6277613cde2 /src/arm | |
parent | 677129c26095f5b67052f740ce54b663b43bdfcf (diff) |
x86: Fix rare crash in chroma film grain asm
The width parameter is used directly as a pointer offset, so ensure
that it has an appropriately sized data type.
This has been done previously for luma, but chroma was overlooked.
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/filmgrain.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arm/filmgrain.h b/src/arm/filmgrain.h index 118ce30..48776ac 100644 --- a/src/arm/filmgrain.h +++ b/src/arm/filmgrain.h @@ -137,7 +137,7 @@ void BF(dav1d_fguv_32x32_##nm, neon)(pixel *const dst, \ static void \ fguv_32x32xn_##nm##_neon(pixel *const dst_row, const pixel *const src_row, \ const ptrdiff_t stride, const Dav1dFilmGrainData *const data, \ - const int pw, const uint8_t scaling[SCALING_SIZE], \ + const size_t pw, const uint8_t scaling[SCALING_SIZE], \ const entry grain_lut[][GRAIN_WIDTH], const int bh, \ const int row_num, const pixel *const luma_row, \ const ptrdiff_t luma_stride, const int uv, const int is_id \ @@ -156,7 +156,7 @@ fguv_32x32xn_##nm##_neon(pixel *const dst_row, const pixel *const src_row, \ int offsets[2 /* col offset */][2 /* row offset */]; \ \ /* process this row in BLOCK_SIZE^2 blocks (subsampled) */ \ - for (int bx = 0; bx < pw; bx += BLOCK_SIZE >> sx) { \ + for (unsigned bx = 0; bx < pw; bx += BLOCK_SIZE >> sx) { \ if (data->overlap_flag && bx) { \ /* shift previous offsets left */ \ for (int i = 0; i < rows; i++) \ |