diff options
author | Rhishikesh Agashe <Rhishikesh.Agashe@imgtec.com> | 2015-10-07 13:55:12 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-10-07 13:55:12 -0400 |
commit | c9c2035355b8e028d1b62992b277b0c376634cf3 (patch) | |
tree | 36a7a9e3a0eb0285b47870f14643bf48d15db823 /celt/mips | |
parent | 50d6701e2a0352954026caf40383d10dad3a2be4 (diff) | |
download | opus-c9c2035355b8e028d1b62992b277b0c376634cf3.tar.gz |
Fixes compile problems for MIPS
Brings MIPS in sync with the ARM/SSE optimizations that added "arch" parameters.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'celt/mips')
-rw-r--r-- | celt/mips/celt_mipsr1.h | 2 | ||||
-rw-r--r-- | celt/mips/pitch_mipsr1.h | 5 | ||||
-rw-r--r-- | celt/mips/vq_mipsr1.h | 14 |
3 files changed, 12 insertions, 9 deletions
diff --git a/celt/mips/celt_mipsr1.h b/celt/mips/celt_mipsr1.h index 7915d596..e85661a6 100644 --- a/celt/mips/celt_mipsr1.h +++ b/celt/mips/celt_mipsr1.h @@ -61,6 +61,8 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, int i; opus_val32 x0, x1, x2, x3, x4; + (void)arch; + /* printf ("%d %d %f %f\n", T0, T1, g0, g1); */ opus_val16 g00, g01, g02, g10, g11, g12; static const opus_val16 gains[3][3] = { diff --git a/celt/mips/pitch_mipsr1.h b/celt/mips/pitch_mipsr1.h index e2f017e9..a9500aff 100644 --- a/celt/mips/pitch_mipsr1.h +++ b/celt/mips/pitch_mipsr1.h @@ -36,11 +36,14 @@ #define OVERRIDE_DUAL_INNER_PROD static inline void dual_inner_prod(const opus_val16 *x, const opus_val16 *y01, const opus_val16 *y02, - int N, opus_val32 *xy1, opus_val32 *xy2) + int N, opus_val32 *xy1, opus_val32 *xy2, int arch) { int j; opus_val32 xy01=0; opus_val32 xy02=0; + + (void)arch; + asm volatile("MULT $ac1, $0, $0"); asm volatile("MULT $ac2, $0, $0"); /* Compute the norm of X+Y and X-Y as |X|^2 + |Y|^2 +/- sum(xy) */ diff --git a/celt/mips/vq_mipsr1.h b/celt/mips/vq_mipsr1.h index 0affae01..54cef861 100644 --- a/celt/mips/vq_mipsr1.h +++ b/celt/mips/vq_mipsr1.h @@ -34,16 +34,12 @@ #endif #include "mathops.h" -#include "cwrs.h" -#include "vq.h" #include "arch.h" -#include "os_support.h" -#include "bands.h" -#include "rate.h" static unsigned extract_collapse_mask(int *iy, int N, int B); static void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT X, int N, opus_val32 Ryy, opus_val16 gain); static void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int spread); +static void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch); #define OVERRIDE_vq_exp_rotation1 static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s) @@ -75,9 +71,9 @@ static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_ #define OVERRIDE_renormalise_vector #define renormalise_vector(X, N, gain, arch) \ - ((void)(arch), renormalize_vector_mips(x, N, gain)) + (renormalise_vector_mips(X, N, gain, arch)) -void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain) +void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) { int i; #ifdef FIXED_POINT @@ -87,8 +83,10 @@ void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain) opus_val16 g; opus_val32 t; celt_norm *xptr = X; + int X0, X1; + + (void)arch; - int X0, X2, X3, X1; asm volatile("mult $ac1, $0, $0"); asm volatile("MTLO %0, $ac1" : :"r" (E)); /*if(N %4) |