summaryrefslogtreecommitdiff
path: root/chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c')
-rw-r--r--chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c b/chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c
index 883c5cbb7b9..0986ac2a58c 100644
--- a/chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c
+++ b/chromium/third_party/dav1d/libdav1d/src/filmgrain_tmpl.c
@@ -278,7 +278,7 @@ static void fgy_32x32xn_c(pixel *const dst_row, const pixel *const src_row,
static NOINLINE void
fguv_32x32xn_c(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,
@@ -311,8 +311,8 @@ fguv_32x32xn_c(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) {
- const int bw = imin(BLOCK_SIZE >> sx, pw - bx);
+ for (unsigned bx = 0; bx < pw; bx += BLOCK_SIZE >> sx) {
+ const int bw = imin(BLOCK_SIZE >> sx, (int)(pw - bx));
if (data->overlap_flag && bx) {
// shift previous offsets left
for (int i = 0; i < rows; i++)
@@ -412,6 +412,14 @@ fguv_ss_fn(420, 1, 1);
fguv_ss_fn(422, 1, 0);
fguv_ss_fn(444, 0, 0);
+#if HAVE_ASM
+#if ARCH_AARCH64 || ARCH_ARM
+#include "src/arm/filmgrain.h"
+#elif ARCH_X86
+#include "src/x86/filmgrain.h"
+#endif
+#endif
+
COLD void bitfn(dav1d_film_grain_dsp_init)(Dav1dFilmGrainDSPContext *const c) {
c->generate_grain_y = generate_grain_y_c;
c->generate_grain_uv[DAV1D_PIXEL_LAYOUT_I420 - 1] = generate_grain_uv_420_c;
@@ -425,9 +433,9 @@ COLD void bitfn(dav1d_film_grain_dsp_init)(Dav1dFilmGrainDSPContext *const c) {
#if HAVE_ASM
#if ARCH_AARCH64 || ARCH_ARM
- bitfn(dav1d_film_grain_dsp_init_arm)(c);
+ film_grain_dsp_init_arm(c);
#elif ARCH_X86
- bitfn(dav1d_film_grain_dsp_init_x86)(c);
+ film_grain_dsp_init_x86(c);
#endif
#endif
}