diff options
author | Martin Storsjö <martin@martin.st> | 2020-02-04 22:03:18 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2020-02-11 11:43:43 +0300 |
commit | 96da9cc232b4b238bcd215025d075039a5b0a86f (patch) | |
tree | 5fd75169cc44e0db1bc0b9264347afa82bf85f7f /src | |
parent | 8fb306575cef9c1882cfc693b1c47e68e27fc71a (diff) |
looprestoration: Add a bpc parameter to the init func
This allows using completely different codepaths for 10 and 12 bpc,
or just adding SIMD functions for either of them.
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/looprestoration_init_tmpl.c | 2 | ||||
-rw-r--r-- | src/decode.c | 2 | ||||
-rw-r--r-- | src/looprestoration.h | 4 | ||||
-rw-r--r-- | src/looprestoration_tmpl.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/arm/looprestoration_init_tmpl.c b/src/arm/looprestoration_init_tmpl.c index ec0ea22..d701a61 100644 --- a/src/arm/looprestoration_init_tmpl.c +++ b/src/arm/looprestoration_init_tmpl.c @@ -270,7 +270,7 @@ static void sgr_filter_neon(pixel *const dst, const ptrdiff_t dst_stride, } #endif // BITDEPTH == 8 -COLD void bitfn(dav1d_loop_restoration_dsp_init_arm)(Dav1dLoopRestorationDSPContext *const c) { +COLD void bitfn(dav1d_loop_restoration_dsp_init_arm)(Dav1dLoopRestorationDSPContext *const c, int bpc) { const unsigned flags = dav1d_get_cpu_flags(); if (!(flags & DAV1D_ARM_CPU_FLAG_NEON)) return; diff --git a/src/decode.c b/src/decode.c index fbab656..2833524 100644 --- a/src/decode.c +++ b/src/decode.c @@ -3242,7 +3242,7 @@ int dav1d_submit_frame(Dav1dContext *const c) { dav1d_intra_pred_dsp_init_##bd##bpc(&dsp->ipred); \ dav1d_itx_dsp_init_##bd##bpc(&dsp->itx); \ dav1d_loop_filter_dsp_init_##bd##bpc(&dsp->lf); \ - dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr); \ + dav1d_loop_restoration_dsp_init_##bd##bpc(&dsp->lr, bpc); \ dav1d_mc_dsp_init_##bd##bpc(&dsp->mc); \ dav1d_film_grain_dsp_init_##bd##bpc(&dsp->fg); \ break diff --git a/src/looprestoration.h b/src/looprestoration.h index 2d16df8..539a76b 100644 --- a/src/looprestoration.h +++ b/src/looprestoration.h @@ -72,8 +72,8 @@ typedef struct Dav1dLoopRestorationDSPContext { selfguided_fn selfguided; } Dav1dLoopRestorationDSPContext; -bitfn_decls(void dav1d_loop_restoration_dsp_init, Dav1dLoopRestorationDSPContext *c); -bitfn_decls(void dav1d_loop_restoration_dsp_init_arm, Dav1dLoopRestorationDSPContext *c); +bitfn_decls(void dav1d_loop_restoration_dsp_init, Dav1dLoopRestorationDSPContext *c, int bpc); +bitfn_decls(void dav1d_loop_restoration_dsp_init_arm, Dav1dLoopRestorationDSPContext *c, int bpc); bitfn_decls(void dav1d_loop_restoration_dsp_init_x86, Dav1dLoopRestorationDSPContext *c); bitfn_decls(void dav1d_loop_restoration_dsp_init_ppc, Dav1dLoopRestorationDSPContext *c); diff --git a/src/looprestoration_tmpl.c b/src/looprestoration_tmpl.c index 82694ef..a8a2472 100644 --- a/src/looprestoration_tmpl.c +++ b/src/looprestoration_tmpl.c @@ -573,13 +573,13 @@ static void selfguided_c(pixel *p, const ptrdiff_t p_stride, } } -COLD void bitfn(dav1d_loop_restoration_dsp_init)(Dav1dLoopRestorationDSPContext *const c) { +COLD void bitfn(dav1d_loop_restoration_dsp_init)(Dav1dLoopRestorationDSPContext *const c, int bpc) { c->wiener = wiener_c; c->selfguided = selfguided_c; #if HAVE_ASM #if ARCH_AARCH64 || ARCH_ARM - bitfn(dav1d_loop_restoration_dsp_init_arm)(c); + bitfn(dav1d_loop_restoration_dsp_init_arm)(c, bpc); #elif ARCH_PPC64LE bitfn(dav1d_loop_restoration_dsp_init_ppc)(c); #elif ARCH_X86 |