11 #ifndef INCLUDED_FFT_FFT_SHIFT_H
12 #define INCLUDED_FFT_FFT_SHIFT_H
29 : d_fftlen(fft_length),
30 d_lenpos(fft_length / 2 + (fft_length % 2)),
31 d_lenneg(fft_length / 2),
42 void shift(T* data,
size_t fft_len)
45 std::copy_n(data, d_lenpos, d_buf.begin());
46 std::copy_n(data + d_lenpos, d_lenneg, data);
47 std::copy_n(d_buf.begin(), d_lenpos, data + d_lenneg);
54 if (d_fftlen == fft_length)
56 d_fftlen = fft_length;
57 d_lenpos = d_fftlen / 2 + (d_fftlen % 2);
58 d_lenneg = d_fftlen / 2;
59 assert(d_lenpos + d_lenneg == d_fftlen);
60 d_buf.resize(d_lenpos);
reorder FFT results which are ordered from 0 to 1 in normalized frequency to -0.5 to 0....
Definition: fft_shift.h:26
fft_shift(size_t fft_length)
Definition: fft_shift.h:28
void resize(size_t fft_length)
Definition: fft_shift.h:52
void shift(std::vector< T > &v)
Definition: fft_shift.h:38
void shift(T *data, size_t fft_len)
Definition: fft_shift.h:42
GNU Radio logging wrapper.
Definition: basic_block.h:29
Definition: cc_common.h:35