shithub: aacenc

Download patch

ref: daa08cf276b1bd1d61d18e171ccc80449ff0ed04
parent: cd5b5533945a4b861d2f41ff7743d577d8026c13
author: thebard <thebard>
date: Tue Feb 22 13:54:44 EST 2000

Macroized double_to_int. Shaved off a few seconds (avoided all the function call overhead)

--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@
 
 CC=gcc
 
-#PROFILE_OPTS = -pg -a
+#PROFILE_OPTS = -g -pg -a
 
 CC_OPTS=-DHAS_ULONG $(CFLAGS) $(PROFILE_OPTS)
 LD_OPTS=
--- a/nok_ltp_enc.c
+++ b/nok_ltp_enc.c
@@ -34,9 +34,9 @@
 /**************************************************************************
   Version Control Information			Method: CVS
   Identifiers:
-  $Revision: 1.7 $
-  $Date: 2000/02/18 09:19:16 $ (check in)
-  $Author: lenox $
+  $Revision: 1.8 $
+  $Date: 2000/02/22 18:54:44 $ (check in)
+  $Author: thebard $
   *************************************************************************/
 
 
@@ -65,7 +65,12 @@
   *************************************************************************/
 #include "nok_ltp_common_internal.h"
 
-short double_to_int (double sig_in);
+/* short double_to_int (double sig_in); */
+#define double_to_int(sig_in) \
+  ((sig_in) > 32767 ? 32767 : (\
+    (sig_in) < -32768 ? -32768 : (\
+      (sig_in) > 0.0 ? (sig_in)+0.5 : (\
+        (sig_in) <= 0.0 ? (sig_in)-0.5 : 0))))
 
 
 /**************************************************************************
@@ -484,7 +489,7 @@
   Author(s):	Juha Ojanpera
   *************************************************************************/
 
-short
+/*short
 double_to_int (double sig_in)
 {
 	short sig_out;
@@ -500,4 +505,4 @@
 
 	return (sig_out);
 }
-
+*/
--- a/profiling.txt
+++ b/profiling.txt
@@ -21,9 +21,30 @@
 thebard
 CVS Tue Feb 22 11:04:16 CST 2000
 -O6 -march=i686 -funroll-loops -finline-functions -fomit-frame-pointer
-
+10 min, 47.88 sec.
 The Outfield Bangin': track 2: Bangin' On My Heart
 This is the default fully optimized non profiled compile on my box.
 NO PROFILE DATA
 
-
+------------------------------------------------------------------------------
+thebard
+CVS Tue Feb 22 11:04:16 CST 2000
+-O6 -march=i686 -funroll-loops -finline-functions -g -pg -a
+11 min, 12.98 sec.
+The Outfield Bangin': track 2: Bangin' On My Heart
+This is the default fully optimized, profiled compile on my box.
+Each sample counts as 0.01 seconds.
+  %   cumulative   self              self     total           
+ time   seconds   seconds    calls  us/call  us/call  name    
+ 58.80    385.25   385.25    41048  9385.35  9385.35  psy_step6
+  3.92    410.93    25.68    41048   625.61   625.61  psy_step14
+  3.91    436.53    25.60    41048   623.66   623.66  psy_step11andahalf
+  3.72    460.87    24.34    20524  1185.93  1787.90  psy_step2
+  3.01    480.59    19.72    20524   960.83  2928.46  tf_encode_spectrum_aac
+  2.53    497.14    16.55    41048   403.19 13119.15  EncTf_psycho_acoustic
+  2.17    511.39    14.25    19506   730.54   730.54  estimate_delay
+  2.13    525.32    13.93    20524   678.72   678.72  psy_step4
+  2.02    538.53    13.21 22839582     0.58     0.61  output_bits
+  1.40    547.73     9.20    41104   223.82   223.98  calc_noise
+  1.17    555.37     7.64    41048   186.12   186.12  psy_step9
+  1.09    562.53     7.16 42029056     0.17     0.17  double_to_int