Commit 61ad2b42 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'd961a79e'

* commit 'd961a79e':
  sbrdsp: move #if to disable all educational code
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ae9b468b d961a79e
...@@ -110,6 +110,11 @@ static void sbr_qmf_deint_bfly_c(float *v, const float *src0, const float *src1) ...@@ -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], static av_always_inline void autocorrelate(const float x[40][2],
float phi[3][2][2], int lag) float phi[3][2][2], int lag)
{ {
...@@ -138,14 +143,13 @@ static av_always_inline void autocorrelate(const float x[40][2], ...@@ -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]) 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, 0);
autocorrelate(x, phi, 1); autocorrelate(x, phi, 1);
autocorrelate(x, phi, 2); autocorrelate(x, phi, 2);
}
#else #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 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 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; float real_sum1 = 0.0f, imag_sum1 = 0.0f, real_sum0 = 0.0f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment