rename files

This commit is contained in:
Volker Fischer 2013-02-13 18:51:13 +00:00
parent 0bd2171b0e
commit 244c1162b0
15 changed files with 275 additions and 275 deletions

View file

@ -1,82 +1,82 @@
/*
Original version:
Copyright (c) 2003-2004, Mark Borgerding
Followed by heavy modifications:
Copyright (c) 2007-2008, Jean-Marc Valin
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef KISS_FTR_H
#define KISS_FTR_H
#include "kiss_fft.h"
#ifdef __cplusplus
extern "C" {
#endif
#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
#define kiss_fftr_inplace SUF(kiss_fftr_inplace,KF_SUFFIX)
#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
#define kiss_fftr_twiddles SUF(kiss_fftr_twiddles,KF_SUFFIX)
#define kiss_fftr SUF(kiss_fftr,KF_SUFFIX)
#define kiss_fftri SUF(kiss_fftri,KF_SUFFIX)
/*
Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
*/
struct kiss_fftr_state{
kiss_fft_cfg substate;
kiss_twiddle_cpx * super_twiddles;
#ifdef USE_SIMD
long pad;
#endif
};
typedef struct kiss_fftr_state *kiss_fftr_cfg;
kiss_fftr_cfg kiss_fftr_alloc(int nfft,void * mem, size_t * lenmem);
/*
nfft must be even
If you don't care to allocate space, use mem = lenmem = NULL
*/
/*
input timedata has nfft scalar points
output freqdata has nfft/2+1 complex points, packed into nfft scalar points
*/
void kiss_fftr_twiddles(kiss_fftr_cfg st,kiss_fft_scalar *freqdata);
void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
void kiss_fftr_inplace(kiss_fftr_cfg st, kiss_fft_scalar *X);
void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
/*
input freqdata has nfft/2+1 complex points, packed into nfft scalar points
output timedata has nfft scalar points
*/
#define kiss_fftr_free speex_free
#ifdef __cplusplus
}
#endif
#endif
/*
Original version:
Copyright (c) 2003-2004, Mark Borgerding
Followed by heavy modifications:
Copyright (c) 2007-2008, Jean-Marc Valin
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef KISS_FTR_H
#define KISS_FTR_H
#include "cc6_kiss_fft.h"
#ifdef __cplusplus
extern "C" {
#endif
#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
#define kiss_fftr_inplace SUF(kiss_fftr_inplace,KF_SUFFIX)
#define kiss_fftr_alloc SUF(kiss_fftr_alloc,KF_SUFFIX)
#define kiss_fftr_twiddles SUF(kiss_fftr_twiddles,KF_SUFFIX)
#define kiss_fftr SUF(kiss_fftr,KF_SUFFIX)
#define kiss_fftri SUF(kiss_fftri,KF_SUFFIX)
/*
Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
*/
struct kiss_fftr_state{
kiss_fft_cfg substate;
kiss_twiddle_cpx * super_twiddles;
#ifdef USE_SIMD
long pad;
#endif
};
typedef struct kiss_fftr_state *kiss_fftr_cfg;
kiss_fftr_cfg kiss_fftr_alloc(int nfft,void * mem, size_t * lenmem);
/*
nfft must be even
If you don't care to allocate space, use mem = lenmem = NULL
*/
/*
input timedata has nfft scalar points
output freqdata has nfft/2+1 complex points, packed into nfft scalar points
*/
void kiss_fftr_twiddles(kiss_fftr_cfg st,kiss_fft_scalar *freqdata);
void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_scalar *freqdata);
void kiss_fftr_inplace(kiss_fftr_cfg st, kiss_fft_scalar *X);
void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_scalar *freqdata, kiss_fft_scalar *timedata);
/*
input freqdata has nfft/2+1 complex points, packed into nfft scalar points
output timedata has nfft scalar points
*/
#define kiss_fftr_free speex_free
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,138 +1,138 @@
/* (C) 2007 Jean-Marc Valin, CSIRO
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "laplace.h"
int ec_laplace_get_start_freq(int decay)
{
int fs = (((ec_uint32)32768)*(16384-decay))/(16384+decay);
/* Making fs even so we're sure that all the range is used for +/- values */
fs -= (fs&1);
return fs;
}
void ec_laplace_encode_start(ec_enc *enc, int *value, int decay, int fs)
{
int i;
int fl;
unsigned int ft;
int s = 0;
int val = *value;
if (val < 0)
{
s = 1;
val = -val;
}
ft = 32768;
fl = -fs;
for (i=0;i<val;i++)
{
int tmp_l, tmp_s;
tmp_l = fl;
tmp_s = fs;
fl += fs*2;
fs = (fs*(ec_int32)decay)>>14;
if (fs == 0)
{
if (fl+2 <= ft)
{
fs = 1;
} else {
fs = tmp_s;
fl = tmp_l;
if (s)
*value = -i;
else
*value = i;
break;
}
}
}
if (fl < 0)
fl = 0;
if (s)
fl += fs;
ec_encode(enc, fl, fl+fs, ft);
}
void ec_laplace_encode(ec_enc *enc, int *value, int decay)
{
int fs = ec_laplace_get_start_freq(decay);
ec_laplace_encode_start(enc, value, decay, fs);
}
int ec_laplace_decode_start(ec_dec *dec, int decay, int fs)
{
int val=0;
int fl, fh, fm;
unsigned int ft;
fl = 0;
ft = 32768;
fh = fs;
fm = ec_decode(dec, ft);
while (fm >= fh && fs != 0)
{
fl = fh;
fs = (fs*(ec_int32)decay)>>14;
if (fs == 0 && fh+2 <= ft)
{
fs = 1;
}
fh += fs*2;
val++;
}
if (fl>0)
{
if (fm >= fl+fs)
{
val = -val;
fl += fs;
} else {
fh -= fs;
}
}
/* Preventing an infinite loop in case something screws up in the decoding */
if (fl==fh)
fl--;
ec_dec_update(dec, fl, fh, ft);
return val;
}
int ec_laplace_decode(ec_dec *dec, int decay)
{
int fs = ec_laplace_get_start_freq(decay);
return ec_laplace_decode_start(dec, decay, fs);
}
/* (C) 2007 Jean-Marc Valin, CSIRO
*/
/*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "cc6_laplace.h"
int ec_laplace_get_start_freq(int decay)
{
int fs = (((ec_uint32)32768)*(16384-decay))/(16384+decay);
/* Making fs even so we're sure that all the range is used for +/- values */
fs -= (fs&1);
return fs;
}
void ec_laplace_encode_start(ec_enc *enc, int *value, int decay, int fs)
{
int i;
int fl;
unsigned int ft;
int s = 0;
int val = *value;
if (val < 0)
{
s = 1;
val = -val;
}
ft = 32768;
fl = -fs;
for (i=0;i<val;i++)
{
int tmp_l, tmp_s;
tmp_l = fl;
tmp_s = fs;
fl += fs*2;
fs = (fs*(ec_int32)decay)>>14;
if (fs == 0)
{
if (fl+2 <= ft)
{
fs = 1;
} else {
fs = tmp_s;
fl = tmp_l;
if (s)
*value = -i;
else
*value = i;
break;
}
}
}
if (fl < 0)
fl = 0;
if (s)
fl += fs;
ec_encode(enc, fl, fl+fs, ft);
}
void ec_laplace_encode(ec_enc *enc, int *value, int decay)
{
int fs = ec_laplace_get_start_freq(decay);
ec_laplace_encode_start(enc, value, decay, fs);
}
int ec_laplace_decode_start(ec_dec *dec, int decay, int fs)
{
int val=0;
int fl, fh, fm;
unsigned int ft;
fl = 0;
ft = 32768;
fh = fs;
fm = ec_decode(dec, ft);
while (fm >= fh && fs != 0)
{
fl = fh;
fs = (fs*(ec_int32)decay)>>14;
if (fs == 0 && fh+2 <= ft)
{
fs = 1;
}
fh += fs*2;
val++;
}
if (fl>0)
{
if (fm >= fl+fs)
{
val = -val;
fl += fs;
} else {
fh -= fs;
}
}
/* Preventing an infinite loop in case something screws up in the decoding */
if (fl==fh)
fl--;
ec_dec_update(dec, fl, fh, ft);
return val;
}
int ec_laplace_decode(ec_dec *dec, int decay)
{
int fs = ec_laplace_get_start_freq(decay);
return ec_laplace_decode_start(dec, decay, fs);
}

View file

@ -46,11 +46,11 @@
#include "config.h"
#endif
#include "mdct.h"
#include "cc6_mdct.h"
#include "cc6_kfft_double.h"
#include <math.h>
#include "cc6_os_support.h"
#include "mathops.h"
#include "cc6_mathops.h"
#include "cc6_stack_alloc.h"
#ifndef M_PI

View file

@ -45,7 +45,7 @@
#ifndef MDCT_H
#define MDCT_H
#include "kiss_fft.h"
#include "cc6_kiss_fft.h"
#include "cc6_arch.h"
typedef struct {

View file

@ -34,11 +34,11 @@
#endif
#include "cc6_celt.h"
#include "modes.h"
#include "rate.h"
#include "os_support.h"
#include "stack_alloc.h"
#include "quant_bands.h"
#include "cc6_modes.h"
#include "cc6_rate.h"
#include "cc6_os_support.h"
#include "cc6_stack_alloc.h"
#include "cc6_quant_bands.h"
#ifdef STATIC_MODES
#include "static_modes.c"

View file

@ -35,9 +35,9 @@
#include "cc6_celt_types.h"
#include "cc6_celt.h"
#include "cc6_arch.h"
#include "mdct.h"
#include "psy.h"
#include "pitch.h"
#include "cc6_mdct.h"
#include "cc6_psy.h"
#include "cc6_pitch.h"
#define CELT_BITSTREAM_VERSION 0x80000009

View file

@ -43,10 +43,10 @@
#include "kiss_fftr.h"*/
#include "cc6_kfft_single.h"
#include "pitch.h"
#include "psy.h"
#include "os_support.h"
#include "mathops.h"
#include "cc6_pitch.h"
#include "cc6_psy.h"
#include "cc6_os_support.h"
#include "cc6_mathops.h"
#include "cc6_modes.h"
#include "cc6_stack_alloc.h"

View file

@ -38,8 +38,8 @@
#ifndef _PITCH_H
#define _PITCH_H
#include "kiss_fftr.h"
#include "psy.h"
#include "cc6_kiss_fftr.h"
#include "cc6_psy.h"
#include "cc6_modes.h"
kiss_fftr_cfg pitch_state_alloc(int max_lag);

View file

@ -33,12 +33,12 @@
#include "config.h"
#endif
#include "psy.h"
#include "cc6_psy.h"
#include <math.h>
#include "os_support.h"
#include "cc6_os_support.h"
#include "cc6_arch.h"
#include "cc6_stack_alloc.h"
#include "mathops.h"
#include "cc6_mathops.h"
/* The Vorbis freq<->Bark mapping */
#define toBARK(n) (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))

View file

@ -33,12 +33,12 @@
#include "config.h"
#endif
#include "quant_bands.h"
#include "laplace.h"
#include "cc6_quant_bands.h"
#include "cc6_laplace.h"
#include <math.h>
#include "os_support.h"
#include "cc6_os_support.h"
#include "cc6_arch.h"
#include "mathops.h"
#include "cc6_mathops.h"
#include "cc6_stack_alloc.h"
#ifdef FIXED_POINT

View file

@ -36,7 +36,7 @@
#include "cc6_modes.h"
#include "cc6_entenc.h"
#include "cc6_entdec.h"
#include "mathops.h"
#include "cc6_mathops.h"
static __inline celt_word16_t amp2Log(celt_word32_t amp)
{

View file

@ -37,10 +37,10 @@
#include "cc6_modes.h"
#include "cc6_cwrs.h"
#include "cc6_arch.h"
#include "os_support.h"
#include "cc6_os_support.h"
#include "cc6_entcode.h"
#include "rate.h"
#include "cc6_rate.h"
#ifndef STATIC_MODES

View file

@ -33,11 +33,11 @@
#include "config.h"
#endif
#include "mathops.h"
#include "cc6_mathops.h"
#include "cc6_cwrs.h"
#include "vq.h"
#include "cc6_vq.h"
#include "cc6_arch.h"
#include "os_support.h"
#include "cc6_os_support.h"
/** Takes the pitch vector and the decoded residual vector, computes the gain
that will give ||p+g*y||=1 and mixes the residual with the pitch. */

View file

@ -38,7 +38,7 @@
#include "cc6_entenc.h"
#include "cc6_entdec.h"
#include "modes.h"
#include "cc6_modes.h"
/** Algebraic pulse-vector quantiser. The signal x is replaced by the sum of
* the pitch and a combination of pulses such that its norm is still equal

View file

@ -112,20 +112,20 @@ HEADERS += src/audiomixerboard.h \
libs/celt/cc6_float_cast.h \
libs/celt/cc6_kfft_double.h \
libs/celt/cc6_kfft_single.h \
libs/celt/kiss_fft.h \
libs/celt/kiss_fftr.h \
libs/celt/laplace.h \
libs/celt/mdct.h \
libs/celt/mfrngcod.h \
libs/celt/mathops.h \
libs/celt/modes.h \
libs/celt/os_support.h \
libs/celt/pitch.h \
libs/celt/psy.h \
libs/celt/quant_bands.h \
libs/celt/rate.h \
libs/celt/stack_alloc.h \
libs/celt/vq.h
libs/celt/cc6_kiss_fft.h \
libs/celt/cc6_kiss_fftr.h \
libs/celt/cc6_laplace.h \
libs/celt/cc6_mdct.h \
libs/celt/cc6_mfrngcod.h \
libs/celt/cc6_mathops.h \
libs/celt/cc6_modes.h \
libs/celt/cc6_os_support.h \
libs/celt/cc6_pitch.h \
libs/celt/cc6_psy.h \
libs/celt/cc6_quant_bands.h \
libs/celt/cc6_rate.h \
libs/celt/cc6_stack_alloc.h \
libs/celt/cc6_vq.h
SOURCES += src/audiomixerboard.cpp \
src/buffer.cpp \
@ -157,16 +157,16 @@ SOURCES += src/audiomixerboard.cpp \
libs/celt/cc6_kfft_single.c \
libs/celt/cc6__kiss_fft.c \
libs/celt/cc6__kiss_fftr.c \
libs/celt/laplace.c \
libs/celt/mdct.c \
libs/celt/modes.c \
libs/celt/pitch.c \
libs/celt/psy.c \
libs/celt/quant_bands.c \
libs/celt/rangedec.c \
libs/celt/rangeenc.c \
libs/celt/rate.c \
libs/celt/vq.c
libs/celt/cc6_laplace.c \
libs/celt/cc6_mdct.c \
libs/celt/cc6_modes.c \
libs/celt/cc6_pitch.c \
libs/celt/cc6_psy.c \
libs/celt/cc6_quant_bands.c \
libs/celt/cc6_rangedec.c \
libs/celt/cc6_rangeenc.c \
libs/celt/cc6_rate.c \
libs/celt/cc6_vq.c
DISTFILES += AUTHORS \
ChangeLog \