Merge branch 'exp_analysis7'
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 9 Oct 2012 07:07:06 +0000 (03:07 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Tue, 9 Oct 2012 07:07:06 +0000 (03:07 -0400)
Conflicts:
celt/celt.c
celt/mdct.c
include/opus_defines.h
src/opus_encoder.c

1  2 
Makefile.am
celt/bands.c
celt/bands.h
celt/celt.c
celt/celt.h
celt/mdct.c
celt/pitch.c
src/opus_encoder.c

diff --cc Makefile.am
Simple merge
diff --cc celt/bands.c
Simple merge
diff --cc celt/bands.h
Simple merge
diff --cc celt/celt.c
@@@ -302,8 -297,8 +306,8 @@@ static inline opus_val16 SIG2WORD16(cel
  #endif
  }
  
 -static int transient_analysis(const opus_val32 * restrict in, int len, int C,
 +static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int C,
-                               int overlap)
+                               int overlap, opus_val16 *tf_estimate, int *tf_chan, AnalysisInfo *analysis)
  {
     int i;
     VARDECL(opus_val16, tmp);
diff --cc celt/celt.h
Simple merge
diff --cc celt/mdct.c
@@@ -185,9 -187,9 +187,9 @@@ void clt_mdct_forward(const mdct_looku
     /* Post-rotate */
     {
        /* Temp pointers to make it really clear to the compiler what we're doing */
-       const kiss_fft_scalar * OPUS_RESTRICT fp = in;
 -      const kiss_fft_scalar * restrict fp = f2;
 -      kiss_fft_scalar * restrict yp1 = out;
 -      kiss_fft_scalar * restrict yp2 = out+stride*(N2-1);
++      const kiss_fft_scalar * OPUS_RESTRICT fp = f2;
 +      kiss_fft_scalar * OPUS_RESTRICT yp1 = out;
 +      kiss_fft_scalar * OPUS_RESTRICT yp2 = out+stride*(N2-1);
        const kiss_twiddle_scalar *t = &l->trig[0];
        /* Temp pointers to make it really clear to the compiler what we're doing */
        for(i=0;i<N4;i++)
diff --cc celt/pitch.c
Simple merge
@@@ -469,9 -522,14 +522,14 @@@ opus_int32 opus_encode_float(OpusEncode
      opus_int32 equiv_rate;
      int delay_compensation;
      int frame_rate;
 -    opus_int32 max_rate;
 +    opus_int32 max_rate; /* Max bitrate we're allowed to use */
      int curr_bandwidth;
 -    opus_int32 max_data_bytes;
 +    opus_int32 max_data_bytes; /* Max number of bytes we're allowed to use */
+     int extra_buffer, total_buffer;
+     int perform_analysis=0;
+ #ifndef FIXED_POINT
+     AnalysisInfo analysis_info;
+ #endif
      VARDECL(opus_val16, tmp_prefill);
  
      ALLOC_STACK;
              g1 = g1==16384 ? Q15ONE : SHL16(g1,1);
              g2 = g2==16384 ? Q15ONE : SHL16(g2,1);
  #else
 -            g1 *= (1./16384);
 -            g2 *= (1./16384);
 +            g1 *= (1.f/16384);
 +            g2 *= (1.f/16384);
  #endif
-             stereo_fade(pcm_buf, pcm_buf, g1, g2, celt_mode->overlap,
+             stereo_fade(pcm_buf+extra_buffer*st->channels, pcm_buf+extra_buffer*st->channels, g1, g2, celt_mode->overlap,
                    frame_size, st->channels, celt_mode->window, st->Fs);
              st->hybrid_stereo_width_Q14 = st->silk_mode.stereoWidth_Q14;
          }