Skip to content

Commit e71c335

Browse files
committed
Added fir_decimate_cc to test200.
1 parent 4380bec commit e71c335

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: test200.c

+13
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141

4242
#define T_BUFSIZE (1024*1024/4)
4343
#define T_N (200)
44+
#define T_TAPS (1023)
45+
#define T_DECFACT (200)
4446

4547
int main()
4648
{
@@ -58,10 +60,21 @@ int main()
5860
qof(buf_c,i)=buf_u8[2*i+1]/128.0;
5961
}
6062

63+
64+
float* taps_f = (float*)malloc(sizeof(float)*T_TAPS);
65+
firdes_lowpass_f(taps_f, T_TAPS, 1.0f/T_DECFACT, WINDOW_DEFAULT);
66+
6167
struct timespec start_time, end_time;
6268

6369
fprintf(stderr,"Starting tests of processing %d samples...\n", T_BUFSIZE*T_N);
6470

71+
//fir_decimate_cc
72+
clock_gettime(CLOCK_MONOTONIC_RAW, &start_time);
73+
for(int i=0;i<T_N;i++) fir_decimate_cc(buf_c, outbuf_c, T_BUFSIZE, 10, taps_f, T_TAPS);
74+
clock_gettime(CLOCK_MONOTONIC_RAW, &end_time);
75+
fprintf(stderr,"fir_decimate_cc done in %g seconds.\n",TIME_TAKEN(start_time,end_time));
76+
77+
6578
//shift_math_cc
6679
float starting_phase = 0;
6780

0 commit comments

Comments
 (0)