diff options
author | Martin Storsjö <martin@martin.st> | 2016-12-14 23:38:02 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2017-01-24 22:36:02 +0200 |
commit | 48ad3fe1beee5c3eb453093defde503f354c8f1f (patch) | |
tree | 5b5afcbc96cfaa3660a7e96b89cb4067b5552c47 /libavcodec | |
parent | 1e5d87eec33714744c4b6d3de93f45172f7ce889 (diff) | |
download | ffmpeg-48ad3fe1beee5c3eb453093defde503f354c8f1f.tar.gz |
aarch64: vp9dsp: Restructure the bpp checks
This work is sponsored by, and copyright, Google.
This is more in line with how it will be extended for more bitdepths.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aarch64/vp9dsp_init_aarch64.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/libavcodec/aarch64/vp9dsp_init_aarch64.c b/libavcodec/aarch64/vp9dsp_init_aarch64.c index 0bc200e693..7b50540876 100644 --- a/libavcodec/aarch64/vp9dsp_init_aarch64.c +++ b/libavcodec/aarch64/vp9dsp_init_aarch64.c @@ -96,13 +96,10 @@ define_8tap_2d_funcs(16) define_8tap_2d_funcs(8) define_8tap_2d_funcs(4) -static av_cold void vp9dsp_mc_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_mc_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - #define init_fpel(idx1, idx2, sz, type, suffix) \ dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = \ dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = \ @@ -173,13 +170,10 @@ define_itxfm(idct, idct, 32); define_itxfm(iwht, iwht, 4); -static av_cold void vp9dsp_itxfm_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_itxfm_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - if (have_neon(cpu_flags)) { #define init_itxfm(tx, sz) \ dsp->itxfm_add[tx][DCT_DCT] = ff_vp9_idct_idct_##sz##_add_neon; \ @@ -219,13 +213,10 @@ define_loop_filters(48, 16); define_loop_filters(84, 16); define_loop_filters(88, 16); -static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp, int bpp) +static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp) { int cpu_flags = av_get_cpu_flags(); - if (bpp != 8) - return; - if (have_neon(cpu_flags)) { dsp->loop_filter_8[0][1] = ff_vp9_loop_filter_v_4_8_neon; dsp->loop_filter_8[0][0] = ff_vp9_loop_filter_h_4_8_neon; @@ -250,7 +241,10 @@ static av_cold void vp9dsp_loopfilter_init_aarch64(VP9DSPContext *dsp, int bpp) av_cold void ff_vp9dsp_init_aarch64(VP9DSPContext *dsp, int bpp) { - vp9dsp_mc_init_aarch64(dsp, bpp); - vp9dsp_loopfilter_init_aarch64(dsp, bpp); - vp9dsp_itxfm_init_aarch64(dsp, bpp); + if (bpp != 8) + return; + + vp9dsp_mc_init_aarch64(dsp); + vp9dsp_loopfilter_init_aarch64(dsp); + vp9dsp_itxfm_init_aarch64(dsp); } |