mirror of
https://github.com/xiph/opus.git
synced 2025-05-16 16:38:30 +00:00
Rename '_FOO' to avoid potentional collisions with reserved identifiers.
C reserves identifiers of the from _[A-Z]+ and we have a number of those in the code. This patch renames the various function arguments, MACROS and preprocessor symbols to avoid the reserved form. It also removes the CHANNELS() macro altogether. This was a minor optimization for TI DSP to force a mono-only build, as were the associated local 'const' versions. Since stereo support is manditory, it wasn't worth keeping. Thanks to John Ridges for raising the issue, and Jean-Marc Valin and Greg Maxwell for reviewing the changes.
This commit is contained in:
parent
e1be1920ba
commit
120800f8fa
26 changed files with 132 additions and 162 deletions
34
celt/bands.c
34
celt/bands.c
|
@ -75,11 +75,10 @@ static int bitexact_log2tan(int isin,int icos)
|
||||||
|
|
||||||
#ifdef FIXED_POINT
|
#ifdef FIXED_POINT
|
||||||
/* Compute the amplitude (sqrt energy) in each of the bands */
|
/* Compute the amplitude (sqrt energy) in each of the bands */
|
||||||
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int _C, int M)
|
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N;
|
int i, c, N;
|
||||||
const opus_int16 *eBands = m->eBands;
|
const opus_int16 *eBands = m->eBands;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
N = M*m->shortMdctSize;
|
N = M*m->shortMdctSize;
|
||||||
c=0; do {
|
c=0; do {
|
||||||
for (i=0;i<end;i++)
|
for (i=0;i<end;i++)
|
||||||
|
@ -113,11 +112,10 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalise each band such that the energy is one. */
|
/* Normalise each band such that the energy is one. */
|
||||||
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int _C, int M)
|
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N;
|
int i, c, N;
|
||||||
const opus_int16 *eBands = m->eBands;
|
const opus_int16 *eBands = m->eBands;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
N = M*m->shortMdctSize;
|
N = M*m->shortMdctSize;
|
||||||
c=0; do {
|
c=0; do {
|
||||||
i=0; do {
|
i=0; do {
|
||||||
|
@ -136,11 +134,10 @@ void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_nor
|
||||||
|
|
||||||
#else /* FIXED_POINT */
|
#else /* FIXED_POINT */
|
||||||
/* Compute the amplitude (sqrt energy) in each of the bands */
|
/* Compute the amplitude (sqrt energy) in each of the bands */
|
||||||
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int _C, int M)
|
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N;
|
int i, c, N;
|
||||||
const opus_int16 *eBands = m->eBands;
|
const opus_int16 *eBands = m->eBands;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
N = M*m->shortMdctSize;
|
N = M*m->shortMdctSize;
|
||||||
c=0; do {
|
c=0; do {
|
||||||
for (i=0;i<end;i++)
|
for (i=0;i<end;i++)
|
||||||
|
@ -157,11 +154,10 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Normalise each band such that the energy is one. */
|
/* Normalise each band such that the energy is one. */
|
||||||
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int _C, int M)
|
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N;
|
int i, c, N;
|
||||||
const opus_int16 *eBands = m->eBands;
|
const opus_int16 *eBands = m->eBands;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
N = M*m->shortMdctSize;
|
N = M*m->shortMdctSize;
|
||||||
c=0; do {
|
c=0; do {
|
||||||
for (i=0;i<end;i++)
|
for (i=0;i<end;i++)
|
||||||
|
@ -177,11 +173,10 @@ void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_nor
|
||||||
#endif /* FIXED_POINT */
|
#endif /* FIXED_POINT */
|
||||||
|
|
||||||
/* De-normalise the energy to produce the synthesis from the unit-energy bands */
|
/* De-normalise the energy to produce the synthesis from the unit-energy bands */
|
||||||
void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bank, int end, int _C, int M)
|
void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bank, int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N;
|
int i, c, N;
|
||||||
const opus_int16 *eBands = m->eBands;
|
const opus_int16 *eBands = m->eBands;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
N = M*m->shortMdctSize;
|
N = M*m->shortMdctSize;
|
||||||
celt_assert2(C<=2, "denormalise_bands() not implemented for >2 channels");
|
celt_assert2(C<=2, "denormalise_bands() not implemented for >2 channels");
|
||||||
c=0; do {
|
c=0; do {
|
||||||
|
@ -206,7 +201,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This prevents energy collapse for transients with multiple short MDCTs */
|
/* This prevents energy collapse for transients with multiple short MDCTs */
|
||||||
void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_masks, int LM, int C, int CC, int size,
|
void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int CC, int size,
|
||||||
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
|
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
|
||||||
opus_val16 *prev2logE, int *pulses, opus_uint32 seed)
|
opus_val16 *prev2logE, int *pulses, opus_uint32 seed)
|
||||||
{
|
{
|
||||||
|
@ -274,7 +269,7 @@ void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_mas
|
||||||
r = MIN16(thresh, r);
|
r = MIN16(thresh, r);
|
||||||
r = r*sqrt_1;
|
r = r*sqrt_1;
|
||||||
#endif
|
#endif
|
||||||
X = _X+c*size+(m->eBands[i]<<LM);
|
X = X_+c*size+(m->eBands[i]<<LM);
|
||||||
for (k=0;k<1<<LM;k++)
|
for (k=0;k<1<<LM;k++)
|
||||||
{
|
{
|
||||||
/* Detect collapse */
|
/* Detect collapse */
|
||||||
|
@ -394,11 +389,10 @@ static void stereo_merge(celt_norm *X, celt_norm *Y, opus_val16 mid, int N)
|
||||||
/* Decide whether we should spread the pulses in the current frame */
|
/* Decide whether we should spread the pulses in the current frame */
|
||||||
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
|
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
|
||||||
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
|
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
|
||||||
int end, int _C, int M)
|
int end, int C, int M)
|
||||||
{
|
{
|
||||||
int i, c, N0;
|
int i, c, N0;
|
||||||
int sum = 0, nbBands=0;
|
int sum = 0, nbBands=0;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
const opus_int16 * restrict eBands = m->eBands;
|
const opus_int16 * restrict eBands = m->eBands;
|
||||||
int decision;
|
int decision;
|
||||||
int hf_sum=0;
|
int hf_sum=0;
|
||||||
|
@ -1171,7 +1165,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
||||||
}
|
}
|
||||||
|
|
||||||
void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
celt_norm *_X, celt_norm *_Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
|
celt_norm *X_, celt_norm *Y_, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
|
||||||
int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res,
|
int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res,
|
||||||
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int LM, int codedBands, opus_uint32 *seed)
|
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int LM, int codedBands, opus_uint32 *seed)
|
||||||
{
|
{
|
||||||
|
@ -1185,7 +1179,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
int M;
|
int M;
|
||||||
int lowband_offset;
|
int lowband_offset;
|
||||||
int update_lowband = 1;
|
int update_lowband = 1;
|
||||||
int C = _Y != NULL ? 2 : 1;
|
int C = Y_ != NULL ? 2 : 1;
|
||||||
#ifdef RESYNTH
|
#ifdef RESYNTH
|
||||||
int resynth = 1;
|
int resynth = 1;
|
||||||
#else
|
#else
|
||||||
|
@ -1213,9 +1207,9 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
unsigned x_cm;
|
unsigned x_cm;
|
||||||
unsigned y_cm;
|
unsigned y_cm;
|
||||||
|
|
||||||
X = _X+M*eBands[i];
|
X = X_+M*eBands[i];
|
||||||
if (_Y!=NULL)
|
if (Y_!=NULL)
|
||||||
Y = _Y+M*eBands[i];
|
Y = Y_+M*eBands[i];
|
||||||
else
|
else
|
||||||
Y = NULL;
|
Y = NULL;
|
||||||
N = M*eBands[i+1]-M*eBands[i];
|
N = M*eBands[i+1]-M*eBands[i];
|
||||||
|
@ -1240,7 +1234,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
if (i>=m->effEBands)
|
if (i>=m->effEBands)
|
||||||
{
|
{
|
||||||
X=norm;
|
X=norm;
|
||||||
if (_Y!=NULL)
|
if (Y_!=NULL)
|
||||||
Y = norm;
|
Y = norm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
celt/bands.h
10
celt/bands.h
|
@ -41,7 +41,7 @@
|
||||||
* @param X Spectrum
|
* @param X Spectrum
|
||||||
* @param bands Square root of the energy for each band (returned)
|
* @param bands Square root of the energy for each band (returned)
|
||||||
*/
|
*/
|
||||||
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bands, int end, int _C, int M);
|
void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bands, int end, int C, int M);
|
||||||
|
|
||||||
/*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bank);*/
|
/*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bank);*/
|
||||||
|
|
||||||
|
@ -51,14 +51,14 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *band
|
||||||
* @param X Spectrum (returned normalised)
|
* @param X Spectrum (returned normalised)
|
||||||
* @param bands Square root of the energy for each band
|
* @param bands Square root of the energy for each band
|
||||||
*/
|
*/
|
||||||
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bands, int end, int _C, int M);
|
void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bands, int end, int C, int M);
|
||||||
|
|
||||||
/** Denormalise each band of X to restore full amplitude
|
/** Denormalise each band of X to restore full amplitude
|
||||||
* @param m Mode data
|
* @param m Mode data
|
||||||
* @param X Spectrum (returned de-normalised)
|
* @param X Spectrum (returned de-normalised)
|
||||||
* @param bands Square root of the energy for each band
|
* @param bands Square root of the energy for each band
|
||||||
*/
|
*/
|
||||||
void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bands, int end, int _C, int M);
|
void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bands, int end, int C, int M);
|
||||||
|
|
||||||
#define SPREAD_NONE (0)
|
#define SPREAD_NONE (0)
|
||||||
#define SPREAD_LIGHT (1)
|
#define SPREAD_LIGHT (1)
|
||||||
|
@ -67,7 +67,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig
|
||||||
|
|
||||||
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
|
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
|
||||||
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
|
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
|
||||||
int end, int _C, int M);
|
int end, int C, int M);
|
||||||
|
|
||||||
#ifdef MEASURE_NORM_MSE
|
#ifdef MEASURE_NORM_MSE
|
||||||
void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C);
|
void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C);
|
||||||
|
@ -86,7 +86,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
int time_domain, int fold, int dual_stereo, int intensity, int *tf_res,
|
int time_domain, int fold, int dual_stereo, int intensity, int *tf_res,
|
||||||
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed);
|
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed);
|
||||||
|
|
||||||
void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_masks, int LM, int C, int CC, int size,
|
void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int CC, int size,
|
||||||
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
|
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
|
||||||
opus_val16 *prev2logE, int *pulses, opus_uint32 seed);
|
opus_val16 *prev2logE, int *pulses, opus_uint32 seed);
|
||||||
|
|
||||||
|
|
29
celt/celt.c
29
celt/celt.c
|
@ -100,7 +100,7 @@ static inline int fromOpus(unsigned char c)
|
||||||
else
|
else
|
||||||
return fromOpusTable[(c>>3)-16] | (c&0x7);
|
return fromOpusTable[(c>>3)-16] | (c&0x7);
|
||||||
}
|
}
|
||||||
#endif /*CUSTOM_MODES*/
|
#endif /* CUSTOM_MODES */
|
||||||
|
|
||||||
#define COMBFILTER_MAXPERIOD 1024
|
#define COMBFILTER_MAXPERIOD 1024
|
||||||
#define COMBFILTER_MINPERIOD 15
|
#define COMBFILTER_MINPERIOD 15
|
||||||
|
@ -383,9 +383,8 @@ static int transient_analysis(const opus_val32 * restrict in, int len, int C,
|
||||||
|
|
||||||
/** Apply window and compute the MDCT for all sub-frames and
|
/** Apply window and compute the MDCT for all sub-frames and
|
||||||
all channels in a frame */
|
all channels in a frame */
|
||||||
static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * restrict in, celt_sig * restrict out, int _C, int LM)
|
static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * restrict in, celt_sig * restrict out, int C, int LM)
|
||||||
{
|
{
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
if (C==1 && !shortBlocks)
|
if (C==1 && !shortBlocks)
|
||||||
{
|
{
|
||||||
const int overlap = OVERLAP(mode);
|
const int overlap = OVERLAP(mode);
|
||||||
|
@ -414,10 +413,9 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * rest
|
||||||
all channels in a frame */
|
all channels in a frame */
|
||||||
static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X,
|
static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X,
|
||||||
celt_sig * restrict out_mem[],
|
celt_sig * restrict out_mem[],
|
||||||
celt_sig * restrict overlap_mem[], int _C, int LM)
|
celt_sig * restrict overlap_mem[], int C, int LM)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
const int N = mode->shortMdctSize<<LM;
|
const int N = mode->shortMdctSize<<LM;
|
||||||
const int overlap = OVERLAP(mode);
|
const int overlap = OVERLAP(mode);
|
||||||
VARDECL(opus_val32, x);
|
VARDECL(opus_val32, x);
|
||||||
|
@ -454,9 +452,8 @@ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X
|
||||||
RESTORE_STACK;
|
RESTORE_STACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int _C, int downsample, const opus_val16 *coef, celt_sig *mem)
|
static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem)
|
||||||
{
|
{
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
int c;
|
int c;
|
||||||
int count=0;
|
int count=0;
|
||||||
c=0; do {
|
c=0; do {
|
||||||
|
@ -902,8 +899,8 @@ int celt_encode_with_ec(CELTEncoder * restrict st, const opus_val16 * pcm, int f
|
||||||
opus_val16 *oldBandE, *oldLogE, *oldLogE2;
|
opus_val16 *oldBandE, *oldLogE, *oldLogE2;
|
||||||
int shortBlocks=0;
|
int shortBlocks=0;
|
||||||
int isTransient=0;
|
int isTransient=0;
|
||||||
const int CC = CHANNELS(st->channels);
|
const int CC = st->channels;
|
||||||
const int C = CHANNELS(st->stream_channels);
|
const int C = st->stream_channels;
|
||||||
int LM, M;
|
int LM, M;
|
||||||
int tf_select;
|
int tf_select;
|
||||||
int nbFilledBytes, nbAvailableBytes;
|
int nbFilledBytes, nbAvailableBytes;
|
||||||
|
@ -1692,7 +1689,7 @@ int opus_custom_encode_float(CELTEncoder * restrict st, const float * pcm, int f
|
||||||
if (pcm==NULL)
|
if (pcm==NULL)
|
||||||
return OPUS_BAD_ARG;
|
return OPUS_BAD_ARG;
|
||||||
|
|
||||||
C = CHANNELS(st->channels);
|
C = st->channels;
|
||||||
N = frame_size;
|
N = frame_size;
|
||||||
ALLOC(in, C*N, opus_int16);
|
ALLOC(in, C*N, opus_int16);
|
||||||
|
|
||||||
|
@ -1719,7 +1716,7 @@ int opus_custom_encode(CELTEncoder * restrict st, const opus_int16 * pcm, int fr
|
||||||
if (pcm==NULL)
|
if (pcm==NULL)
|
||||||
return OPUS_BAD_ARG;
|
return OPUS_BAD_ARG;
|
||||||
|
|
||||||
C=CHANNELS(st->channels);
|
C=st->channels;
|
||||||
N=frame_size;
|
N=frame_size;
|
||||||
ALLOC(in, C*N, celt_sig);
|
ALLOC(in, C*N, celt_sig);
|
||||||
for (j=0;j<C*N;j++) {
|
for (j=0;j<C*N;j++) {
|
||||||
|
@ -2013,7 +2010,7 @@ static void celt_decode_lost(CELTDecoder * restrict st, opus_val16 * restrict pc
|
||||||
int overlap = st->mode->overlap;
|
int overlap = st->mode->overlap;
|
||||||
opus_val16 fade = Q15ONE;
|
opus_val16 fade = Q15ONE;
|
||||||
int i, len;
|
int i, len;
|
||||||
const int C = CHANNELS(st->channels);
|
const int C = st->channels;
|
||||||
int offset;
|
int offset;
|
||||||
celt_sig *out_mem[2];
|
celt_sig *out_mem[2];
|
||||||
celt_sig *decode_mem[2];
|
celt_sig *decode_mem[2];
|
||||||
|
@ -2293,7 +2290,7 @@ int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, in
|
||||||
int shortBlocks;
|
int shortBlocks;
|
||||||
int isTransient;
|
int isTransient;
|
||||||
int intra_ener;
|
int intra_ener;
|
||||||
const int CC = CHANNELS(st->channels);
|
const int CC = st->channels;
|
||||||
int LM, M;
|
int LM, M;
|
||||||
int effEnd;
|
int effEnd;
|
||||||
int codedBands;
|
int codedBands;
|
||||||
|
@ -2310,7 +2307,7 @@ int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, in
|
||||||
int anti_collapse_rsv;
|
int anti_collapse_rsv;
|
||||||
int anti_collapse_on=0;
|
int anti_collapse_on=0;
|
||||||
int silence;
|
int silence;
|
||||||
int C = CHANNELS(st->stream_channels);
|
int C = st->stream_channels;
|
||||||
ALLOC_STACK;
|
ALLOC_STACK;
|
||||||
|
|
||||||
frame_size *= st->downsample;
|
frame_size *= st->downsample;
|
||||||
|
@ -2664,7 +2661,7 @@ int opus_custom_decode_float(CELTDecoder * restrict st, const unsigned char *dat
|
||||||
if (pcm==NULL)
|
if (pcm==NULL)
|
||||||
return OPUS_BAD_ARG;
|
return OPUS_BAD_ARG;
|
||||||
|
|
||||||
C = CHANNELS(st->channels);
|
C = st->channels;
|
||||||
N = frame_size;
|
N = frame_size;
|
||||||
|
|
||||||
ALLOC(out, C*N, opus_int16);
|
ALLOC(out, C*N, opus_int16);
|
||||||
|
@ -2694,7 +2691,7 @@ int opus_custom_decode(CELTDecoder * restrict st, const unsigned char *data, int
|
||||||
if (pcm==NULL)
|
if (pcm==NULL)
|
||||||
return OPUS_BAD_ARG;
|
return OPUS_BAD_ARG;
|
||||||
|
|
||||||
C = CHANNELS(st->channels);
|
C = st->channels;
|
||||||
N = frame_size;
|
N = frame_size;
|
||||||
ALLOC(out, C*N, celt_sig);
|
ALLOC(out, C*N, celt_sig);
|
||||||
|
|
||||||
|
|
|
@ -114,4 +114,4 @@ int celt_decode_with_ec(OpusCustomDecoder * restrict st, const unsigned char *da
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*CELT_H */
|
#endif /* CELT_H */
|
||||||
|
|
|
@ -83,8 +83,8 @@ static inline int NEG32(long long x)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EXTRACT16(x) _EXTRACT16(x, __FILE__, __LINE__)
|
#define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__)
|
||||||
static inline short _EXTRACT16(int x, char *file, int line)
|
static inline short EXTRACT16_(int x, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(x))
|
if (!VERIFY_SHORT(x))
|
||||||
|
@ -96,8 +96,8 @@ static inline short _EXTRACT16(int x, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EXTEND32(x) _EXTEND32(x, __FILE__, __LINE__)
|
#define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__)
|
||||||
static inline int _EXTEND32(int x, char *file, int line)
|
static inline int EXTEND32_(int x, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(x))
|
if (!VERIFY_SHORT(x))
|
||||||
|
@ -109,8 +109,8 @@ static inline int _EXTEND32(int x, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SHR16(a, shift) _SHR16(a, shift, __FILE__, __LINE__)
|
#define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__)
|
||||||
static inline short _SHR16(int a, int shift, char *file, int line)
|
static inline short SHR16_(int a, int shift, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||||
|
@ -123,8 +123,8 @@ static inline short _SHR16(int a, int shift, char *file, int line)
|
||||||
celt_mips++;
|
celt_mips++;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#define SHL16(a, shift) _SHL16(a, shift, __FILE__, __LINE__)
|
#define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__)
|
||||||
static inline short _SHL16(int a, int shift, char *file, int line)
|
static inline short SHL16_(int a, int shift, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
|
||||||
|
@ -179,8 +179,8 @@ static inline int SHL32(long long a, int shift)
|
||||||
//#define SHR(a,shift) ((a) >> (shift))
|
//#define SHR(a,shift) ((a) >> (shift))
|
||||||
//#define SHL(a,shift) ((a) << (shift))
|
//#define SHL(a,shift) ((a) << (shift))
|
||||||
|
|
||||||
#define ADD16(a, b) _ADD16(a, b, __FILE__, __LINE__)
|
#define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__)
|
||||||
static inline short _ADD16(int a, int b, char *file, int line)
|
static inline short ADD16_(int a, int b, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
@ -196,8 +196,8 @@ static inline short _ADD16(int a, int b, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SUB16(a, b) _SUB16(a, b, __FILE__, __LINE__)
|
#define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__)
|
||||||
static inline short _SUB16(int a, int b, char *file, int line)
|
static inline short SUB16_(int a, int b, char *file, int line)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
@ -211,8 +211,8 @@ static inline short _SUB16(int a, int b, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ADD32(a, b) _ADD32(a, b, __FILE__, __LINE__)
|
#define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__)
|
||||||
static inline int _ADD32(long long a, long long b, char *file, int line)
|
static inline int ADD32_(long long a, long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||||
|
@ -228,8 +228,8 @@ static inline int _ADD32(long long a, long long b, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SUB32(a, b) _SUB32(a, b, __FILE__, __LINE__)
|
#define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__)
|
||||||
static inline int _SUB32(long long a, long long b, char *file, int line)
|
static inline int SUB32_(long long a, long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
if (!VERIFY_INT(a) || !VERIFY_INT(b))
|
||||||
|
@ -244,8 +244,8 @@ static inline int _SUB32(long long a, long long b, char *file, int line)
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef UADD32
|
#undef UADD32
|
||||||
#define UADD32(a, b) _UADD32(a, b, __FILE__, __LINE__)
|
#define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__)
|
||||||
static inline unsigned int _UADD32(unsigned long long a, unsigned long long b, char *file, int line)
|
static inline unsigned int UADD32_(unsigned long long a, unsigned long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
|
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
|
||||||
|
@ -262,8 +262,8 @@ static inline unsigned int _UADD32(unsigned long long a, unsigned long long b, c
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef USUB32
|
#undef USUB32
|
||||||
#define USUB32(a, b) _USUB32(a, b, __FILE__, __LINE__)
|
#define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__)
|
||||||
static inline unsigned int _USUB32(unsigned long long a, unsigned long long b, char *file, int line)
|
static inline unsigned int USUB32_(unsigned long long a, unsigned long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
|
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
|
||||||
|
@ -294,8 +294,8 @@ static inline short MULT16_16_16(int a, int b)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MULT16_16(a, b) _MULT16_16(a, b, __FILE__, __LINE__)
|
#define MULT16_16(a, b) MULT16_16_(a, b, __FILE__, __LINE__)
|
||||||
static inline int _MULT16_16(int a, int b, char *file, int line)
|
static inline int MULT16_16_(int a, int b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
@ -311,8 +311,8 @@ static inline int _MULT16_16(int a, int b, char *file, int line)
|
||||||
|
|
||||||
#define MAC16_16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_16((a),(b))))
|
#define MAC16_16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_16((a),(b))))
|
||||||
|
|
||||||
#define MULT16_32_QX(a, b, Q) _MULT16_32_QX(a, b, Q, __FILE__, __LINE__)
|
#define MULT16_32_QX(a, b, Q) MULT16_32_QX_(a, b, Q, __FILE__, __LINE__)
|
||||||
static inline int _MULT16_32_QX(int a, long long b, int Q, char *file, int line)
|
static inline int MULT16_32_QX_(int a, long long b, int Q, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
|
||||||
|
@ -387,8 +387,8 @@ static inline short MULT16_16_Q14(int a, int b)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MULT16_16_Q15(a, b) _MULT16_16_Q15(a, b, __FILE__, __LINE__)
|
#define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__)
|
||||||
static inline short _MULT16_16_Q15(int a, int b, char *file, int line)
|
static inline short MULT16_16_Q15_(int a, int b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
|
||||||
|
@ -457,9 +457,9 @@ static inline short MULT16_16_P15(int a, int b)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DIV32_16(a, b) _DIV32_16(a, b, __FILE__, __LINE__)
|
#define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__)
|
||||||
|
|
||||||
static inline int _DIV32_16(long long a, long long b, char *file, int line)
|
static inline int DIV32_16_(long long a, long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (b==0)
|
if (b==0)
|
||||||
|
@ -484,8 +484,8 @@ static inline int _DIV32_16(long long a, long long b, char *file, int line)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DIV32(a, b) _DIV32(a, b, __FILE__, __LINE__)
|
#define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__)
|
||||||
static inline int _DIV32(long long a, long long b, char *file, int line)
|
static inline int DIV32_(long long a, long long b, char *file, int line)
|
||||||
{
|
{
|
||||||
long long res;
|
long long res;
|
||||||
if (b==0)
|
if (b==0)
|
||||||
|
|
|
@ -39,14 +39,6 @@
|
||||||
|
|
||||||
#define MAX_PERIOD 1024
|
#define MAX_PERIOD 1024
|
||||||
|
|
||||||
#ifndef CHANNELS
|
|
||||||
# ifdef DISABLE_STEREO
|
|
||||||
# define CHANNELS(_C) (1)
|
|
||||||
# else
|
|
||||||
# define CHANNELS(_C) (_C)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef OVERLAP
|
#ifndef OVERLAP
|
||||||
#define OVERLAP(mode) ((mode)->overlap)
|
#define OVERLAP(mode) ((mode)->overlap)
|
||||||
#endif
|
#endif
|
||||||
|
|
19
celt/pitch.c
19
celt/pitch.c
|
@ -98,13 +98,12 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len,
|
||||||
}
|
}
|
||||||
|
|
||||||
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
|
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
|
||||||
int len, int _C)
|
int len, int C)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
opus_val32 ac[5];
|
opus_val32 ac[5];
|
||||||
opus_val16 tmp=Q15ONE;
|
opus_val16 tmp=Q15ONE;
|
||||||
opus_val16 lpc[4], mem[4]={0,0,0,0};
|
opus_val16 lpc[4], mem[4]={0,0,0,0};
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
for (i=1;i<len>>1;i++)
|
for (i=1;i<len>>1;i++)
|
||||||
x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), SIG_SHIFT+3);
|
x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), SIG_SHIFT+3);
|
||||||
x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), SIG_SHIFT+3);
|
x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), SIG_SHIFT+3);
|
||||||
|
@ -259,7 +258,7 @@ void pitch_search(const opus_val16 * restrict x_lp, opus_val16 * restrict y,
|
||||||
|
|
||||||
static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2};
|
static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2};
|
||||||
opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
|
opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
|
||||||
int N, int *_T0, int prev_period, opus_val16 prev_gain)
|
int N, int *T0_, int prev_period, opus_val16 prev_gain)
|
||||||
{
|
{
|
||||||
int k, i, T, T0;
|
int k, i, T, T0;
|
||||||
opus_val16 g, g0;
|
opus_val16 g, g0;
|
||||||
|
@ -273,14 +272,14 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
|
||||||
minperiod0 = minperiod;
|
minperiod0 = minperiod;
|
||||||
maxperiod /= 2;
|
maxperiod /= 2;
|
||||||
minperiod /= 2;
|
minperiod /= 2;
|
||||||
*_T0 /= 2;
|
*T0_ /= 2;
|
||||||
prev_period /= 2;
|
prev_period /= 2;
|
||||||
N /= 2;
|
N /= 2;
|
||||||
x += maxperiod;
|
x += maxperiod;
|
||||||
if (*_T0>=maxperiod)
|
if (*T0_>=maxperiod)
|
||||||
*_T0=maxperiod-1;
|
*T0_=maxperiod-1;
|
||||||
|
|
||||||
T = T0 = *_T0;
|
T = T0 = *T0_;
|
||||||
xx=xy=yy=0;
|
xx=xy=yy=0;
|
||||||
for (i=0;i<N;i++)
|
for (i=0;i<N;i++)
|
||||||
{
|
{
|
||||||
|
@ -378,9 +377,9 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
|
||||||
offset = 0;
|
offset = 0;
|
||||||
if (pg > g)
|
if (pg > g)
|
||||||
pg = g;
|
pg = g;
|
||||||
*_T0 = 2*T+offset;
|
*T0_ = 2*T+offset;
|
||||||
|
|
||||||
if (*_T0<minperiod0)
|
if (*T0_<minperiod0)
|
||||||
*_T0=minperiod0;
|
*T0_=minperiod0;
|
||||||
return pg;
|
return pg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PITCH_H
|
#ifndef PITCH_H
|
||||||
#define _PITCH_H
|
#define PITCH_H
|
||||||
|
|
||||||
#include "modes.h"
|
#include "modes.h"
|
||||||
|
|
||||||
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
|
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
|
||||||
int len, int _C);
|
int len, int C);
|
||||||
|
|
||||||
void pitch_search(const opus_val16 * restrict x_lp, opus_val16 * restrict y,
|
void pitch_search(const opus_val16 * restrict x_lp, opus_val16 * restrict y,
|
||||||
int len, int max_pitch, int *pitch);
|
int len, int max_pitch, int *pitch);
|
||||||
|
|
|
@ -157,9 +157,8 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end,
|
||||||
const opus_val16 *eBands, opus_val16 *oldEBands,
|
const opus_val16 *eBands, opus_val16 *oldEBands,
|
||||||
opus_int32 budget, opus_int32 tell,
|
opus_int32 budget, opus_int32 tell,
|
||||||
const unsigned char *prob_model, opus_val16 *error, ec_enc *enc,
|
const unsigned char *prob_model, opus_val16 *error, ec_enc *enc,
|
||||||
int _C, int LM, int intra, opus_val16 max_decay)
|
int C, int LM, int intra, opus_val16 max_decay)
|
||||||
{
|
{
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
int i, c;
|
int i, c;
|
||||||
int badness = 0;
|
int badness = 0;
|
||||||
opus_val32 prev[2] = {0,0};
|
opus_val32 prev[2] = {0,0};
|
||||||
|
@ -259,10 +258,9 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end,
|
||||||
|
|
||||||
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
|
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
|
||||||
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
|
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
|
||||||
opus_val16 *error, ec_enc *enc, int _C, int LM, int nbAvailableBytes,
|
opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes,
|
||||||
int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate)
|
int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate)
|
||||||
{
|
{
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
int intra;
|
int intra;
|
||||||
opus_val16 max_decay;
|
opus_val16 max_decay;
|
||||||
VARDECL(opus_val16, oldEBands_intra);
|
VARDECL(opus_val16, oldEBands_intra);
|
||||||
|
@ -352,10 +350,9 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
|
||||||
RESTORE_STACK;
|
RESTORE_STACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int _C)
|
void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C)
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
|
|
||||||
/* Encode finer resolution */
|
/* Encode finer resolution */
|
||||||
for (i=start;i<end;i++)
|
for (i=start;i<end;i++)
|
||||||
|
@ -390,10 +387,9 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int _C)
|
void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C)
|
||||||
{
|
{
|
||||||
int i, prio, c;
|
int i, prio, c;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
|
|
||||||
/* Use up the remaining bits */
|
/* Use up the remaining bits */
|
||||||
for (prio=0;prio<2;prio++)
|
for (prio=0;prio<2;prio++)
|
||||||
|
@ -420,14 +416,13 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int _C, int LM)
|
void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM)
|
||||||
{
|
{
|
||||||
const unsigned char *prob_model = e_prob_model[LM][intra];
|
const unsigned char *prob_model = e_prob_model[LM][intra];
|
||||||
int i, c;
|
int i, c;
|
||||||
opus_val32 prev[2] = {0, 0};
|
opus_val32 prev[2] = {0, 0};
|
||||||
opus_val16 coef;
|
opus_val16 coef;
|
||||||
opus_val16 beta;
|
opus_val16 beta;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
opus_int32 budget;
|
opus_int32 budget;
|
||||||
opus_int32 tell;
|
opus_int32 tell;
|
||||||
|
|
||||||
|
@ -486,10 +481,9 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int _C)
|
void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C)
|
||||||
{
|
{
|
||||||
int i, c;
|
int i, c;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
/* Decode finer resolution */
|
/* Decode finer resolution */
|
||||||
for (i=start;i<end;i++)
|
for (i=start;i<end;i++)
|
||||||
{
|
{
|
||||||
|
@ -510,10 +504,9 @@ void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int _C)
|
void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C)
|
||||||
{
|
{
|
||||||
int i, prio, c;
|
int i, prio, c;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
|
|
||||||
/* Use up the remaining bits */
|
/* Use up the remaining bits */
|
||||||
for (prio=0;prio<2;prio++)
|
for (prio=0;prio<2;prio++)
|
||||||
|
@ -540,10 +533,9 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *
|
||||||
}
|
}
|
||||||
|
|
||||||
void log2Amp(const CELTMode *m, int start, int end,
|
void log2Amp(const CELTMode *m, int start, int end,
|
||||||
celt_ener *eBands, const opus_val16 *oldEBands, int _C)
|
celt_ener *eBands, const opus_val16 *oldEBands, int C)
|
||||||
{
|
{
|
||||||
int c, i;
|
int c, i;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
c=0;
|
c=0;
|
||||||
do {
|
do {
|
||||||
for (i=0;i<start;i++)
|
for (i=0;i<start;i++)
|
||||||
|
@ -560,10 +552,9 @@ void log2Amp(const CELTMode *m, int start, int end,
|
||||||
}
|
}
|
||||||
|
|
||||||
void amp2Log2(const CELTMode *m, int effEnd, int end,
|
void amp2Log2(const CELTMode *m, int effEnd, int end,
|
||||||
celt_ener *bandE, opus_val16 *bandLogE, int _C)
|
celt_ener *bandE, opus_val16 *bandLogE, int C)
|
||||||
{
|
{
|
||||||
int c, i;
|
int c, i;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
c=0;
|
c=0;
|
||||||
do {
|
do {
|
||||||
for (i=0;i<effEnd;i++)
|
for (i=0;i<effEnd;i++)
|
||||||
|
|
|
@ -36,25 +36,25 @@
|
||||||
#include "mathops.h"
|
#include "mathops.h"
|
||||||
|
|
||||||
void amp2Log2(const CELTMode *m, int effEnd, int end,
|
void amp2Log2(const CELTMode *m, int effEnd, int end,
|
||||||
celt_ener *bandE, opus_val16 *bandLogE, int _C);
|
celt_ener *bandE, opus_val16 *bandLogE, int C);
|
||||||
|
|
||||||
void log2Amp(const CELTMode *m, int start, int end,
|
void log2Amp(const CELTMode *m, int start, int end,
|
||||||
celt_ener *eBands, const opus_val16 *oldEBands, int _C);
|
celt_ener *eBands, const opus_val16 *oldEBands, int C);
|
||||||
|
|
||||||
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
|
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
|
||||||
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
|
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
|
||||||
opus_val16 *error, ec_enc *enc, int _C, int LM,
|
opus_val16 *error, ec_enc *enc, int C, int LM,
|
||||||
int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra,
|
int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra,
|
||||||
int two_pass, int loss_rate);
|
int two_pass, int loss_rate);
|
||||||
|
|
||||||
void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int _C);
|
void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C);
|
||||||
|
|
||||||
void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int _C);
|
void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C);
|
||||||
|
|
||||||
void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int _C, int LM);
|
void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM);
|
||||||
|
|
||||||
void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int _C);
|
void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C);
|
||||||
|
|
||||||
void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int _C);
|
void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C);
|
||||||
|
|
||||||
#endif /* QUANT_BANDS */
|
#endif /* QUANT_BANDS */
|
||||||
|
|
|
@ -248,13 +248,12 @@ void compute_pulse_cache(CELTMode *m, int LM)
|
||||||
static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start,
|
static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start,
|
||||||
const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance,
|
const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance,
|
||||||
int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits,
|
int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits,
|
||||||
int *ebits, int *fine_priority, int _C, int LM, ec_ctx *ec, int encode, int prev)
|
int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev)
|
||||||
{
|
{
|
||||||
opus_int32 psum;
|
opus_int32 psum;
|
||||||
int lo, hi;
|
int lo, hi;
|
||||||
int i, j;
|
int i, j;
|
||||||
int logM;
|
int logM;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
int stereo;
|
int stereo;
|
||||||
int codedBands=-1;
|
int codedBands=-1;
|
||||||
int alloc_floor;
|
int alloc_floor;
|
||||||
|
@ -525,10 +524,9 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int
|
||||||
}
|
}
|
||||||
|
|
||||||
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo,
|
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo,
|
||||||
opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int _C, int LM, ec_ctx *ec, int encode, int prev)
|
opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev)
|
||||||
{
|
{
|
||||||
int lo, hi, len, j;
|
int lo, hi, len, j;
|
||||||
const int C = CHANNELS(_C);
|
|
||||||
int codedBands;
|
int codedBands;
|
||||||
int skip_start;
|
int skip_start;
|
||||||
int skip_rsv;
|
int skip_rsv;
|
||||||
|
|
|
@ -96,6 +96,6 @@ static inline int pulses2bits(const CELTMode *m, int band, int LM, int pulses)
|
||||||
@return Total number of bits allocated
|
@return Total number of bits allocated
|
||||||
*/
|
*/
|
||||||
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero,
|
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero,
|
||||||
opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int _C, int LM, ec_ctx *ec, int encode, int prev);
|
opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
char *global_stack=0;
|
char *global_stack=0;
|
||||||
#else
|
#else
|
||||||
extern char *global_stack;
|
extern char *global_stack;
|
||||||
#endif /*CELT_C*/
|
#endif /* CELT_C */
|
||||||
|
|
||||||
#ifdef ENABLE_VALGRIND
|
#ifdef ENABLE_VALGRIND
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ extern char *global_stack;
|
||||||
char *global_stack_top=0;
|
char *global_stack_top=0;
|
||||||
#else
|
#else
|
||||||
extern char *global_stack_top;
|
extern char *global_stack_top;
|
||||||
#endif /*CELT_C*/
|
#endif /* CELT_C */
|
||||||
|
|
||||||
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
|
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
|
||||||
#define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char))))
|
#define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char))))
|
||||||
|
@ -133,13 +133,13 @@ extern char *global_stack_top;
|
||||||
#define RESTORE_STACK (global_stack = _saved_stack)
|
#define RESTORE_STACK (global_stack = _saved_stack)
|
||||||
#define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? opus_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack); _saved_stack = global_stack;
|
#define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? opus_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack); _saved_stack = global_stack;
|
||||||
|
|
||||||
#endif /*ENABLE_VALGRIND*/
|
#endif /* ENABLE_VALGRIND */
|
||||||
|
|
||||||
#include "os_support.h"
|
#include "os_support.h"
|
||||||
#define VARDECL(type, var) type *var
|
#define VARDECL(type, var) type *var
|
||||||
#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
|
#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
|
||||||
#define SAVE_STACK char *_saved_stack = global_stack;
|
#define SAVE_STACK char *_saved_stack = global_stack;
|
||||||
|
|
||||||
#endif /*VAR_ARRAYS*/
|
#endif /* VAR_ARRAYS */
|
||||||
|
|
||||||
#endif /*STACK_ALLOC_H*/
|
#endif /* STACK_ALLOC_H */
|
||||||
|
|
|
@ -30,8 +30,8 @@
|
||||||
@file opus_types.h
|
@file opus_types.h
|
||||||
@brief Opus reference implementation types
|
@brief Opus reference implementation types
|
||||||
*/
|
*/
|
||||||
#ifndef _OPUS_TYPES_H
|
#ifndef OPUS_TYPES_H
|
||||||
#define _OPUS_TYPES_H
|
#define OPUS_TYPES_H
|
||||||
|
|
||||||
/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */
|
/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */
|
||||||
#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
|
#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
|
||||||
|
@ -156,4 +156,4 @@
|
||||||
#define opus_uint64 unsigned long long
|
#define opus_uint64 unsigned long long
|
||||||
#define opus_uint8 unsigned char
|
#define opus_uint8 unsigned char
|
||||||
|
|
||||||
#endif /* _OPUS_TYPES_H */
|
#endif /* OPUS_TYPES_H */
|
||||||
|
|
|
@ -29,8 +29,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* \brief silk_Inlines.h defines inline signal processing functions.
|
* \brief silk_Inlines.h defines inline signal processing functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SILK_FIX_INLINES_H_
|
#ifndef SILK_FIX_INLINES_H
|
||||||
#define _SILK_FIX_INLINES_H_
|
#define SILK_FIX_INLINES_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
@ -185,4 +185,4 @@ static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approxima
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*_SILK_FIX_INLINES_H_*/
|
#endif /* SILK_FIX_INLINES_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SIGPROCFIX_API_MACROCOUNT_H_
|
#ifndef SIGPROCFIX_API_MACROCOUNT_H
|
||||||
#define _SIGPROCFIX_API_MACROCOUNT_H_
|
#define SIGPROCFIX_API_MACROCOUNT_H
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef silk_MACRO_COUNT
|
#ifdef silk_MACRO_COUNT
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _MACRO_DEBUG_H_
|
#ifndef MACRO_DEBUG_H
|
||||||
#define _MACRO_DEBUG_H_
|
#define MACRO_DEBUG_H
|
||||||
|
|
||||||
/* Redefine macro functions with extensive assertion in DEBUG mode.
|
/* Redefine macro functions with extensive assertion in DEBUG mode.
|
||||||
As functions can't be undefined, this file can't work with SigProcFIX_MacroCount.h */
|
As functions can't be undefined, this file can't work with SigProcFIX_MacroCount.h */
|
||||||
|
@ -566,4 +566,4 @@ static inline opus_int32 silk_CHECK_FIT32( opus_int64 a ){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* _MACRO_DEBUG_H_ */
|
#endif /* MACRO_DEBUG_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_SIGPROC_FIX_H_
|
#ifndef SILK_SIGPROC_FIX_H
|
||||||
#define _SILK_SIGPROC_FIX_H_
|
#define SILK_SIGPROC_FIX_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
@ -591,4 +591,4 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* SILK_SIGPROC_FIX_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_DEBUG_H_
|
#ifndef SILK_DEBUG_H
|
||||||
#define _SILK_DEBUG_H_
|
#define SILK_DEBUG_H
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||||
|
@ -284,4 +284,4 @@ extern int silk_debug_store_count;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SILK_DEBUG_H_ */
|
#endif /* SILK_DEBUG_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_SIGPROC_FLP_H_
|
#ifndef SILK_SIGPROC_FLP_H
|
||||||
#define _SILK_SIGPROC_FLP_H_
|
#define SILK_SIGPROC_FLP_H
|
||||||
|
|
||||||
#include "SigProc_FIX.h"
|
#include "SigProc_FIX.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -214,4 +214,4 @@ static inline silk_float silk_log2( double x )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* SILK_SIGPROC_FLP_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_API_C_H_
|
#ifndef SILK_API_C_H
|
||||||
#define _SILK_API_C_H_
|
#define SILK_API_C_H
|
||||||
|
|
||||||
/* This is an inline header file for general platform. */
|
/* This is an inline header file for general platform. */
|
||||||
|
|
||||||
|
@ -128,5 +128,5 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32)
|
||||||
#endif
|
#endif
|
||||||
#define matrix_c_adr(Matrix_base_adr, row, column, M) (Matrix_base_adr + ((row)+(M)*(column)))
|
#define matrix_c_adr(Matrix_base_adr, row, column, M) (Matrix_base_adr + ((row)+(M)*(column)))
|
||||||
|
|
||||||
#endif /* _SILK_API_C_H_ */
|
#endif /* SILK_API_C_H */
|
||||||
|
|
||||||
|
|
|
@ -83,5 +83,4 @@ void silk_resampler_private_AR2(
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* SILK_RESAMPLER_H*/
|
#endif /* SILK_RESAMPLER_H */
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_FIX_RESAMPLER_ROM_H_
|
#ifndef SILK_FIX_RESAMPLER_ROM_H
|
||||||
#define _SILK_FIX_RESAMPLER_ROM_H_
|
#define SILK_FIX_RESAMPLER_ROM_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
@ -62,4 +62,4 @@ extern const opus_int16 silk_resampler_frac_FIR_144[ 144 ][ RESAMPLER_ORDER_FIR_
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SILK_FIX_RESAMPLER_ROM_H_*/
|
#endif /* SILK_FIX_RESAMPLER_ROM_H */
|
||||||
|
|
|
@ -167,4 +167,4 @@ extern "C"
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SILK_TUNING_PARAMETERS_H*/
|
#endif /* SILK_TUNING_PARAMETERS_H */
|
||||||
|
|
|
@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SILK_TYPEDEF_H_
|
#ifndef SILK_TYPEDEF_H
|
||||||
#define _SILK_TYPEDEF_H_
|
#define SILK_TYPEDEF_H
|
||||||
|
|
||||||
#include "opus_types.h"
|
#include "opus_types.h"
|
||||||
|
|
||||||
|
@ -99,4 +99,4 @@ static inline void _silk_fatal(const char *str, const char *file, int line)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* SILK_TYPEDEF_H */
|
||||||
|
|
|
@ -83,4 +83,4 @@ static inline int align(int i)
|
||||||
|
|
||||||
int opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, int maxlen, int self_delimited);
|
int opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, int maxlen, int self_delimited);
|
||||||
|
|
||||||
#endif /* OPUS_PRIVATE_H_ */
|
#endif /* OPUS_PRIVATE_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue