Merge remote-tracking branch 'mans/ac3'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 22 Oct 2011 09:11:08 +0000 (11:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 22 Oct 2011 09:11:08 +0000 (11:11 +0200)
* mans/ac3:
  ac3enc: slightly faster quantize_mantissas_blk_ch()
  ac3enc: NEON optimised sum_square_butterfly_float
  ac3enc: neon optimised sum_square_butterfly_int32
  ac3enc: move inner loop of compute_rematrixing_strategy to ac3dsp

Conflicts:
libavcodec/ac3enc_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/ac3dsp.c
libavcodec/ac3dsp.h
libavcodec/ac3enc.c
libavcodec/ac3enc_fixed.c
libavcodec/ac3enc_float.c
libavcodec/ac3enc_template.c
libavcodec/arm/ac3dsp_init_arm.c

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -103,13 -104,18 +103,19 @@@ static int normalize_samples(AC3EncodeC
   */
  static void scale_coefficients(AC3EncodeContext *s)
  {
 -    int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS;
 -    s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
 -                               s->mdct_coef_buffer  + chan_size,
 -                               chan_size * s->channels);
 +    int chan_size = AC3_MAX_COEFS * s->num_blocks;
 +    int cpl       = s->cpl_on;
 +    s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + (chan_size * !cpl),
 +                               s->mdct_coef_buffer  + (chan_size * !cpl),
 +                               chan_size * (s->channels + cpl));
  }
  
+ static void sum_square_butterfly(AC3EncodeContext *s, float sum[4],
+                                  const float *coef0, const float *coef1,
+                                  int len)
+ {
+     s->ac3dsp.sum_square_butterfly_float(sum, coef0, coef1, len);
+ }
  
  /**
   * Clip MDCT coefficients to allowable range.
@@@ -41,8 -43,9 +41,11 @@@ static int normalize_samples(AC3EncodeC
  
  static void clip_coefficients(DSPContext *dsp, CoefType *coef, unsigned int len);
  
 +static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl);
 +
+ static void sum_square_butterfly(AC3EncodeContext *s, CoefSumType sum[4],
+                                  const CoefType *coef0, const CoefType *coef1,
+                                  int len);
  
  int AC3_NAME(allocate_sample_buffers)(AC3EncodeContext *s)
  {
Simple merge