ref: 620e716b764eb643e0a376f64f55448ad9447eb2
parent: 6bdc53b86fc883c0fe63d6e15486eb515d453ce0
author: Jean-Marc Valin <[email protected]>
date: Fri Jan 21 13:41:48 EST 2011
Defining merge_stereo() when S==-M or S==M
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -346,10 +346,12 @@
mid2 = SHR32(mid, 1);
El = MULT16_16(mid2, mid2) + side - 2*xp;
Er = MULT16_16(mid2, mid2) + side + 2*xp;
- if (Er < EPSILON)
- Er = EPSILON;
- if (El < EPSILON)
- El = EPSILON;
+ if (Er < QCONST32(6e-4f, 28) || El < QCONST32(6e-4f, 28))
+ {
+ for (j=0;j<N;j++)
+ Y[j] = X[j];
+ return;
+ }
#ifdef FIXED_POINT
kl = celt_ilog2(El)>>1;