Mercurial > libavcodec.hg
comparison mlpdsp.c @ 9647:d0fe5dc427f0 libavcodec
mlp: Simplify adressing of state and coeffs arrays for both filters by making
the arrays sequential.
author | ramiro |
---|---|
date | Fri, 15 May 2009 15:34:22 +0000 |
parents | b8b9ff6fa077 |
children | 128531f67aa1 |
comparison
equal
deleted
inserted
replaced
9646:b8b9ff6fa077 | 9647:d0fe5dc427f0 |
---|---|
20 */ | 20 */ |
21 | 21 |
22 #include "libavcodec/mlp.h" | 22 #include "libavcodec/mlp.h" |
23 #include "dsputil.h" | 23 #include "dsputil.h" |
24 | 24 |
25 static void ff_mlp_filter_channel(int32_t *firbuf, const int32_t *fircoeff, int firorder, | 25 static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff, |
26 int32_t *iirbuf, const int32_t *iircoeff, int iirorder, | 26 int firorder, int iirorder, |
27 unsigned int filter_shift, int32_t mask, int blocksize, | 27 unsigned int filter_shift, int32_t mask, int blocksize, |
28 int32_t *sample_buffer) | 28 int32_t *sample_buffer) |
29 { | 29 { |
30 int32_t *firbuf = state; | |
31 int32_t *iirbuf = state + MAX_BLOCKSIZE + MAX_FIR_ORDER; | |
32 const int32_t *fircoeff = coeff; | |
33 const int32_t *iircoeff = coeff + MAX_FIR_ORDER; | |
30 int i; | 34 int i; |
31 | 35 |
32 for (i = 0; i < blocksize; i++) { | 36 for (i = 0; i < blocksize; i++) { |
33 int32_t residual = *sample_buffer; | 37 int32_t residual = *sample_buffer; |
34 unsigned int order; | 38 unsigned int order; |