shithub: opus

Download patch

ref: 802f6eab9b75db906869262a6387cf5209b28bb4
parent: 617af25e5c652e0c7151f8d136371fb2f794bb70
author: Jean-Marc Valin <[email protected]>
date: Fri Jul 23 13:02:23 EDT 2010

Making a bunch of things static

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -491,7 +491,7 @@
    /*printf ("dec %d: %d %d %d %d\n", flag_bits, *intra_ener, *has_pitch, *shortBlocks, *has_fold);*/
 }
 
-void deemphasis(celt_sig *in, celt_word16 *pcm, int N, int _C, const celt_word16 *coef, celt_sig *mem)
+static void deemphasis(celt_sig *in, celt_word16 *pcm, int N, int _C, const celt_word16 *coef, celt_sig *mem)
 {
    const int C = CHANNELS(_C);
    int c;
--- a/libcelt/kiss_fft.c
+++ b/libcelt/kiss_fft.c
@@ -467,7 +467,7 @@
 }
 
 
-void kf_work(
+static void kf_work(
         kiss_fft_cpx * Fout,
         const kiss_fft_cpx * f,
         size_t fstride,
@@ -501,7 +501,7 @@
 }
 
 
-void ki_work(
+static void ki_work(
              kiss_fft_cpx * Fout,
              const kiss_fft_cpx * f,
              size_t fstride,
@@ -641,7 +641,7 @@
 }
 
     
-void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+static void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
 {
     if (fin == fout) 
     {
@@ -666,7 +666,7 @@
     kiss_fft_stride(cfg,fin,fout,1);
 }
 
-void kiss_ifft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+static void kiss_ifft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
 {
    if (fin == fout) 
    {
--- a/libcelt/kiss_fft.h
+++ b/libcelt/kiss_fft.h
@@ -77,8 +77,6 @@
 
 #define kiss_fft_alloc_twiddles SUF(kiss_fft_alloc_twiddles,KF_SUFFIX)
 #define kiss_fft_alloc SUF(kiss_fft_alloc,KF_SUFFIX)
-#define kf_work SUF(kf_work,KF_SUFFIX)
-#define ki_work SUF(ki_work,KF_SUFFIX)
 #define kiss_fft SUF(kiss_fft,KF_SUFFIX)
 #define kiss_ifft SUF(kiss_ifft,KF_SUFFIX)
 #define kiss_fft_stride SUF(kiss_fft_stride,KF_SUFFIX)
@@ -125,13 +123,6 @@
 
 kiss_fft_cfg kiss_fft_alloc(int nfft,void * mem,size_t * lenmem); 
 
-void kf_work(kiss_fft_cpx * Fout,const kiss_fft_cpx * f,size_t fstride,
-             int in_stride,int * factors,const kiss_fft_cfg st,int N,int s2,int m2);
-
-/** Internal function. Can be useful when you want to do the bit-reversing yourself */
-void ki_work(kiss_fft_cpx * Fout, const kiss_fft_cpx * f, size_t fstride,
-             int in_stride,int * factors,const kiss_fft_cfg st,int N,int s2,int m2);
-
 /**
  * kiss_fft(cfg,in_out_buf)
  *
@@ -144,12 +135,6 @@
  * */
 void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
 void kiss_ifft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
-
-/**
- A more generic version of the above function. It reads its input from every Nth sample.
- * */
-void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
-void kiss_ifft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
 
 void kiss_fft_free(kiss_fft_cfg cfg);
 
--- a/libcelt/pitch.c
+++ b/libcelt/pitch.c
@@ -46,7 +46,7 @@
 #include "stack_alloc.h"
 #include "mathops.h"
 
-void find_best_pitch(celt_word32 *xcorr, celt_word32 maxcorr, celt_word16 *y, int yshift, int len, int max_pitch, int best_pitch[2])
+static void find_best_pitch(celt_word32 *xcorr, celt_word32 maxcorr, celt_word16 *y, int yshift, int len, int max_pitch, int best_pitch[2])
 {
    int i, j;
    celt_word32 Syy=1;