##// END OF EJS Templates
version 1.6 suite a
chust -
r14:fc753d9d5cc7 TCH
parent child
Show More
@@ -0,0 +1,20
1 TEMPLATE = app
2 CONFIG += console
3 CONFIG -= app_bundle
4 CONFIG -= qt
5
6 DEFINES += DEBUG_TCH
7 #DEFINES += MSB_FIRST_TCH # SPARC convention
8 DEFINES += LSB_FIRST_TCH # PC convention
9
10 SOURCES += main.c \
11 basic_parameters.c \
12 file_utilities.c
13
14 HEADERS += \
15 basic_parameters.h \
16 basic_parameters_params.h \
17 basic_parameters_utilities.h \
18 file_utilities.h
19
20
@@ -9,9 +9,11
9
9
10 #include <stdint.h>
10 #include <stdint.h>
11
11
12 #include "basic_parameters_utilities.h"
12 #include "basic_parameters_params.h"
13
13
14 void init_k_coefficients_f0( void )
14 void init_k_coefficients( float *k_coefficients_f0, \
15 float *k_coefficients_f1, \
16 float *k_coefficients_f2 )
15 {
17 {
16 uint16_t i; // 16 bits unsigned
18 uint16_t i; // 16 bits unsigned
17
19
@@ -19,7 +19,7
19 static inline void BP1_set(float * compressed_spec_mat, float * k_coeff_intercalib, unsigned char nb_bins_compressed_spec_mat, unsigned char * lfr_bp1);
19 static inline void BP1_set(float * compressed_spec_mat, float * k_coeff_intercalib, unsigned char nb_bins_compressed_spec_mat, unsigned char * lfr_bp1);
20 static inline void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * lfr_bp2);
20 static inline void BP2_set(float * compressed_spec_mat, unsigned char nb_bins_compressed_spec_mat, unsigned char * lfr_bp2);
21
21
22 void init_k_coefficients_f0( void );
22 void init_k_coefficients( float *k_coefficients_f0, float *k_coefficients_f1, float *k_coefficients_f2 );
23
23
24 //***********************************
24 //***********************************
25 // STATIC INLINE FUNCTION DEFINITIONS
25 // STATIC INLINE FUNCTION DEFINITIONS
@@ -7,6 +7,8
7
7
8 #define NB_VALUES_PER_SPECTRAL_MATRIX 25
8 #define NB_VALUES_PER_SPECTRAL_MATRIX 25
9 #define NB_BINS_COMPRESSED_MATRIX_f0 1
9 #define NB_BINS_COMPRESSED_MATRIX_f0 1
10 #define NB_BINS_COMPRESSED_MATRIX_f1 13
11 #define NB_BINS_COMPRESSED_MATRIX_f2 12
10
12
11 #define NB_BYTES_BP1 9
13 #define NB_BYTES_BP1 9
12 #define NB_BYTES_BP2 30
14 #define NB_BYTES_BP2 30
@@ -10,6 +10,8
10
10
11 float compressed_spectral_matrix_f0[NB_BINS_COMPRESSED_MATRIX_f0 * NB_VALUES_PER_SPECTRAL_MATRIX];
11 float compressed_spectral_matrix_f0[NB_BINS_COMPRESSED_MATRIX_f0 * NB_VALUES_PER_SPECTRAL_MATRIX];
12 float k_coefficients_f0[NB_BINS_COMPRESSED_MATRIX_f0 * NB_K_COEFF_PER_BIN];
12 float k_coefficients_f0[NB_BINS_COMPRESSED_MATRIX_f0 * NB_K_COEFF_PER_BIN];
13 float k_coefficients_f1[NB_BINS_COMPRESSED_MATRIX_f1 * NB_K_COEFF_PER_BIN];
14 float k_coefficients_f2[NB_BINS_COMPRESSED_MATRIX_f2 * NB_K_COEFF_PER_BIN];
13
15
14 unsigned char LFR_BP1_f0[NB_BINS_COMPRESSED_MATRIX_f0*NB_BYTES_BP1];
16 unsigned char LFR_BP1_f0[NB_BINS_COMPRESSED_MATRIX_f0*NB_BYTES_BP1];
15 unsigned char LFR_BP2_f0[NB_BINS_COMPRESSED_MATRIX_f0*NB_BYTES_BP2];
17 unsigned char LFR_BP2_f0[NB_BINS_COMPRESSED_MATRIX_f0*NB_BYTES_BP2];
@@ -32,7 +32,7 int main(void)
32 filename="sm_test2.dat";
32 filename="sm_test2.dat";
33 lecture_file_sm(filename);
33 lecture_file_sm(filename);
34
34
35 init_k_coefficients_f0();
35 init_k_coefficients(k_coefficients_f0, k_coefficients_f1, k_coefficients_f2);
36
36
37 printf("\n");
37 printf("\n");
38
38
General Comments 0
You need to be logged in to leave comments. Login now