diff options
author | Glenn Kasten <gkasten@android.com> | 2012-10-17 15:09:23 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-17 15:09:23 -0700 |
commit | 85df568336162cc68311f9053fd00d0f771e233f (patch) | |
tree | bd3f9d9b51b5f845e1844b5f83c5c21f6b2d586c | |
parent | 5ac2d7316cd4975f05b69f90c0ce6a961e4a3541 (diff) | |
parent | e89e9c78fd2ca3d1887ac0e2cd64a9d8265680c1 (diff) | |
download | frameworks_av-85df568336162cc68311f9053fd00d0f771e233f.zip frameworks_av-85df568336162cc68311f9053fd00d0f771e233f.tar.gz frameworks_av-85df568336162cc68311f9053fd00d0f771e233f.tar.bz2 |
am e89e9c78: am 108e1961: Merge "Tweak the SINC resampler parameters and double the performance. It\'s using about 10% CPU in the worse case now."
* commit 'e89e9c78fd2ca3d1887ac0e2cd64a9d8265680c1':
Tweak the SINC resampler parameters and double the performance. It's using about 10% CPU in the worse case now.
-rw-r--r-- | tools/resampler_tools/fir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/resampler_tools/fir.cpp b/tools/resampler_tools/fir.cpp index f54c2cf..be33d54 100644 --- a/tools/resampler_tools/fir.cpp +++ b/tools/resampler_tools/fir.cpp @@ -62,10 +62,10 @@ int main(int argc, char** argv) // cut off frequency ratio Fc/Fs // The bigger the stop-band, the less coefficients we'll need. - double Fcr = 22050.0 / 48000.0; + double Fcr = 20000.0 / 48000.0; // nzc is the number of zero-crossing on one half of the filter - int nzc = 16; + int nzc = 8; // alpha parameter of the kaiser window // Larger numbers reduce ripples in the rejection band but increase @@ -80,7 +80,7 @@ int main(int argc, char** argv) // 80 dB 7.865 // 90 dB 8.960 // 100 dB 10.056 - double alpha = 10.056; // -100dB stop-band attenuation + double alpha = 7.865; // -80dB stop-band attenuation // 2^nz is the number coefficients per zero-crossing // (int theory this should be 1<<(nc/2)) |