[FFmpeg-soc] [soc]: r1965 - aac/aac.c

andoma subversion at mplayerhq.hu
Wed Mar 5 13:42:29 CET 2008


Author: andoma
Date: Wed Mar  5 13:42:28 2008
New Revision: 1965

Log:
Move LTP_ROUND() close to where it's used. 

Part of LTP conditional compilation.



Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Wed Mar  5 13:42:28 2008
@@ -351,20 +351,6 @@ static void vector_fmul_add_add_add(AACC
         dst[i] += src3[i];
 }
 
-static inline int16_t LTP_ROUND(float x) {
-    if (x >= 0)
-    {
-        if (x >= 1.0f)
-            return 32767;
-    } else {
-        if (x <= -1.0f)
-            return -32768;
-    }
-
-    return lrintf(32768 * x);
-}
-
-
 // aux
 /**
  * Generate a sine Window.
@@ -1798,6 +1784,24 @@ static void ltp_trans(AACContext * ac, s
     }
 }
 
+
+/**
+ * @todo: Replace this with float_to_int16()
+ */
+static inline int16_t LTP_ROUND(float x) {
+    if (x >= 0)
+    {
+        if (x >= 1.0f)
+            return 32767;
+    } else {
+        if (x <= -1.0f)
+            return -32768;
+    }
+
+    return lrintf(32768 * x);
+}
+
+
 static void ltp_update_trans(AACContext * ac, sce_struct * sce) {
     int i;
     if (sce->ltp_state == NULL)



More information about the FFmpeg-soc mailing list