summaryrefslogtreecommitdiffstats
path: root/tools/resampler_tools/fir.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-10-30 14:54:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-30 14:54:32 -0700
commit670d4b7520bca8c6b3c59db2640698358d83aca6 (patch)
treee09a330232bad507f8f58e20006dc5c20f294248 /tools/resampler_tools/fir.cpp
parent0eac0714e9fbd6e43b1fd13a38131800b2a81377 (diff)
parent1f09b4ada212d259b531228db67ca160d280275c (diff)
downloadframeworks_av-670d4b7520bca8c6b3c59db2640698358d83aca6.zip
frameworks_av-670d4b7520bca8c6b3c59db2640698358d83aca6.tar.gz
frameworks_av-670d4b7520bca8c6b3c59db2640698358d83aca6.tar.bz2
Merge changes Ide218785,I86d0bb82
* changes: fix SINC resampler on non ARM architectures fix another issue with generating FIR coefficients
Diffstat (limited to 'tools/resampler_tools/fir.cpp')
-rw-r--r--tools/resampler_tools/fir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/resampler_tools/fir.cpp b/tools/resampler_tools/fir.cpp
index acd9911..ea3ef50 100644
--- a/tools/resampler_tools/fir.cpp
+++ b/tools/resampler_tools/fir.cpp
@@ -222,7 +222,7 @@ int main(int argc, char** argv)
if (!polyphase) {
for (int i=0 ; i<N ; i++) {
double x = (2.0 * M_PI * i * Fcr) / (1 << nz);
- double y = kaiser(i+N, 2*N, beta) * sinc(x);
+ double y = kaiser(i+N, 2*N, beta) * sinc(x) * 2.0 * Fcr;
y *= atten;
if (!debug) {
@@ -247,7 +247,7 @@ int main(int argc, char** argv)
// generate a FIR per phase
for (int i=-nzc ; i<nzc ; i++) {
double x = 2.0 * M_PI * Fcr * (i + p);
- double y = kaiser(i+N, 2*N, beta) * sinc(x);
+ double y = kaiser(i+N, 2*N, beta) * sinc(x) * 2.0 * Fcr;;
y *= atten;
if (!format) {
int64_t yi = floor(y * ((1ULL<<(nc-1))) + 0.5);