Revision 67fc32ac

View differences:

libavcodec/ac3enc.c
328 328
                CoefType rt = block->mdct_coef[1][i];
329 329
                CoefType md = lt + rt;
330 330
                CoefType sd = lt - rt;
331
                sum[0] += lt * lt;
332
                sum[1] += rt * rt;
333
                sum[2] += md * md;
334
                sum[3] += sd * sd;
331
                sum[0] += MUL_COEF(lt, lt);
332
                sum[1] += MUL_COEF(rt, rt);
333
                sum[2] += MUL_COEF(md, md);
334
                sum[3] += MUL_COEF(sd, sd);
335 335
            }
336 336

  
337 337
            /* compare sums to determine if rematrixing will be used for this band */
libavcodec/ac3enc_fixed.h
36 36
typedef int32_t CoefType;
37 37
typedef int64_t CoefSumType;
38 38

  
39
#define MUL_COEF(a,b) MUL64(a,b)
40

  
39 41

  
40 42
/**
41 43
 * Compex number.
libavcodec/ac3enc_float.h
36 36
typedef float CoefType;
37 37
typedef float CoefSumType;
38 38

  
39
#define MUL_COEF(a,b) ((a)*(b))
40

  
39 41

  
40 42
typedef struct AC3MDCTContext {
41 43
    const float *window;    ///< MDCT window function

Also available in: Unified diff