[FFmpeg-soc] [soc]: r4039 - amr/amrnbfloatdata.h

kmalaussene subversion at mplayerhq.hu
Tue Feb 10 23:57:29 CET 2009


Author: kmalaussene
Date: Tue Feb 10 23:57:29 2009
New Revision: 4039

Log:
Use FF_ARRAY_ELEMS instead of harcoding the number of elements in order_MODE_*.

Modified:
   amr/amrnbfloatdata.h

Modified: amr/amrnbfloatdata.h
==============================================================================
--- amr/amrnbfloatdata.h	Tue Feb 10 23:32:12 2009	(r4038)
+++ amr/amrnbfloatdata.h	Tue Feb 10 23:57:29 2009	(r4039)
@@ -50,19 +50,6 @@ enum Mode {
     N_MODES     // number of modes
 };
 
-// number of bits for each mode
-static const uint8_t mode_bits[N_MODES] = {
-    95,  // MODE_475
-    103, // MODE_515
-    118, // MODE_59
-    134, // MODE_67
-    148, // MODE_74
-    159, // MODE_795
-    204, // MODE_102
-    244, // MODE_122
-    35   // MODE_DTX
-};
-
 // declaration of received frame types
 enum RXFrameType {
     RX_SPEECH_GOOD = 0,
@@ -287,6 +274,19 @@ static const AMROrder order_MODE_DTX[35]
 { 4, 2}, { 4, 1}, { 4, 0}
 };
 
+// number of bits for each mode
+static const uint8_t mode_bits[N_MODES] = {
+    FF_ARRAY_ELEMS(order_MODE_475),
+    FF_ARRAY_ELEMS(order_MODE_515),
+    FF_ARRAY_ELEMS(order_MODE_59),
+    FF_ARRAY_ELEMS(order_MODE_67),
+    FF_ARRAY_ELEMS(order_MODE_74),
+    FF_ARRAY_ELEMS(order_MODE_795),
+    FF_ARRAY_ELEMS(order_MODE_102),
+    FF_ARRAY_ELEMS(order_MODE_122),
+    FF_ARRAY_ELEMS(order_MODE_DTX)
+};
+
 
 /**
  * Initialize values for the lsp vector from the 4th subframe of the



More information about the FFmpeg-soc mailing list