1
0
Fork 0
forked from len0rd/rockbox

opus: #if 0 out some unused code

Change-Id: I16fa9b439f8da5b9b8a4f17040487b9535078ec5
This commit is contained in:
Nils Wallménius 2012-09-22 12:01:01 +02:00
parent c555938ea0
commit f498142143
6 changed files with 30 additions and 0 deletions

View file

@ -73,6 +73,7 @@ static int bitexact_log2tan(int isin,int icos)
-FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932);
} }
#if 0
#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 *bandE, int end, int C, int M) void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int M)
@ -170,6 +171,7 @@ void normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, cel
} }
#endif /* FIXED_POINT */ #endif /* FIXED_POINT */
#endif
/* 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 * OPUS_RESTRICT X, celt_sig * OPUS_RESTRICT freq, const celt_ener *bandE, int end, int C, int M) void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, celt_sig * OPUS_RESTRICT freq, const celt_ener *bandE, int end, int C, int M)
@ -390,6 +392,7 @@ static void stereo_merge(celt_norm *X, celt_norm *Y, opus_val16 mid, int N)
} }
} }
#if 0
/* 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,
@ -482,6 +485,7 @@ int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
#endif #endif
return decision; return decision;
} }
#endif
#ifdef MEASURE_NORM_MSE #ifdef MEASURE_NORM_MSE

View file

@ -198,6 +198,7 @@ struct OpusCustomEncoder {
/* opus_val16 oldEBands[], Size = 2*channels*mode->nbEBands */ /* opus_val16 oldEBands[], Size = 2*channels*mode->nbEBands */
}; };
#if 0
int celt_encoder_get_size(int channels) int celt_encoder_get_size(int channels)
{ {
CELTMode *mode = opus_custom_mode_create(48000, 960, NULL); CELTMode *mode = opus_custom_mode_create(48000, 960, NULL);
@ -280,6 +281,7 @@ void opus_custom_encoder_destroy(CELTEncoder *st)
opus_free(st); opus_free(st);
} }
#endif /* CUSTOM_MODES */ #endif /* CUSTOM_MODES */
#endif
static inline opus_val16 SIG2WORD16(celt_sig x) static inline opus_val16 SIG2WORD16(celt_sig x)
{ {
@ -293,6 +295,7 @@ static inline opus_val16 SIG2WORD16(celt_sig x)
#endif #endif
} }
#if 0
static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C, static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C,
int overlap) int overlap)
{ {
@ -410,6 +413,7 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * OPUS
} while (++c<C); } while (++c<C);
} }
} }
#endif
/** Compute the IMDCT and apply window for all sub-frames and /** Compute the IMDCT and apply window for all sub-frames and
all channels in a frame */ all channels in a frame */
@ -536,6 +540,7 @@ static const signed char tf_select_table[4][8] = {
{0, -2, 0, -3, 3, 0, 1,-1}, {0, -2, 0, -3, 3, 0, 1,-1},
}; };
#if 0
static opus_val32 l1_metric(const celt_norm *tmp, int N, int LM, int width) static opus_val32 l1_metric(const celt_norm *tmp, int N, int LM, int width)
{ {
int i, j; int i, j;
@ -737,6 +742,7 @@ static void tf_encode(int start, int end, int isTransient, int *tf_res, int LM,
tf_res[i] = tf_select_table[LM][4*isTransient+2*tf_select+tf_res[i]]; tf_res[i] = tf_select_table[LM][4*isTransient+2*tf_select+tf_res[i]];
/*printf("%d %d ", isTransient, tf_select); for(i=0;i<end;i++)printf("%d ", tf_res[i]);printf("\n");*/ /*printf("%d %d ", isTransient, tf_select); for(i=0;i<end;i++)printf("%d ", tf_res[i]);printf("\n");*/
} }
#endif
static void tf_decode(int start, int end, int isTransient, int *tf_res, int LM, ec_dec *dec) static void tf_decode(int start, int end, int isTransient, int *tf_res, int LM, ec_dec *dec)
{ {
@ -788,6 +794,7 @@ static void init_caps(const CELTMode *m,int *cap,int LM,int C)
} }
} }
#if 0
static int alloc_trim_analysis(const CELTMode *m, const celt_norm *X, static int alloc_trim_analysis(const CELTMode *m, const celt_norm *X,
const opus_val16 *bandLogE, int end, int LM, int C, int N0) const opus_val16 *bandLogE, int end, int LM, int C, int N0)
{ {
@ -1901,6 +1908,7 @@ bad_request:
va_end(ap); va_end(ap);
return OPUS_UNIMPLEMENTED; return OPUS_UNIMPLEMENTED;
} }
#endif
/**********************************************************************/ /**********************************************************************/
/* */ /* */

View file

@ -46,6 +46,7 @@
complex numbers. It also delares the kf_ internal functions. complex numbers. It also delares the kf_ internal functions.
*/ */
#if 0
static void kf_bfly2( static void kf_bfly2(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
const size_t fstride, const size_t fstride,
@ -78,6 +79,7 @@ static void kf_bfly2(
} }
} }
} }
#endif
static void ki_bfly2( static void ki_bfly2(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
@ -110,6 +112,7 @@ static void ki_bfly2(
} }
} }
#if 0
static void kf_bfly4( static void kf_bfly4(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
const size_t fstride, const size_t fstride,
@ -158,6 +161,7 @@ static void kf_bfly4(
} }
} }
} }
#endif
static void ki_bfly4( static void ki_bfly4(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
@ -206,6 +210,7 @@ static void ki_bfly4(
#ifndef RADIX_TWO_ONLY #ifndef RADIX_TWO_ONLY
#if 0
static void kf_bfly3( static void kf_bfly3(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
const size_t fstride, const size_t fstride,
@ -257,6 +262,7 @@ static void kf_bfly3(
} while(--k); } while(--k);
} }
} }
#endif
static void ki_bfly3( static void ki_bfly3(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
@ -308,6 +314,7 @@ static void ki_bfly3(
} }
} }
#if 0
static void kf_bfly5( static void kf_bfly5(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
const size_t fstride, const size_t fstride,
@ -376,6 +383,7 @@ static void kf_bfly5(
} }
} }
} }
#endif
static void ki_bfly5( static void ki_bfly5(
kiss_fft_cpx * Fout, kiss_fft_cpx * Fout,
@ -609,6 +617,7 @@ void opus_fft_free(const kiss_fft_state *cfg)
#endif /* CUSTOM_MODES */ #endif /* CUSTOM_MODES */
#if 0
void opus_fft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) void opus_fft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
{ {
int m2, m; int m2, m;
@ -667,6 +676,7 @@ void opus_fft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fou
m = m2; m = m2;
} }
} }
#endif
void opus_ifft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout) void opus_ifft(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
{ {

View file

@ -101,6 +101,7 @@ void clt_mdct_clear(mdct_lookup *l)
#endif /* CUSTOM_MODES */ #endif /* CUSTOM_MODES */
#if 0
/* Forward MDCT trashes the input array */ /* Forward MDCT trashes the input array */
void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out,
const opus_val16 *window, int overlap, int shift, int stride) const opus_val16 *window, int overlap, int shift, int stride)
@ -205,6 +206,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar
} }
RESTORE_STACK; RESTORE_STACK;
} }
#endif
void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out, void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar * OPUS_RESTRICT out,
const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride) const opus_val16 * OPUS_RESTRICT window, int overlap, int shift, int stride)

View file

@ -280,6 +280,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR
RESTORE_STACK; RESTORE_STACK;
} }
#if 0
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)
@ -408,3 +409,4 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
*T0_=minperiod0; *T0_=minperiod0;
return pg; return pg;
} }
#endif

View file

@ -132,10 +132,12 @@ OPUS_CUSTOM_EXPORT void opus_custom_mode_destroy(OpusCustomMode *mode);
* @param [in] channels <tt>int</tt>: Number of channels * @param [in] channels <tt>int</tt>: Number of channels
* @returns size * @returns size
*/ */
# if 0
OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size( OPUS_CUSTOM_EXPORT_STATIC OPUS_WARN_UNUSED_RESULT int opus_custom_encoder_get_size(
const OpusCustomMode *mode, const OpusCustomMode *mode,
int channels int channels
) OPUS_ARG_NONNULL(1); ) OPUS_ARG_NONNULL(1);
#endif
/** Creates a new encoder state. Each stream needs its own encoder /** Creates a new encoder state. Each stream needs its own encoder
* state (can't be shared across simultaneous streams). * state (can't be shared across simultaneous streams).
@ -164,11 +166,13 @@ OPUS_CUSTOM_EXPORT OPUS_WARN_UNUSED_RESULT OpusCustomEncoder *opus_custom_encode
* @param [in] channels <tt>int</tt>: Number of channels * @param [in] channels <tt>int</tt>: Number of channels
* @return OPUS_OK Success or @ref opus_errorcodes * @return OPUS_OK Success or @ref opus_errorcodes
*/ */
#if 0
OPUS_CUSTOM_EXPORT_STATIC int opus_custom_encoder_init( OPUS_CUSTOM_EXPORT_STATIC int opus_custom_encoder_init(
OpusCustomEncoder *st, OpusCustomEncoder *st,
const OpusCustomMode *mode, const OpusCustomMode *mode,
int channels int channels
) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2); ) OPUS_ARG_NONNULL(1) OPUS_ARG_NONNULL(2);
#endif
/** Destroys a an encoder state. /** Destroys a an encoder state.
* @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed. * @param[in] st <tt>OpusCustomEncoder*</tt>: State to be freed.