Commit f5b0587b by Jean-Marc Valin

### s/ROUND/ROUND16/

parent 83006eec
 ... ... @@ -170,7 +170,7 @@ typedef float celt_mask_t; #define SHL(a,shift) (a) #define SATURATE(x,a) (x) #define ROUND(a,shift) (a) #define ROUND16(a,shift) (a) #define HALF32(x) (.5f*(x)) #define ADD16(a,b) ((a)+(b)) ... ...
 ... ... @@ -174,7 +174,7 @@ static inline int SHL32(long long a, int shift) #define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) #define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) #define ROUND(x,a) (EXTRACT16(PSHR32((x),(a)))) #define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a)))) #define HALF32(x) (SHR32(x,1)) //#define SHR(a,shift) ((a) >> (shift)) ... ...
 ... ... @@ -90,7 +90,7 @@ #define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x))) /** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */ #define ROUND(x,a) (EXTRACT16(PSHR32((x),(a)))) #define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a)))) /** Divide by two */ #define HALF32(x) (SHR32(x,1)) ... ...
 ... ... @@ -166,7 +166,7 @@ void find_spectral_pitch(kiss_fftr_cfg fft, const struct PsyDecay *decay, const celt_word32_t tmp; /*printf ("%d %d ", X[2*i]*X[2*i]+X[2*i+1]*X[2*i+1], Y[2*i]*Y[2*i]+Y[2*i+1]*Y[2*i+1]);*/ /*n = DIV32_16(Q15ONE,celt_sqrt(EPSILON+curve[i]));*/ n = ROUND(celt_rcp(celt_sqrt(EPSILON+curve[i])),16); n = ROUND16(celt_rcp(celt_sqrt(EPSILON+curve[i])),16); /*printf ("%f ", n);*/ tmp = X[2*i]; X[2*i] = MULT16_32_Q15(n, ADD32(MULT16_16(X[2*i ],Y[2*i ]), MULT16_16(X[2*i+1],Y[2*i+1]))); ... ...
 ... ... @@ -64,7 +64,7 @@ static inline celt_ener_t dB2Amp(celt_ener_t dB) static inline celt_word16_t amp2dB(celt_ener_t amp) { /* equivalent to return 6.0207*log2(.3+amp) */ return ROUND(MULT16_16(24661,celt_log2(ADD32(QCONST32(.3f,14),amp))),12); return ROUND16(MULT16_16(24661,celt_log2(ADD32(QCONST32(.3f,14),amp))),12); /* return DB_SCALING*20*log10(.3+ENER_SCALING_1*amp); */ } #else ... ...
 ... ... @@ -71,7 +71,7 @@ static void mix_pitch_and_residual(int *iy, celt_norm_t *X, int N, int K, const the encoded (int) one */ for (i=0;inbest[Lupdate-1]->score) { ... ... @@ -378,7 +378,7 @@ void intra_prediction(celt_norm_t *x, celt_mask_t *W, int N, int K, celt_norm_t xy = MAC16_16(xy, x[j], Y[i+N-j-1]); yy = MAC16_16(yy, Y[i+N-j-1], Y[i+N-j-1]); } score = DIV32(MULT16_16(ROUND(xy,14),ROUND(xy,14)), ROUND(yy,14)); score = DIV32(MULT16_16(ROUND16(xy,14),ROUND16(xy,14)), ROUND16(yy,14)); if (score > best_score) { best_score = score; ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!