diff 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
line wrap: on
line diff
--- a/mlpdsp.c	Fri May 15 15:30:43 2009 +0000
+++ b/mlpdsp.c	Fri May 15 15:34:22 2009 +0000
@@ -22,11 +22,15 @@
 #include "libavcodec/mlp.h"
 #include "dsputil.h"
 
-static void ff_mlp_filter_channel(int32_t *firbuf, const int32_t *fircoeff, int firorder,
-                                  int32_t *iirbuf, const int32_t *iircoeff, int iirorder,
+static void ff_mlp_filter_channel(int32_t *state, const int32_t *coeff,
+                                  int firorder, int iirorder,
                                   unsigned int filter_shift, int32_t mask, int blocksize,
                                   int32_t *sample_buffer)
 {
+    int32_t *firbuf = state;
+    int32_t *iirbuf = state + MAX_BLOCKSIZE + MAX_FIR_ORDER;
+    const int32_t *fircoeff = coeff;
+    const int32_t *iircoeff = coeff + MAX_FIR_ORDER;
     int i;
 
     for (i = 0; i < blocksize; i++) {