Revision b1159ad9 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
4298 4298
    }
4299 4299
}
4300 4300

  
4301
static void add_int16_c(int16_t * v1, int16_t * v2, int order)
4302
{
4303
    while (order--)
4304
       *v1++ += *v2++;
4305
}
4306

  
4307
static void sub_int16_c(int16_t * v1, int16_t * v2, int order)
4308
{
4309
    while (order--)
4310
        *v1++ -= *v2++;
4311
}
4312

  
4313 4301
static int32_t scalarproduct_int16_c(int16_t * v1, int16_t * v2, int order, int shift)
4314 4302
{
4315 4303
    int res = 0;
......
4320 4308
    return res;
4321 4309
}
4322 4310

  
4311
static int32_t scalarproduct_and_madd_int16_c(int16_t *v1, int16_t *v2, int16_t *v3, int order, int mul)
4312
{
4313
    int res = 0;
4314
    while (order--) {
4315
        res   += *v1 * *v2++;
4316
        *v1++ += mul * *v3++;
4317
    }
4318
    return res;
4319
}
4320

  
4323 4321
#define W0 2048
4324 4322
#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */
4325 4323
#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */
......
4848 4846
    c->vector_clipf = vector_clipf_c;
4849 4847
    c->float_to_int16 = ff_float_to_int16_c;
4850 4848
    c->float_to_int16_interleave = ff_float_to_int16_interleave_c;
4851
    c->add_int16 = add_int16_c;
4852
    c->sub_int16 = sub_int16_c;
4853 4849
    c->scalarproduct_int16 = scalarproduct_int16_c;
4850
    c->scalarproduct_and_madd_int16 = scalarproduct_and_madd_int16_c;
4854 4851
    c->scalarproduct_float = scalarproduct_float_c;
4855 4852
    c->butterflies_float = butterflies_float_c;
4856 4853
    c->vector_fmul_scalar = vector_fmul_scalar_c;

Also available in: Unified diff