shithub: aacenc

Download patch

ref: 0e4e9fe8c992de39251d2bbb013cee3278a62a50
parent: 590521f8c2da89fa1bd1a4a67bf80e91a008d36d
author: menno <menno>
date: Mon Feb 7 14:13:54 EST 2000

One step closer to window shape switching

--- a/aac_qc.h
+++ b/aac_qc.h
@@ -58,6 +58,7 @@
     [MAX_SHORT_IN_LONG_BLOCK];          /* Length (in windows) of each window group */
   int common_scalefac;                  /* Global gain */
   Window_shape window_shape;            /* Window shape parameter */
+  Window_shape prev_window_shape;       /* Previous window shape parameter */
   short pred_global_flag;               /* Global prediction enable flag */
   int pred_sfb_flag[SFB_NUM_MAX];       /* Prediction enable flag for each scalefactor band */
   int reset_group_number;               /* Prediction reset group number */
--- a/enc_tf.c
+++ b/enc_tf.c
@@ -172,7 +172,7 @@
 	/* initialize psychoacoustic module */
 	EncTf_psycho_acoustic_init();
 
-	winSwitchInit(max_ch);
+//	winSwitchInit(max_ch);
 
 	/* initialize spectrum processing */
 	/* initialize quantization and coding */
@@ -188,8 +188,10 @@
 	for (chanNum=0;chanNum<MAX_TIME_CHANNELS;chanNum++) {
 		nok_init_lt_pred (&nok_lt_status[chanNum]);
 		quantInfo[chanNum].ltpInfo = &nok_lt_status[chanNum];  /* Set pointer to LTP data */
+		quantInfo[chanNum].prev_window_shape = WS_SIN;
 	}
-        make_MDCT_windows();
+
+	make_MDCT_windows();
 }
 
 /*****************************************************************************************
@@ -403,6 +405,7 @@
 		for (chanNum=0;chanNum<max_ch;chanNum++) {
 
 			/* Set window shape paremeter in quantInfo */
+			quantInfo[chanNum].prev_window_shape = quantInfo[chanNum].window_shape;
 //			quantInfo[chanNum].window_shape = WS_KBD;
 			quantInfo[chanNum].window_shape = WS_SIN;
 
@@ -468,9 +471,8 @@
 				spectral_line_vector[chanNum],
 				overlap_buffer[chanNum],
 				block_type[chanNum],
-//				quantInfo[chanNum].window_shape,
-                                WS_SIN,
-                                WS_SIN,
+				quantInfo[chanNum].window_shape,
+				quantInfo[chanNum].prev_window_shape,
 				MOVERLAPPED
 				);