diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-18 19:58:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-18 19:59:00 +0100 |
commit | 61ad2b42a1e890f7b2de6517d735819bf3309705 (patch) | |
tree | f9c0d57bd12cd89a83a9e1f4e29207b09b82de62 | |
parent | ae9b468b08bd561ba13292933a65c000b94c3a3b (diff) | |
parent | d961a79eb07a8911540a0bd356d68ae0cf93c6a1 (diff) | |
download | ffmpeg-61ad2b42a1e890f7b2de6517d735819bf3309705.tar.gz |
Merge commit 'd961a79eb07a8911540a0bd356d68ae0cf93c6a1'
* commit 'd961a79eb07a8911540a0bd356d68ae0cf93c6a1':
sbrdsp: move #if to disable all educational code
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/sbrdsp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/sbrdsp.c b/libavcodec/sbrdsp.c index b4d5824e92..e4f053b107 100644 --- a/libavcodec/sbrdsp.c +++ b/libavcodec/sbrdsp.c @@ -110,6 +110,11 @@ static void sbr_qmf_deint_bfly_c(float *v, const float *src0, const float *src1) } } + +#if 0 + /* This code is slower because it multiplies memory accesses. + * It is left for educational purposes and because it may offer + * a better reference for writing arch-specific DSP functions. */ static av_always_inline void autocorrelate(const float x[40][2], float phi[3][2][2], int lag) { @@ -138,14 +143,13 @@ static av_always_inline void autocorrelate(const float x[40][2], static void sbr_autocorrelate_c(const float x[40][2], float phi[3][2][2]) { -#if 0 - /* This code is slower because it multiplies memory accesses. - * It is left for educational purposes and because it may offer - * a better reference for writing arch-specific DSP functions. */ autocorrelate(x, phi, 0); autocorrelate(x, phi, 1); autocorrelate(x, phi, 2); +} #else +static void sbr_autocorrelate_c(const float x[40][2], float phi[3][2][2]) +{ float real_sum2 = x[0][0] * x[2][0] + x[0][1] * x[2][1]; float imag_sum2 = x[0][0] * x[2][1] - x[0][1] * x[2][0]; float real_sum1 = 0.0f, imag_sum1 = 0.0f, real_sum0 = 0.0f; |