shithub: aacenc

Download patch

ref: 0eed37002e2fdf7a89c034efa1f4d5a397e213e2
parent: 4275e773a2a41b48184b75367feabb374b066df7
author: lenox <lenox>
date: Mon Jan 24 12:18:27 EST 2000

removed unneeded stuff for LTP off

--- a/enc_tf.c
+++ b/enc_tf.c
@@ -243,13 +243,14 @@
 		/* store input data in look ahead buffer which may be necessary for the window switching decision */
 		int i;
 		int chanNum;
-		
+
 		for (chanNum=0;chanNum<max_ch;chanNum++) {
-			for( i=0; i<block_size_samples; i++ ) {
+                        if(as->use_LTP)
+			   for( i=0; i<block_size_samples; i++ ) {
 				/* temporary fix: a linear buffer for LTP containing the whole time frame */
 				nok_tmp_DTimeSigBuf[chanNum][i] = DTimeSigBuf[chanNum][i];
 				nok_tmp_DTimeSigBuf[chanNum][block_size_samples + i] = DTimeSigLookAheadBuf[chanNum][i];
-			}
+			   }
 			for( i=0; i<block_size_samples; i++ ) {
 				/* last frame input data are encoded now */
 				DTimeSigBuf[chanNum][i] = DTimeSigLookAheadBuf[chanNum][i];
@@ -332,7 +333,7 @@
 
 	/******************************************************************************************************************************
 	*
-	* block_switch processing 
+	* block_switch processing
 	*
 	******************************************************************************************************************************/
 	{
@@ -708,16 +709,17 @@
 		/**********************************************************/
 		/* Update LTP history buffer                              */
 		/**********************************************************/
-		for (chanNum=0;chanNum<max_ch;chanNum++) {
-			nok_ltp_reconstruct(reconstructed_spectrum[chanNum], 
-				block_type[chanNum], 
+		if(as->use_LTP)
+                  for (chanNum=0;chanNum<max_ch;chanNum++) {
+			nok_ltp_reconstruct(reconstructed_spectrum[chanNum],
+				block_type[chanNum],
 				WS_FHG, block_size_samples,
 				block_size_samples/2,
-				block_size_samples/short_win_in_long, 
-				&sfb_offset_table[chanNum][0], 
+				block_size_samples/short_win_in_long,
+				&sfb_offset_table[chanNum][0],
 				nr_of_sfb[chanNum],
 				&nok_lt_status[chanNum]);
-		}
+   		  }
 
 		/**********************************/
 		/* Write out all encoded channels */