shithub: opus

Download patch

ref: 688bb91ba83f7d57a2c5649e9751c5c667bea8ca
parent: daa6a1c1cc2ecdcc5f3341e78285a0ae6a90792d
author: Siarhei Volkau <lis8215@gmail.com>
date: Sun Aug 17 13:53:43 EDT 2025

MIPS DSP: fix renormalise_vector signature

Looks like MIPS port is abandoned? Not surprised though.

There's a lot of updates for mdct too, will be addressed
in another patch.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
Signed-off-by: Jean-Marc Valin <jeanmarcv@google.com>

--- a/celt/mips/vq_mipsr1.h
+++ b/celt/mips/vq_mipsr1.h
@@ -64,7 +64,7 @@
 }
 
 #define OVERRIDE_renormalise_vector
-void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch)
+void renormalise_vector(celt_norm *X, int N, opus_val32 gain, int arch)
 {
    int i;
 #ifdef FIXED_POINT
@@ -102,7 +102,7 @@
    k = celt_ilog2(E)>>1;
 #endif
    t = VSHR32(E, 2*(k-7));
-   g = MULT16_16_P15(celt_rsqrt_norm(t),gain);
+   g = MULT32_32_Q31(celt_rsqrt_norm(t),gain);
 
    xptr = X;
    for (i=0;i<N;i++)
--