[FFmpeg-soc] [soc]: r1513 - in amr: amrnbfloatdata.h amrnbfloatdec.c

superdump subversion at mplayerhq.hu
Tue Dec 4 01:45:21 CET 2007


Author: superdump
Date: Tue Dec  4 01:45:21 2007
New Revision: 1513

Log:
Add missing definitions and use a definition instead of a constant


Modified:
   amr/amrnbfloatdata.h
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdata.h
==============================================================================
--- amr/amrnbfloatdata.h	(original)
+++ amr/amrnbfloatdata.h	Tue Dec  4 01:45:21 2007
@@ -1800,6 +1800,9 @@ static const float b60[61] = {
 
 // fixed tables
 
+#define TRACKS          5
+#define TRACKS_MODE_102 4
+
 // track start positions for algebraic code book routines
 static const uint8_t track_position[16] = { 0, 2, 0, 3, 0, 2, 0, 3, 1, 3, 2, 4, 1, 4, 1, 4 };
 

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	(original)
+++ amr/amrnbfloatdec.c	Tue Dec  4 01:45:21 2007
@@ -779,10 +779,10 @@ static void decode_10_pulses_35bits(int1
     // the positions and signs are explicitly coded in MODE_122
 
     // reconstruct the fixed code
-    for(i=0; i<5; i++) {
-        pos1 = gray_decode[fixed_index[i  ] & 7]*5 + i; // ith pulse position
+    for(i=0; i<TRACKS; i++) {
+        pos1 = gray_decode[fixed_index[i  ] & 7]*TRACKS + i; // ith pulse position
         sign = (fixed_index[i] & 8) ? -1.0 : 1.0; // sign of ith pulse
-        pos2 = gray_decode[fixed_index[i+5] & 7]*5 + i; // i+5th pulse position
+        pos2 = gray_decode[fixed_index[i+5] & 7]*TRACKS + i; // i+5th pulse position
         // assign the ith pulse (+/-1) to its appropriate position
         fixed_vector[pos1] = sign;
         // sign of i+5th pulse is relative to sign of ith pulse



More information about the FFmpeg-soc mailing list