summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerSinc.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-10-26 13:48:42 -0700
committerMathias Agopian <mathias@google.com>2012-10-26 14:58:42 -0700
commit443e69625d598ea578e2c838960778ce498fd773 (patch)
tree4d021ec94a7766aaed15c1d93f3fa7b7d9e89ba1 /services/audioflinger/AudioResamplerSinc.h
parentb6cf07ba69018fd4633e1b9f99646f8482c6d76d (diff)
downloadframeworks_av-443e69625d598ea578e2c838960778ce498fd773.zip
frameworks_av-443e69625d598ea578e2c838960778ce498fd773.tar.gz
frameworks_av-443e69625d598ea578e2c838960778ce498fd773.tar.bz2
improve SINC resampler coefficients
- we increase the interpolation precision from 4 to 7 bits this doesn't increase CPU power required, it only increases the size of the filter table but significantly reduces the noise introduced by the quantization of the impulse response. - the parameters of the filter are set such that aliasing is rejected at 80 dB below 20 KHz. Because we don't use a lot of coefficient (to save compute power), there are quite a bit of attenuation in the pass-band: starting at 9KHz for the down-sampler (48 to 44.1), and starting at 13 KHz for the up-sampler (44.1 to 48) -- the transition band is about 15 KHz. Change-Id: I855548d2aab8a0fb0d2a2da3a364b6842d7d3838
Diffstat (limited to 'services/audioflinger/AudioResamplerSinc.h')
-rw-r--r--services/audioflinger/AudioResamplerSinc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/AudioResamplerSinc.h b/services/audioflinger/AudioResamplerSinc.h
index 25fc025..48bc747 100644
--- a/services/audioflinger/AudioResamplerSinc.h
+++ b/services/audioflinger/AudioResamplerSinc.h
@@ -71,7 +71,7 @@ private:
// ----------------------------------------------------------------------------
static const int32_t RESAMPLE_FIR_NUM_COEF = 8;
- static const int32_t RESAMPLE_FIR_LERP_INT_BITS = 4;
+ static const int32_t RESAMPLE_FIR_LERP_INT_BITS = 7;
struct Constants {
// we have 16 coefs samples per zero-crossing