mirror of
https://github.com/drowe67/codec2
synced 2026-08-14 19:31:34 -04:00
clang-format messed up some #defione macros and re-ordered include files which broke the build. Building OK now and ctests passing
This commit is contained in:
parent
b86e88413d
commit
4c65d3728a
23 changed files with 72 additions and 57 deletions
|
|
@ -12,6 +12,8 @@
|
|||
#define HRA_112_112_DEC_TYPE 0
|
||||
#define HRA_112_112_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t HRA_112_112_H_rows[];
|
||||
extern const uint16_t HRA_112_112_H_cols[];
|
||||
extern const float HRA_112_112_input[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define HRA_56_56_DEC_TYPE 0
|
||||
#define HRA_56_56_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t HRA_56_56_H_rows[];
|
||||
extern const uint16_t HRA_56_56_H_cols[];
|
||||
extern const float HRA_56_56_input[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define HRAa_1536_512_DEC_TYPE 0
|
||||
#define HRAa_1536_512_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t HRAa_1536_512_H_rows[];
|
||||
extern const uint16_t HRAa_1536_512_H_cols[];
|
||||
extern const float HRAa_1536_512_input[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define HRAb_396_504_DEC_TYPE 0
|
||||
#define HRAb_396_504_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t HRAb_396_504_H_rows[];
|
||||
extern const uint16_t HRAb_396_504_H_cols[];
|
||||
extern const float HRAb_396_504_input[];
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@
|
|||
#define H_1024_2048_4f_DEC_TYPE 0
|
||||
#define H_1024_2048_4f_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_1024_2048_4f_H_rows[];
|
||||
extern const uint16_t H_1024_2048_4f_H_cols[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define H_128_256_5_DEC_TYPE 0
|
||||
#define H_128_256_5_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_128_256_5_H_rows[];
|
||||
extern const uint16_t H_128_256_5_H_cols[];
|
||||
extern const float H_128_256_5_input[];
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@
|
|||
#define H_16200_9720_DEC_TYPE 0
|
||||
#define H_16200_9720_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_16200_9720_H_rows[];
|
||||
extern const uint16_t H_16200_9720_H_cols[];
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@
|
|||
#define H_212_158_DEC_TYPE 0
|
||||
#define H_212_158_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_212_158_H_rows[];
|
||||
extern const uint16_t H_212_158_H_cols[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define H_256_512_4_DEC_TYPE 0
|
||||
#define H_256_512_4_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_256_512_4_H_rows[];
|
||||
extern const uint16_t H_256_512_4_H_cols[];
|
||||
extern const float H_256_512_4_input[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define H_256_768_22_DEC_TYPE 0
|
||||
#define H_256_768_22_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_256_768_22_H_rows[];
|
||||
extern const uint16_t H_256_768_22_H_cols[];
|
||||
extern const float H_256_768_22_input[];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#define H_4096_8192_3d_DEC_TYPE 0
|
||||
#define H_4096_8192_3d_MAX_ITER 100
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint16_t H_4096_8192_3d_H_rows[];
|
||||
extern const uint16_t H_4096_8192_3d_H_cols[];
|
||||
extern const float H_4096_8192_3d_input[];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
/* Generated by write_pilot_file() Octave function */
|
||||
|
||||
#define NSYMROW 4 /* number of data symbols on each row (i.e. each carrier) */
|
||||
#define NS 4 /* number of data symbols between pilots */
|
||||
#define NPILOTSFRAME \
|
||||
2 /* number of pilot symbols on each row */
|
||||
#define PILOTS_NC \
|
||||
7 /* number of carriers */
|
||||
#define NSYMROW 4 /* number of data symbols on each row (i.e. each carrier) */
|
||||
#define NS 4 /* number of data symbols between pilots */
|
||||
#define NPILOTSFRAME 2 /* number of pilot symbols on each row */
|
||||
#define PILOTS_NC 7 /* number of carriers */
|
||||
|
||||
#define NSYMROWPILOT 6 /* length of row after pilots inserted */
|
||||
|
||||
#define NSYMROWPILOT \
|
||||
6 /* length of row after pilots inserted */
|
||||
|
|
|
|||
|
|
@ -42,59 +42,39 @@
|
|||
#ifndef PI
|
||||
#define PI 3.141592654
|
||||
#endif
|
||||
#define FS \
|
||||
8000 /* sample rate in Hz */
|
||||
#define FS_VOICE_8K \
|
||||
8000 /* speech sample rate, 8000 Hz */
|
||||
#define FS_VOICE_16K \
|
||||
16000 /* speech sample rate, 16000 Hz */
|
||||
#define T \
|
||||
(1.0 / FS) /* sample period in seconds */
|
||||
#define RS \
|
||||
50 /* symbol rate in Hz */
|
||||
#define NC \
|
||||
20 /* max number of data carriers (plus one pilot in the centre) */
|
||||
#define NB \
|
||||
2 /* Bits/symbol for QPSK modulation */
|
||||
#define RB \
|
||||
(NC * RS * NB) /* bit rate */
|
||||
#define M_FAC \
|
||||
(FS / RS) /* oversampling factor */
|
||||
#define NSYM \
|
||||
6 /* number of symbols to filter over */
|
||||
#define NFILTER \
|
||||
(NSYM * M_FAC) /* size of tx/rx filters at sample rate M */
|
||||
#define FS 8000 /* sample rate in Hz */
|
||||
#define FS_VOICE_8K 8000 /* speech sample rate, 8000 Hz */
|
||||
#define FS_VOICE_16K 16000 /* speech sample rate, 16000 Hz */
|
||||
#define T (1.0 / FS) /* sample period in seconds */
|
||||
#define RS 50 /* symbol rate in Hz */
|
||||
#define NC 20 /* max number of data carriers (plus one pilot in the centre) */
|
||||
#define NB 2 /* Bits/symbol for QPSK modulation */
|
||||
#define RB (NC * RS * NB) /* bit rate */
|
||||
#define M_FAC (FS / RS) /* oversampling factor */
|
||||
#define NSYM 6 /* number of symbols to filter over */
|
||||
#define NFILTER (NSYM * M_FAC) /* size of tx/rx filters at sample rate M */
|
||||
|
||||
#define FSEP \
|
||||
75 /* Default separation between carriers (Hz) */
|
||||
#define FSEP 75 /* Default separation between carriers (Hz) */
|
||||
|
||||
#define NT \
|
||||
5 /* number of symbols we estimate timing over */
|
||||
#define P \
|
||||
4 /* oversample factor used for initial rx symbol filtering output */
|
||||
#define Q \
|
||||
(M_FAC / \
|
||||
4) /* oversample factor used for initial rx symbol filtering input */
|
||||
#define NRXDEC \
|
||||
31 /* number of taps in the rx decimation filter */
|
||||
#define NT 5 /* number of symbols we estimate timing over */
|
||||
#define P 4 /* oversampling for initial rx symbol filtering output */
|
||||
#define Q (M_FAC / 4) /* oversampling for initial rx symbol filtering input */
|
||||
#define NRXDEC 31 /* number of taps in the rx decimation filter */
|
||||
|
||||
#define NPILOT_LUT \
|
||||
(4 * M_FAC) /* number of pilot look up table samples */
|
||||
#define NPILOTCOEFF \
|
||||
30 /* number of FIR filter coeffs in LP filter */
|
||||
#define NPILOTBASEBAND \
|
||||
(NPILOTCOEFF + M_FAC + \
|
||||
M_FAC / P) /* number of pilot baseband samples reqd for pilot LPF */
|
||||
#define NPILOTLPF \
|
||||
(4 * M_FAC) /* number of samples we DFT pilot over, pilot est window */
|
||||
#define NPILOT_LUT (4 * M_FAC) /* number of pilot look up table samples */
|
||||
#define NPILOTCOEFF 30 /* number of FIR filter coeffs in LP filter */
|
||||
/* number of pilot baseband samples reqd for pilot LPF */
|
||||
#define NPILOTBASEBAND (NPILOTCOEFF + M_FAC + M_FAC / P)
|
||||
/* number of samples we DFT pilot over, pilot est window */
|
||||
#define NPILOTLPF (4 * M_FAC)
|
||||
#define MPILOTFFT 256
|
||||
|
||||
#define NSYNC_MEM 6
|
||||
|
||||
#define NRX_FDM_MEM \
|
||||
(NFILTER + M_FAC + M_FAC / P) /* size of rx filter memory */
|
||||
#define NRXDECMEM \
|
||||
(NRXDEC + M_FAC + M_FAC / P) /* size of rx decimation filter memory */
|
||||
/* size of rx filter memory */
|
||||
#define NRX_FDM_MEM (NFILTER + M_FAC + M_FAC / P)
|
||||
/* size of rx decimation filter memory */
|
||||
#define NRXDECMEM (NRXDEC + M_FAC + M_FAC / P)
|
||||
|
||||
/* averaging filter coeffs */
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "codec2.h"
|
||||
#include "comp.h"
|
||||
#include "comp_prim.h"
|
||||
#include "debug_alloc.h"
|
||||
#include "fmfsk.h"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#ifndef _FREEDV_VHF_FRAMING_H
|
||||
#define _FREEDV_VHF_FRAMING_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "freedv_data_channel.h"
|
||||
|
||||
/* Standard frame type */
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ octave/fsk_horus.m
|
|||
#define FSK_DEFAULT_NSYM 50 /* See Nsym below */
|
||||
#define FSK_NONE -1 /* unused parameter */
|
||||
|
||||
#undef P /* avoid clash with #define P in fdmdv_internal.h */
|
||||
|
||||
struct FSK {
|
||||
/* Static parameters set up by fsk_init */
|
||||
int Ndft; /* freq offset est fft */
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#ifndef __INTERP__
|
||||
#define __INTERP__
|
||||
|
||||
#include "defines.h"
|
||||
#include "kiss_fft.h"
|
||||
|
||||
void interpolate(MODEL *interp, MODEL *prev, MODEL *next);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
#define LPCNET_FREQ_MAX_BANDS 18
|
||||
|
||||
#include "comp.h"
|
||||
|
||||
int lpcnet_compute_band_energy(float *bandE, float *bandCentrekHz, COMP *Sw,
|
||||
float Fs, int Nfft);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#define __NLP__
|
||||
|
||||
#include "comp.h"
|
||||
#include "defines.h"
|
||||
|
||||
void *nlp_create(C2CONST *c2const);
|
||||
void nlp_destroy(void *nlp_state);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#ifndef __OCTAVE__
|
||||
#define __OCTAVE__
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "comp.h"
|
||||
|
||||
void octave_save_int(FILE *f, char name[], int data[], int rows, int cols);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <complex.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "codec2_ofdm.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* Generated by write_pilot_file() Octave function */
|
||||
|
||||
float pilots_coh[][PILOTS_NC] = {
|
||||
{1.000000, -1.000000, 1.000000, -1.000000, 1.000000, -1.000000, -1.000000},
|
||||
{-1.000000, 1.000000, 1.000000, -1.000000, 1.000000, 1.000000, 1.000000}};
|
||||
float pilots_coh[][PILOTS_NC]={
|
||||
{ 1.000000, -1.000000, 1.000000, -1.000000, 1.000000, -1.000000, -1.000000},
|
||||
{ -1.000000, 1.000000, 1.000000, -1.000000, 1.000000, 1.000000, 1.000000}
|
||||
};
|
||||
|
|
@ -28,6 +28,8 @@
|
|||
#ifndef __POSTFILTER__
|
||||
#define __POSTFILTER__
|
||||
|
||||
#include "defines.h"
|
||||
|
||||
void postfilter(MODEL *model, float *bg_est);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue