1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * This file is part of FFmpeg. 3cabdff1aSopenharmony_ci * 4cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 5cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 6cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 7cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 8cabdff1aSopenharmony_ci * 9cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 10cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 11cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12cabdff1aSopenharmony_ci * Lesser General Public License for more details. 13cabdff1aSopenharmony_ci * 14cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 15cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 16cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17cabdff1aSopenharmony_ci */ 18cabdff1aSopenharmony_ci 19cabdff1aSopenharmony_ci#include "config.h" 20cabdff1aSopenharmony_ci#include "libavutil/aarch64/cpu.h" 21cabdff1aSopenharmony_ci#include "libavutil/attributes.h" 22cabdff1aSopenharmony_ci#include "libavcodec/sbrdsp.h" 23cabdff1aSopenharmony_ci 24cabdff1aSopenharmony_civoid ff_sbr_sum64x5_neon(float *z); 25cabdff1aSopenharmony_cifloat ff_sbr_sum_square_neon(float (*x)[2], int n); 26cabdff1aSopenharmony_civoid ff_sbr_neg_odd_64_neon(float *x); 27cabdff1aSopenharmony_civoid ff_sbr_qmf_pre_shuffle_neon(float *z); 28cabdff1aSopenharmony_civoid ff_sbr_qmf_post_shuffle_neon(float W[32][2], const float *z); 29cabdff1aSopenharmony_civoid ff_sbr_qmf_deint_neg_neon(float *v, const float *src); 30cabdff1aSopenharmony_civoid ff_sbr_qmf_deint_bfly_neon(float *v, const float *src0, const float *src1); 31cabdff1aSopenharmony_civoid ff_sbr_hf_g_filt_neon(float (*Y)[2], const float (*X_high)[40][2], 32cabdff1aSopenharmony_ci const float *g_filt, int m_max, intptr_t ixh); 33cabdff1aSopenharmony_civoid ff_sbr_hf_gen_neon(float (*X_high)[2], const float (*X_low)[2], 34cabdff1aSopenharmony_ci const float alpha0[2], const float alpha1[2], 35cabdff1aSopenharmony_ci float bw, int start, int end); 36cabdff1aSopenharmony_civoid ff_sbr_autocorrelate_neon(const float x[40][2], float phi[3][2][2]); 37cabdff1aSopenharmony_civoid ff_sbr_hf_apply_noise_0_neon(float Y[64][2], const float *s_m, 38cabdff1aSopenharmony_ci const float *q_filt, int noise, 39cabdff1aSopenharmony_ci int kx, int m_max); 40cabdff1aSopenharmony_civoid ff_sbr_hf_apply_noise_1_neon(float Y[64][2], const float *s_m, 41cabdff1aSopenharmony_ci const float *q_filt, int noise, 42cabdff1aSopenharmony_ci int kx, int m_max); 43cabdff1aSopenharmony_civoid ff_sbr_hf_apply_noise_2_neon(float Y[64][2], const float *s_m, 44cabdff1aSopenharmony_ci const float *q_filt, int noise, 45cabdff1aSopenharmony_ci int kx, int m_max); 46cabdff1aSopenharmony_civoid ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m, 47cabdff1aSopenharmony_ci const float *q_filt, int noise, 48cabdff1aSopenharmony_ci int kx, int m_max); 49cabdff1aSopenharmony_ci 50cabdff1aSopenharmony_ciav_cold void ff_sbrdsp_init_aarch64(SBRDSPContext *s) 51cabdff1aSopenharmony_ci{ 52cabdff1aSopenharmony_ci int cpu_flags = av_get_cpu_flags(); 53cabdff1aSopenharmony_ci 54cabdff1aSopenharmony_ci if (have_neon(cpu_flags)) { 55cabdff1aSopenharmony_ci s->sum64x5 = ff_sbr_sum64x5_neon; 56cabdff1aSopenharmony_ci s->sum_square = ff_sbr_sum_square_neon; 57cabdff1aSopenharmony_ci s->neg_odd_64 = ff_sbr_neg_odd_64_neon; 58cabdff1aSopenharmony_ci s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_neon; 59cabdff1aSopenharmony_ci s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_neon; 60cabdff1aSopenharmony_ci s->qmf_deint_neg = ff_sbr_qmf_deint_neg_neon; 61cabdff1aSopenharmony_ci s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_neon; 62cabdff1aSopenharmony_ci s->hf_g_filt = ff_sbr_hf_g_filt_neon; 63cabdff1aSopenharmony_ci s->hf_gen = ff_sbr_hf_gen_neon; 64cabdff1aSopenharmony_ci s->autocorrelate = ff_sbr_autocorrelate_neon; 65cabdff1aSopenharmony_ci s->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_neon; 66cabdff1aSopenharmony_ci s->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_neon; 67cabdff1aSopenharmony_ci s->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_neon; 68cabdff1aSopenharmony_ci s->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_neon; 69cabdff1aSopenharmony_ci } 70cabdff1aSopenharmony_ci} 71