1 #ifndef __HTRANSLATEBYFOUR_H
2 #define __HTRANSLATEBYFOUR_H
6 #include "hwriterconsumer.h"
40 static void DoFilter(T* src, T* dest,
size_t blocksize,
bool isQ);
46 HFilter<T>(writer, blocksize, probe),
51 HFilter<T>(consumer, blocksize, probe),
56 HFilter<T>(reader, blocksize, probe),
63 void Filter(T* src, T* dest,
size_t blocksize) {
77 static void Translate(T* src, std::complex<T>* dest,
size_t blocksize) {
81 IChannel =
new T[blocksize];
82 QChannel =
new T[blocksize];
87 for(
int i = 0; i < blocksize; i++ ) {
88 dest[i] = std::complex<T>(IChannel[i], QChannel[i]);
96 static void Translate(T* src, std::complex<double>* dest,
size_t blocksize) {
100 IChannel =
new T[blocksize];
101 QChannel =
new T[blocksize];
106 for(
int i = 0; i < blocksize; i++ ) {
107 dest[i] = std::complex<double>((
double) IChannel[i], (
double) QChannel[i]);