diff options
author | Mathias Agopian <mathias@google.com> | 2007-10-29 23:44:25 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-10-17 11:24:32 -0700 |
commit | 4b61366dedf8536679083004ce0b6ac2b7e52fc2 (patch) | |
tree | 2ac8397dc3f19520bb642610f34ba090b4cb0edd /tools/resampler_tools | |
parent | 2a967b3fff07b8711aef41f839ad7521323bb64d (diff) | |
download | frameworks_av-4b61366dedf8536679083004ce0b6ac2b7e52fc2.zip frameworks_av-4b61366dedf8536679083004ce0b6ac2b7e52fc2.tar.gz frameworks_av-4b61366dedf8536679083004ce0b6ac2b7e52fc2.tar.bz2 |
Tweak the SINC resampler parameters and double the performance. It's using about 10% CPU in the worse case now.
Change-Id: I50ac7e6c6702a427fa36ab6d976c507155057507
Signed-off-by: Glenn Kasten <gkasten@google.com>
Diffstat (limited to 'tools/resampler_tools')
-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)) |