shithub: aacenc

Download patch

ref: 7e899b5d0cce717b5aa17bd671efc331ee61c0a1
parent: ff3bc1e0556250eb20f3cb67cf573666e2458c1e
author: menno <menno>
date: Thu Aug 10 16:03:47 EDT 2000

bugfix

--- a/ms.c
+++ b/ms.c
@@ -275,7 +275,8 @@
 					for(sfb=0; sfb< quantInfo[chanNum].max_sfb; sfb++ ) {
 						/* calculate scale factor band energy */
 						int width,i;
-						energy[chanNum][bandNumber] = 0.0;
+						energy[leftChan][bandNumber] = 0.0;
+						energy[rightChan][bandNumber] = 0.0;
 						width=sfb_width_table[chanNum][sfb];
 						for(i=offset; i<(offset+width); i++ ) {
 							if ((p_use_ms[sfb]||(use_ms==1))&&(use_ms!=-1)) {
--- a/psych.c
+++ b/psych.c
@@ -1350,10 +1350,10 @@
 	
 	for (i=0; i < MAX_SHORT_WINDOWS; i++) {
 		estot[i]=0;
-		for ( b = 0; b < BLOCK_LEN_SHORT; b++)
+		for ( b = 0; b < NPART_SHORT; b++)
 			estot[i] += psy_var_short->e[i][b];
 		if (estot[i] != 0.0)
-			estot[i] /= BLOCK_LEN_SHORT;
+			estot[i] /= NPART_SHORT;
 	}
 
 	tot = mx = estot[0];