diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-13 14:55:16 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-13 14:55:16 -0400 |
commit | 1b93bb39731517e6d7bb8a78ea9569995e8a371a (patch) | |
tree | eaecdd246fc6a4aa09573ef504ad769961b6d39b /gr-filter | |
parent | 9e2e896e9d4dbc4627702cde82a48e9ee5136f26 (diff) |
filter wip and probably squash with last.
Removing unecessary d_offset counter from fir_filter.
Diffstat (limited to 'gr-filter')
-rw-r--r-- | gr-filter/include/filter/fir_filter.h | 1 | ||||
-rw-r--r-- | gr-filter/lib/fir_filter.cc | 36 |
2 files changed, 0 insertions, 37 deletions
diff --git a/gr-filter/include/filter/fir_filter.h b/gr-filter/include/filter/fir_filter.h index e6194df7b5..7047ba1a48 100644 --- a/gr-filter/include/filter/fir_filter.h +++ b/gr-filter/include/filter/fir_filter.h @@ -55,7 +55,6 @@ namespace gr { unsigned int d_ntaps; float *d_taps; float **d_aligned_taps; - int d_offset; float *d_output; }; diff --git a/gr-filter/lib/fir_filter.cc b/gr-filter/lib/fir_filter.cc index c6e179246d..30c8325f78 100644 --- a/gr-filter/lib/fir_filter.cc +++ b/gr-filter/lib/fir_filter.cc @@ -35,7 +35,6 @@ namespace gr { { d_taps = NULL; set_taps(taps); - d_offset = 0; // Make sure the output sample is always aligned, too. d_output = fft::malloc_float(1); @@ -103,50 +102,15 @@ namespace gr { return d_ntaps; } - /* float fir_filter_fff::filter(const float input[]) { - volk_32f_x2_dot_prod_32f_a(d_output, input, - d_aligned_taps[d_offset], - (d_ntaps + d_offset - 1) / 4 + 1); - //*d_output = float_dotprod_sse(input, d_aligned_taps[d_offset], - // (d_ntaps + d_offset - 1) / 4 + 1); - return *d_output; - } - - void - fir_filter_fff::filterN(float output[], - const float input[], - unsigned long n) - { - unsigned long ar = ((unsigned long) input); - int off = (ar - (ar & ~15))/4; - - int j = -off; - d_offset = off; - for(unsigned long i = 0; i < n; i++) { - output[i] = filter(&input[j]); - d_offset= (d_offset+1) & 0x03; - j += (d_offset == 0 ? 4 : 0); - } - } - */ - - float - fir_filter_fff::filter(const float input[]) - { - //unsigned long ar = ((unsigned long) input); - //int off = (ar - (ar & ~15))/4; - const float *ar = (float *)((unsigned long) input & ~15); unsigned al = input - ar; volk_32f_x2_dot_prod_32f_a(d_output, ar, d_aligned_taps[al], (d_ntaps + al - 1) / 4 + 1); - //*d_output = float_dotprod_sse(input, d_aligned_taps[d_offset], - // (d_ntaps + d_offset - 1) / 4 + 1); return *d_output; } |