********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id$
********************************************************************/
for (i = 0, x = 0.f;; i++, x += 1.f) {
lo = b[i] >> 16;
- if( lo>=0 ) break;
hi = b[i] & 0xffff;
+ if( lo>=0 ) break;
+ if( hi>=n ) break;
tN = N[hi] + N[-lo];
tX = X[hi] - X[-lo];
int start = (vi->normal_p ? vi->normal_start-i : n);
if(start>n)start=n;
+ /* force classic behavior where only energy in the current band is considered */
+ acc=0.f;
+
/* still responsible for populating *out where noise norm not in
effect. There's no need to [re]populate *q in these areas */
for(j=0;j<start;j++){
int limit = g->coupling_pointlimit[p->vi->blockflag][blobno];
float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]];
float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]];
+#if 0
float de=0.1*p->m_val; /* a blend of the AoTuV M2 and M3 code here and below */
+#endif
/* mdct is our raw mdct output, floor not removed. */
/* inout passes in the ifloor, passes back quantized result */
reM[j] += reA[j];
qeM[j] = fabs(reM[j]);
}else{
+#if 0
/* AoTuV */
/** @ M2 **
The boost problem by the combination of noise normalization and point stereo is eased.
by Aoyumi @ 2004/04/18
*/
float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit)));
-
/* elliptical */
if(reM[j]+reA[j]<0){
reM[j] = - (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
}else{
reM[j] = (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
}
+#else
+ /* elliptical */
+ if(reM[j]+reA[j]<0){
+ reM[j] = - (qeM[j] = fabs(reM[j])+fabs(reA[j]));
+ }else{
+ reM[j] = (qeM[j] = fabs(reM[j])+fabs(reA[j]));
+ }
+#endif
+
}
reA[j]=qeA[j]=0.f;
fA[j]=1;