[FFmpeg-soc] [soc]: r4934 - amr/amrnbdata.h

cmcq subversion at mplayerhq.hu
Tue Aug 4 01:03:53 CEST 2009


Author: cmcq
Date: Tue Aug  4 01:03:53 2009
New Revision: 4934

Log:
Remove some duplication in the bit order macros

Modified:
   amr/amrnbdata.h

Modified: amr/amrnbdata.h
==============================================================================
--- amr/amrnbdata.h	Mon Aug  3 23:53:22 2009	(r4933)
+++ amr/amrnbdata.h	Tue Aug  4 01:03:53 2009	(r4934)
@@ -106,10 +106,11 @@ typedef struct {
 // The following order* tables are used to convert AMR frame parameters to and
 // from a bitstream. See 3GPP TS 26.101 for more information.
 
+#define AMR_BIT(field, bit)                  {offsetof(AMRNBFrame, field) >> 1, bit}
 /** Specify an LSF parameter bit */
-#define AMR_LSF(variable, bit) {offsetof(AMRNBFrame, lsf[variable]) >> 1, bit}
+#define AMR_LSF(variable, bit)               AMR_BIT(lsf[variable], bit)
 /** Specify a subframe-specific bit */
-#define AMR_OF(frame_num, variable, bit) {offsetof(AMRNBFrame, subframe[frame_num].variable)>>1, bit}
+#define AMR_OF(frame_num, variable, bit)     AMR_BIT(subframe[frame_num].variable, bit)
 /** Specify a pitch gain bit */
 #define AMR_PGAIN(frame_num, bit)            AMR_OF(frame_num, p_gain, bit)
 /** Specify a fixed gain bit */


More information about the FFmpeg-soc mailing list