Revision e6e98234 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
3890 3890
    return res;
3891 3891
}
3892 3892

  
3893
static void apply_window_int16_c(int16_t *output, const int16_t *input,
3894
                                 const int16_t *window, unsigned int len)
3895
{
3896
    int i;
3897
    int len2 = len >> 1;
3898

  
3899
    for (i = 0; i < len2; i++) {
3900
        int16_t w       = window[i];
3901
        output[i]       = (MUL16(input[i],       w) + (1 << 14)) >> 15;
3902
        output[len-i-1] = (MUL16(input[len-i-1], w) + (1 << 14)) >> 15;
3903
    }
3904
}
3905

  
3893 3906
#define W0 2048
3894 3907
#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */
3895 3908
#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */
......
4364 4377
    c->vector_clipf = vector_clipf_c;
4365 4378
    c->scalarproduct_int16 = scalarproduct_int16_c;
4366 4379
    c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c;
4380
    c->apply_window_int16 = apply_window_int16_c;
4367 4381
    c->scalarproduct_float = scalarproduct_float_c;
4368 4382
    c->butterflies_float = butterflies_float_c;
4369 4383
    c->vector_fmul_scalar = vector_fmul_scalar_c;

Also available in: Unified diff