From 65682fb8e99ab2f1d2ad6a44ed507e78e757ffa9 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 23 Aug 2007 21:01:28 -0700 Subject: fix a few small typos in the FIR computation Change-Id: I6e56b514fe520f30f7487f85c64ea5d2a7c19b40 Signed-off-by: Glenn Kasten --- tools/resampler_tools/fir.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/resampler_tools/fir.cpp b/tools/resampler_tools/fir.cpp index 919a97b..0ab2d2b 100644 --- a/tools/resampler_tools/fir.cpp +++ b/tools/resampler_tools/fir.cpp @@ -78,10 +78,9 @@ int main(int argc, char** argv) const int nz = 4; // total number of coefficients - const int N = (1 << 4) * nzc; + const int N = (1 << nz) * nzc; // generate the right half of the filter - printf("const int32_t RESAMPLE_FIR_SIZE = %d;\n", N); printf("const int32_t RESAMPLE_FIR_NUM_COEF = %d;\n", nzc); printf("const int32_t RESAMPLE_FIR_COEF_BITS = %d;\n", nc); @@ -91,19 +90,16 @@ int main(int argc, char** argv) printf("static int16_t resampleFIR[%d] = {", N); for (int i=0 ; i= (1<<(nc-1))) yi = (1<<(nc-1))-1; - //printf("%6d\n", yi); - if ((i % (1 << 4)) == 0) printf("\n "); printf("0x%04x, ", yi & 0xFFFF); } printf("\n};\n"); - return 0; } \ No newline at end of file -- cgit v1.1