Skip to content
Snippets Groups Projects
Commit c9c20353 authored by Rhishikesh Agashe's avatar Rhishikesh Agashe Committed by Jean-Marc Valin
Browse files

Fixes compile problems for MIPS


Brings MIPS in sync with the ARM/SSE optimizations that added "arch" parameters.

Signed-off-by: default avatarJean-Marc Valin <jmvalin@jmvalin.ca>
parent 50d6701e
No related branches found
No related tags found
No related merge requests found
......@@ -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] = {
......
......@@ -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) */
......
......@@ -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)
......
......@@ -39,10 +39,6 @@
#include "rate.h"
#include "pitch.h"
#if defined(MIPSr1_ASM)
#include "mips/vq_mipsr1.h"
#endif
#ifndef OVERRIDE_vq_exp_rotation1
static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s)
{
......
......@@ -37,6 +37,11 @@
#include "entdec.h"
#include "modes.h"
#if defined(MIPSr1_ASM)
#include "mips/vq_mipsr1.h"
#endif
/** Algebraic pulse-vector quantiser. The signal x is replaced by the sum of
* the pitch and a combination of pulses such that its norm is still equal
* to 1. This is the function that will typically require the most CPU.
......
......@@ -43,15 +43,18 @@ void silk_warped_LPC_analysis_filter_FIX(
const opus_int16 input[], /* I Input signal [length] */
const opus_int16 lambda_Q16, /* I Warping factor */
const opus_int length, /* I Length of input signal */
const opus_int order /* I Filter order (even) */
const opus_int order, /* I Filter order (even) */
int arch
)
{
opus_int n, i;
opus_int32 acc_Q11, acc_Q22, tmp1, tmp2, tmp3, tmp4;
opus_int32 state_cur, state_next;
(void)arch;
/* Order must be even */
/*Length must be even */
/* Length must be even */
silk_assert( ( order & 1 ) == 0 );
silk_assert( ( length & 1 ) == 0 );
......
......@@ -38,6 +38,11 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
#if !defined(OVERRIDE_silk_warped_LPC_analysis_filter_FIX)
#define silk_warped_LPC_analysis_filter_FIX(state, res_Q2, coef_Q13, input, lambda_Q16, length, order, arch) \
((void)(arch),silk_warped_LPC_analysis_filter_FIX_c(state, res_Q2, coef_Q13, input, lambda_Q16, length, order))
#endif
/* Prefilter for finding Quantizer input signal */
static OPUS_INLINE void silk_prefilt_FIX(
silk_prefilter_state_FIX *P, /* I/O state */
......
......@@ -468,23 +468,4 @@ void silk_encode_indices(
opus_int condCoding /* I The type of conditional coding to use */
);
void silk_warped_LPC_analysis_filter_FIX_c(
opus_int32 state[], /* I/O State [order + 1] */
opus_int32 res_Q2[], /* O Residual signal [length] */
const opus_int16 coef_Q13[], /* I Coefficients [order] */
const opus_int16 input[], /* I Input signal [length] */
const opus_int16 lambda_Q16, /* I Warping factor */
const opus_int length, /* I Length of input signal */
const opus_int order /* I Filter order (even) */
);
#if !defined(OVERRIDE_silk_warped_LPC_analysis_filter_FIX)
#define silk_warped_LPC_analysis_filter_FIX(state, res_Q2, coef_Q13, input, lambda_Q16, length, order, arch) \
((void)(arch),silk_warped_LPC_analysis_filter_FIX_c(state, res_Q2, coef_Q13, input, lambda_Q16, length, order))
#endif
#if !defined(OPUS_X86_MAY_HAVE_SSE4_1)
#endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment