mp4FastAAClib.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. /************************* Fast MPEG AAC Audio Encoder **********************
  2. (C) Copyright Fraunhofer IIS (2004-2010)
  3. All Rights Reserved
  4. $Id: mp4FastAAClib.h,v 1.8 2013/10/29 00:56:15 dromagod Exp $
  5. Initial author: M. Schug / A. Groeschel
  6. contents/description: Fast MPEG AAC Encoder Interface Library Functions
  7. This software and/or program is protected by copyright law and international
  8. treaties. Any reproduction or distribution of this software and/or program,
  9. or any portion of it, may result in severe civil and criminal penalties, and
  10. will be prosecuted to the maximum extent possible under law.
  11. ******************************************************************************/
  12. #ifndef _mp4FastAAClib_h_
  13. #define _mp4FastAAClib_h_
  14. #ifdef __cplusplus
  15. extern "C"
  16. {
  17. #endif
  18. /* ------------------------ structure alignment ---------------------------*/
  19. #if defined(WIN32) || defined(WIN64)
  20. #pragma pack(push, 1)
  21. #endif
  22. /*-------------------------- defines --------------------------------------*/
  23. /*
  24. * calling convention
  25. */
  26. #ifndef MPEG4ENCAPI
  27. #if defined(WIN32) || defined(WIN64)
  28. #define MPEG4ENCAPI __stdcall
  29. #else
  30. #define MPEG4ENCAPI
  31. #endif
  32. #endif
  33. /*-------------------- enum definitions -----------------------------------*/
  34. typedef enum
  35. {
  36. AUD_OBJ_TYP_LC = 2, /* AAC LC */
  37. AUD_OBJ_TYP_LTP = 4, /* AAC LTP */
  38. AUD_OBJ_TYP_HEAAC = 5, /* AAC LC + SBR */
  39. AUD_OBJ_TYP_ER_LC = 17, /* ER AAC LC */
  40. AUD_OBJ_TYP_ER_LTP = 19, /* ER AAC LTP */
  41. AUD_OBJ_TYP_ER_SCAL = 20, /* ER AAC LC scalable */
  42. AUD_OBJ_TYP_PS = 29, /* AAC LC + SBR + PS */
  43. AUD_OBJ_TYP_MP2_LC = 129, /* virtual AOT MP2 Low Complexity Profile */
  44. AUD_OBJ_TYP_MP2_SBR = 132, /* virtual AOT MP2 Low Complexity Profile with SBR */
  45. AUD_OBJ_TYP_SBR_DS = 133, /* virtual AOT for downsampled SBR */
  46. AUD_OBJ_TYP_ER_SCAL_SBR = 148, /* ER AAC LC scalable + SBR */
  47. AUD_OBJ_TYP_ER_SCAL_SBR_PS = 157, /* ER AAC LC scalable + SBR + PS */
  48. AUD_OBJ_TYP_MPS = 30
  49. } AUD_OBJ_TYP;
  50. typedef enum {
  51. MP4_QUAL_FAST=0,
  52. MP4_QUAL_MEDIUM,
  53. MP4_QUAL_HIGH,
  54. MP4_QUAL_HIGHEST /* Always resample to preferred sample rate */
  55. } MPEG4ENC_QUALITY;
  56. typedef enum {
  57. MP4_TT_RAW = 0,
  58. MP4_TT_ADIF = 1,
  59. MP4_TT_ADTS = 2,
  60. MP4_TT_ADTSCRC = 3,
  61. MP4_TT_LOAS = 4,
  62. MP4_TT_LOAS_NOSMC = 5,
  63. MP4_TT_LATM = 6,
  64. MP4_TT_LATM_NOSMC = 7,
  65. /* MP4_TT_LOAS_CRC = 8, */
  66. /* MP4_TT_LATM_CRC = 9, */
  67. ___mp4_tt_dummy
  68. } MPEG4ENC_TRANSPORT_TYPE;
  69. typedef enum {
  70. /* These are the standard MPEG Channel mappings */
  71. MP4_CH_MODE_INVALID = 0,
  72. MP4_CH_MODE_MONO, /* 1 channel mono */
  73. MP4_CH_MODE_STEREO, /* 2 channel stereo */
  74. MP4_CH_MODE_3, /* 3 channel audio ( center + left/right front speaker ) */
  75. MP4_CH_MODE_4, /* 4 channel audio ( center + left/right front + rear surround speaker ) */
  76. MP4_CH_MODE_5, /* 5 channel audio ( center + left/right front + left/right surround speaker ) */
  77. MP4_CH_MODE_5_1, /* 5.1 channel audio ( center + left/right front + left/right surround speaker + LFE ) */
  78. MP4_CH_MODE_7_1, /* 7.1 channel audio ( center + left/right front
  79. + left/right outside front + left/right surround speaker + LFE ) */
  80. /* Channel mappings 8 to 15 are reserved */
  81. MP4_CH_MODE_6_1 = 11, /* 6.1 channel audio ( center + front left/right + surround left/right + rear surround center + LFE ) */
  82. MP4_CH_MODE_7_1_REAR_SURROUND = 12, /* 7.1 channel audio ( center + front left/right + surround left/right + rear surround left/right + LFE ) */
  83. MP4_CH_MODE_7_1_TOP_FRONT = 14, /* 7.1 channel audio ( center + front left/right + surround left/right + LFE + + TOP front left/right ) */
  84. /* Some non standard channel mappings */
  85. MP4_CH_MODE_DUAL_MONO = 16, /* 2 independent channels */
  86. MP4_CH_MODE_4TIMES1, /* 4 independent channels */
  87. MP4_CH_MODE_6TIMES1, /* 6 independent channels */
  88. MP4_CH_MODE_8TIMES1, /* 8 independent channels */
  89. MP4_CH_MODE_12TIMES1, /* 12 independent channels */
  90. MP4_CH_MODE_16TIMES1,
  91. MP4_CH_MODE_2TIMES2, /* 2 stereo channel pairs */
  92. MP4_CH_MODE_3TIMES2, /* 3 stereo channel pairs */
  93. MP4_CH_MODE_4TIMES2, /* 4 stereo channel pairs */
  94. MP4_CH_MODE_6TIMES2, /* 6 stereo channel pairs */
  95. MP4_CH_MODE_7_1_SIDE_CHANNEL = 32, /* 7.1 channel audio ( center + left/right front
  96. + left/right side channels + left/right surround speakers + LFE ) */
  97. MP4_CH_MODE_7_1_FRONT_CENTER, /* 7.1 channel audio ( center + left/right front
  98. + left/right frontal center speakers + left/right surround speakers + LFE ) */
  99. /* Channel mapping for parametric stereo
  100. (only works with AUD_OBJ_TYP_HEAAC, AUD_OBJ_TYP_PS) */
  101. MP4_CH_MODE_PARAMETRIC_STEREO = 64, /* 2 channel stereo input, transmit 1 channel mono + SBR + PS */
  102. MP4_CH_MODE_MPEGS_5x5 = 128, /* 6 channel input, transmit 1/2 channel(s) (+ SBR) + MPEGS Payload */
  103. #ifdef SUPPORT_UPMIX
  104. MP4_CH_MODE_MPEGS_SXPRO_UPMIX, /* 2 channel input, sxPro Upmix, transmit 2 channel(s) (+ SBR) + MPEGS Payload */
  105. #endif
  106. #ifdef SUPPORT_MPS_7_X_7
  107. MP4_CH_MODE_MPEGS_7x7_REAR_SURROUND, /* 8 channel input (5.1 + left/right side speakers), transmit 2 channel(s) (+ SBR) + MPEGS Payload */
  108. /* 7.1 front center channel mapping is not yet supported! */
  109. MP4_CH_MODE_MPEGS_7x7_FRONT_CENTER, /* 8 channel input (5.1 + left/right frontal center speakers), transmit 2 channel(s) (+ SBR) + MPEGS Payload */
  110. #ifdef SUPPORT_MPS_7_5_7
  111. MP4_CH_MODE_MPEGS_757_FRONT_CENTER, /* 8 channel input (5.1 + left/right frontal center speakers), transmit 5 channel(s) (+ SBR) + MPEGS Payload */
  112. MP4_CH_MODE_MPEGS_757_REAR_SURROUND, /* 8 channel input (5.1 + left/right side speakers), transmit 5 channel(s) (+ SBR) + MPEGS Payload */
  113. #endif /* SUPPORT_MPS_7_5_7 */
  114. #endif /* SUPPORT_MPS_7_X_7 */
  115. /* The following channel mappings are not yet supported! */
  116. MP4_CH_MODE_MPEGS_5x5_BLIND,
  117. MP4_CH_MODE_MPEGS_ARBITRARY_DOWNMIX_MONO, /* 7 channel input, transmit 1 channel (+ SBR) + MPEGS Payload */
  118. MP4_CH_MODE_MPEGS_ARBITRARY_DOWNMIX_STEREO /* 8 channel input, transmit 2 channel(s) (+ SBR) + MPEGS Payload */
  119. } MPEG4ENC_CH_MODE;
  120. typedef enum {
  121. MP4_MPEGS_DOWNMIX_DEFAULT = 0,
  122. /* The following config (FORCE_STEREO) is not yet supported! */
  123. MP4_MPEGS_DOWNMIX_FORCE_STEREO,
  124. MP4_MPEGS_DOWNMIX_MATRIX_COMPAT,
  125. /* The following configs are not yet supported! */
  126. MP4_MPEGS_DOWNMIX_ARBITRARY_MONO,
  127. MP4_MPEGS_DOWNMIX_ARBITRARY_STEREO
  128. #ifdef SUPPORT_MPS_7_5_7
  129. , MP4_MPEGS_DOWNMIX_51
  130. #endif /* SUPPORT_MPS_7_5_7 */
  131. } MPEG4ENC_MPEGS_DOWNMIX_CONFIG;
  132. typedef enum {
  133. MPEG4ENC_NO_ERROR = 0,
  134. MPEG4ENC_UNKNOWN_ERROR,
  135. MPEG4ENC_PARAM_ERROR,
  136. MPEG4ENC_NOTIMPLEMENTED_ERROR,
  137. MPEG4ENC_MEMORY_ERROR,
  138. MPEG4ENC_INIT_ERROR,
  139. MPEG4ENC_FATAL_ERROR,
  140. MPEG4ENC_STACK_ALIGNMENT_ERROR,
  141. MPEG4ENC_METADATA_ERROR,
  142. MPEG4ENC_AOT_NOT_SUPPORTED = 64,
  143. MPEG4ENC_CHMODE_NOT_SUPPORTED,
  144. MPEG4ENC_BRMODE_NOT_SUPPORTED,
  145. MPEG4ENC_WARNING_MIN = 128,
  146. MPEG4ENC_WARNING_STACK_ALIGNMENT = MPEG4ENC_WARNING_MIN,
  147. MPEG4ENC_WARNING_METADATA,
  148. MPEG4ENC_WARNING_NOSYNC_TRIGGERED
  149. } MPEG4ENC_ERROR;
  150. typedef enum {
  151. MP4_SBRSIG_IMPLICIT = 0, /* implicit signaling (signaling 1) */
  152. MP4_SBRSIG_EXPL_BC = 1, /* explicit backward compatible signaling (signaling 2.B.) */
  153. MP4_SBRSIG_EXPL_HIER = 2 /* explicit hierarchical signaling (signaling 2.A.) */
  154. } MPEG4ENC_SIGNALING_MODE;
  155. typedef enum {
  156. MP4_MPEGS_PAYLOAD_EMBED = 0, /* in case of MPEG-4 transportation, embed payload into AAC payload */
  157. MP4_MPEGS_NO_PAYLOAD_EMBED = 1, /* in case of MPEG-4 transportation, do *not* embed payload into AAC payload, but transport payload in extra stream */
  158. MP4_MPEGS_PAYLOAD_EMBED_ASCEXT = 2 /* M16117 */
  159. } MPEG4ENC_MPEGS_PAYLOAD_MODE;
  160. typedef enum {
  161. MP4_BR_MODE_CBR = 0,
  162. MP4_BR_MODE_VBR_1 = 1,
  163. MP4_BR_MODE_VBR_2 = 2,
  164. MP4_BR_MODE_VBR_3 = 3,
  165. MP4_BR_MODE_VBR_4 = 4,
  166. MP4_BR_MODE_VBR_5 = 5,
  167. MP4_BR_MODE_VBR_6 = 6,
  168. MP4_BR_MODE_SFR = 7, /* Superframing */
  169. MP4_BR_MODE_DABPLUS = 8, /* Superframing + DAB+ constraints */
  170. MP4_BR_MODE_DRMPLUS = 9, /* Superframing + DRM+ constraints */
  171. MP4_BR_MODE_DMB = 10
  172. } MPEG4ENC_BITRATE_MODE;
  173. typedef enum{
  174. MP4_GRANULE_960 = 960,
  175. MP4_GRANULE_1024 = 1024
  176. } MPEG4ENC_GRANULE_LEN;
  177. typedef enum {
  178. MP4_METADATA_NONE = 0, /* do not embed any metadata */
  179. MP4_METADATA_MPEG, /* embed MPEG defined metadata only */
  180. MP4_METADATA_MPEG_ETSI /* embed all metadata */
  181. } MPEG4ENC_METADATA_MODE;
  182. typedef enum {
  183. MP4_METADATA_DRC_NONE = 0,
  184. MP4_METADATA_DRC_FILMSTANDARD,
  185. MP4_METADATA_DRC_FILMLIGHT,
  186. MP4_METADATA_DRC_MUSICSTANDARD,
  187. MP4_METADATA_DRC_MUSICLIGHT,
  188. MP4_METADATA_DRC_SPEECH,
  189. #ifdef SUPPORT_METADATA_DRC_MOBILE
  190. MP4_METADATA_DRC_MOBILE,
  191. #endif
  192. MP4_METADATA_DRC_EMBED_EXTERN = -1,
  193. MP4_METADATA_DRC_NOT_PRESENT = -2
  194. } MPEG4ENC_METADATA_DRC_PROFILE;
  195. typedef enum {
  196. MPEG4ENC_METADATA_DMX_GAIN_0_dB = 0,
  197. MPEG4ENC_METADATA_DMX_GAIN_1_5_dB = 1,
  198. MPEG4ENC_METADATA_DMX_GAIN_3_dB = 2,
  199. MPEG4ENC_METADATA_DMX_GAIN_4_5_dB = 3,
  200. MPEG4ENC_METADATA_DMX_GAIN_6_dB = 4,
  201. MPEG4ENC_METADATA_DMX_GAIN_7_5_dB = 5,
  202. MPEG4ENC_METADATA_DMX_GAIN_9_dB = 6,
  203. MPEG4ENC_METADATA_DMX_GAIN_INF = 7,
  204. } MPEG4ENC_METADATA_DMX_GAIN;
  205. typedef enum {
  206. MP4_METADATA_DSUR_NOT_INDICATED = 0, /* Dolby Surround mode not indicated */
  207. MP4_METADATA_DSUR_NOT_USED = 1, /* 2-ch audio part is not Dolby surround encoded */
  208. MP4_METADATA_DSUR_IS_USED = 2 /* 2-ch audio part is Dolby surround encoded */
  209. } MPEG4ENC_METADATA_DSUR_IND;
  210. typedef enum { /* see ETSI TS 101 154 V1.11.1, section C.5.2.2.3 and C.5.3 */
  211. MP4_METADATA_DRCPRESENTATION_NOT_INDICATED = 0,
  212. MP4_METADATA_DRCPRESENTATION_MODE_1 = 1,
  213. MP4_METADATA_DRCPRESENTATION_MODE_2 = 2
  214. } MPEG4ENC_METADATA_DRCPRESENTATION;
  215. typedef enum {
  216. MP4_MAX_ASC_SIZE = 64,
  217. MP4_MAX_SMC_SIZE = 256,
  218. MAX_DRC_BANDS = (1<<4),
  219. MP4_MAX_NUM_STREAMS = 2
  220. } MPEG4ENC_DEFINES;
  221. typedef enum {
  222. MPEG4ENC_SYNCFRAME_STARTUP = 0,
  223. MPEG4ENC_SYNCFRAME_SWITCH,
  224. MPEG4ENC_SYNCFRAME_DASH
  225. } MPEG4ENC_SYNCFRAME_TYPES;
  226. typedef enum {
  227. MP4_MPSDMXGAIN_INVALID = -1,
  228. MP4_MPSDMXGAIN_0_dB = 0,
  229. MP4_MPSDMXGAIN_1_5_dB = 1,
  230. MP4_MPSDMXGAIN_3_dB = 2,
  231. MP4_MPSDMXGAIN_4_5_dB = 3,
  232. MP4_MPSDMXGAIN_6_dB = 4,
  233. MP4_MPSDMXGAIN_7_5_dB = 5,
  234. MP4_MPSDMXGAIN_9_dB = 6,
  235. MP4_MPSDMXGAIN_12_dB = 7
  236. } MPEG4ENC_MPS_DMX_GAIN;
  237. #ifdef SUPPORT_UPMIX
  238. typedef enum {
  239. MP4_SXPRO_DEFAULT = 0,
  240. MP4_SXPRO_DRY,
  241. MP4_SXPRO_VIBRANT
  242. } MP4_SXPRO_UPMIX_WORKMODE;
  243. typedef enum {
  244. MP4_SXPRO_LFE_OFF = 0,
  245. MP4_SXPRO_LFE_ON
  246. } MP4_SXPRO_UPMIX_LFE;
  247. #endif
  248. /*-------------------- structure definitions ------------------------------*/
  249. typedef struct {
  250. AUD_OBJ_TYP aot;
  251. int nBitRate;
  252. MPEG4ENC_BITRATE_MODE bitrateMode;
  253. MPEG4ENC_QUALITY quality;
  254. MPEG4ENC_CH_MODE chMode;
  255. int nSampleRateIn;
  256. MPEG4ENC_TRANSPORT_TYPE transportFormat;
  257. MPEG4ENC_SIGNALING_MODE sbrSignaling;
  258. MPEG4ENC_GRANULE_LEN nGranuleLength;
  259. MPEG4ENC_METADATA_MODE metadataMode;
  260. } MPEG4ENC_SETUP;
  261. typedef enum{
  262. MP4_THREADING_MODE_SINGLE = 1,
  263. MP4_THREADING_MODE_MULTIPLE_BLOCKING,
  264. MP4_THREADING_MODE_MULTIPLE_NOBLOCKING
  265. } MPEG4ENC_THREADING_MODE;
  266. typedef MPEG4ENC_SETUP *HANDLE_MPEG4ENC_SETUP;
  267. struct MPEG4ENC_ENCODER;
  268. typedef struct MPEG4ENC_ENCODER * HANDLE_MPEG4ENC_ENCODER;
  269. typedef struct
  270. {
  271. int nOutputStreams; /* number of output streams */
  272. int nAccessUnitsPerStream[MP4_MAX_NUM_STREAMS]; /* number of AUs in bitstream buffer */
  273. int *pnAccessUnitOffset[MP4_MAX_NUM_STREAMS]; /* offset of AUs per stream, i.e. pnAccessUnitOffset[stream][numberAuPerStream] */
  274. int *pByteCnt[MP4_MAX_NUM_STREAMS]; /* lenght of each single AU in bitstream buffer */
  275. int *pIsSync[MP4_MAX_NUM_STREAMS]; /* flag, signaling if AU is self contained i.e. does not contain backward dependencies */
  276. } MPEG4ENC_AUINFO;
  277. typedef struct {
  278. int nAscSizeBits;
  279. unsigned char ascBuffer[MP4_MAX_ASC_SIZE];
  280. } MPEG4ENC_ASCBUF;
  281. typedef struct {
  282. int nSmcSizeBits;
  283. unsigned char smcBuffer[MP4_MAX_ASC_SIZE];
  284. } MPEG4ENC_SMCBUF;
  285. typedef struct
  286. {
  287. float fBandWidth; /* audio bandwidth in Hz */
  288. int nDelay; /* encoder delay in units of sample frames */
  289. int nDelayCore; /* encoder delay in units of sample frames */
  290. int nCbBufSizeMin; /* minimum size of output buffer (bytes) */
  291. int nSyncFrameDelay;
  292. int nBitRate[MP4_MAX_NUM_STREAMS];
  293. int nMaxBitRate[MP4_MAX_NUM_STREAMS];
  294. int nBitResMax[MP4_MAX_NUM_STREAMS];
  295. int nSamplingRate[MP4_MAX_NUM_STREAMS];
  296. int nSamplesFrame[MP4_MAX_NUM_STREAMS];
  297. unsigned int nAncBytesPerFrame;
  298. int aot;
  299. int nValidAsc;
  300. MPEG4ENC_ASCBUF ascBuf[MP4_MAX_NUM_STREAMS];
  301. MPEG4ENC_SMCBUF smcBuf;
  302. int nProfLev;
  303. char pVersion[50];
  304. char pBuildDate[50];
  305. } MPEG4ENC_INFO;
  306. typedef struct MPEG4ENC_METADATA
  307. {
  308. MPEG4ENC_METADATA_DRC_PROFILE drc_profile; /* MPEG DRC compression profile */
  309. MPEG4ENC_METADATA_DRC_PROFILE comp_profile; /* ETSI heavy compression profile */
  310. float drc_TargetRefLevel; /* used to define expected level to */
  311. float comp_TargetRefLevel; /* adjust limiter to avoid overload */
  312. float drc_ext; /* external feed DRC compression value */
  313. float comp_ext; /* external feed heavy compression value */
  314. int prog_ref_level_present; /* flag, if prog_ref_level is present */
  315. float prog_ref_level; /* Programme Reference Level = Dialogue Level: */
  316. /* -31.75dB .. 0 dB ; stepsize: 0.25dB */
  317. int PCE_mixdown_idx_present; /* flag, if dmx-idx should be written in programme config element */
  318. int ETSI_DmxLvl_present; /* flag, if dmx-lvl should be written in ETSI-ancData */
  319. MPEG4ENC_METADATA_DMX_GAIN centerMixLevel; /* center downmix level */
  320. MPEG4ENC_METADATA_DMX_GAIN surroundMixLevel; /* surround downmix level */
  321. MPEG4ENC_METADATA_DSUR_IND dolbySurroundMode; /* Indication for Dolby Surround Encoding Mode */
  322. MPEG4ENC_METADATA_DRCPRESENTATION drcPresentationMode; /* DRC presentation mode (ETSI) */
  323. /* preprocessing */
  324. int dcFilter; /* flag specifying if DC filtering is applied to input */
  325. int lfeLowpassFilter; /* flag specifying if 120 Hz low-pass filter is applied to LFE channel */
  326. int surPhase90; /* flag specifying if 90 degree phase shift is applied to surround channels */
  327. int surAtt3dB; /* flag specifying if 3 dB attenuation is applied to surround channels */
  328. } MPEG4ENC_METADATA;
  329. typedef struct MPEG4ENC_EXTMETADATA
  330. {
  331. #if 1 /* ENABLE_ISO14496_3_2009_AMD4 */
  332. /* not fully supported yet */
  333. /* extended ancillary data */
  334. int pseudoSurroundEnable; /* flag */
  335. int extAncDataEnable; /* flag */
  336. int extDownmixLevelEnable; /* flag */
  337. int extDownmixLevel_A; /* downmix level index A (0...7, according to table) */
  338. int extDownmixLevel_B; /* downmix level index B (0...7, according to table) */
  339. int dmxGainEnable; /* flag */
  340. float dmxGain5; /* gain factor for downmix to 5 channels */
  341. float dmxGain2; /* gain factor for downmix to 2 channels */
  342. int lfeDmxEnable; /* flag */
  343. int lfeDmxLevel; /* downmix level index for LFE (0..15, according to table) */
  344. #endif
  345. } MPEG4ENC_EXTMETADATA;
  346. typedef struct MPEG4ENC_METADATA *HANDLE_MPEG4ENC_METADATA;
  347. typedef struct MPEG4ENC_EXTMETADATA *HANDLE_MPEG4ENC_EXTMETADATA;
  348. /*-------------------- function prototypes --------------------------------*/
  349. /*---------------------------------------------------------------------------
  350. functionname: MPEG4ENC_Configure
  351. description : fills encoder handle structure with default values
  352. to be called before MPEG4ENC_Open
  353. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  354. ---------------------------------------------------------------------------*/
  355. MPEG4ENC_ERROR MPEG4ENCAPI
  356. MPEG4ENC_Configure (
  357. HANDLE_MPEG4ENC_ENCODER *phMp4Enc, /* adress of encoder handle */
  358. const HANDLE_MPEG4ENC_SETUP hSetup /* handle to filled setup stucture */
  359. );
  360. /*---------------------------------------------------------------------------
  361. functionname:MPEG4ENC_GetVersionInfo
  362. description: get Version Number information about the encoding process
  363. returns: MPEG4ENC_ERROR (error code)
  364. ---------------------------------------------------------------------------*/
  365. MPEG4ENC_ERROR MPEG4ENCAPI
  366. MPEG4ENC_GetVersionInfo(char *const pVersionInfo,
  367. const int bufSize);
  368. /*---------------------------------------------------------------------------
  369. functionname: MPEG4ENC_Open
  370. description: allocate and initialize a new encoder instance
  371. samplesFirst holds the desired number of input
  372. samples (of all channels) for the first frame
  373. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  374. ---------------------------------------------------------------------------*/
  375. MPEG4ENC_ERROR MPEG4ENCAPI
  376. MPEG4ENC_Open(
  377. HANDLE_MPEG4ENC_ENCODER *phMp4Enc, /* pointer to encoder handle, initialized on return */
  378. unsigned int* const pSamplesFirst /* number of samples needed to encode the first frame */
  379. );
  380. /*---------------------------------------------------------------------------
  381. functionname: MPEG4ENC_Close
  382. description: deallocate an encoder instance
  383. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  384. ---------------------------------------------------------------------------*/
  385. MPEG4ENC_ERROR MPEG4ENCAPI
  386. MPEG4ENC_Close (
  387. HANDLE_MPEG4ENC_ENCODER* phMp4Enc /* pointer to an encoder handle */
  388. );
  389. /*---------------------------------------------------------------------------
  390. functionname: MPEG4ENC_Encode
  391. description: encode the passed samples
  392. modifies: pSamplesConsumed: number of used samples
  393. pSamplesNext: number of samples needed to encode
  394. the next frame
  395. pOutputBytes: number of valid bytes in pOutput
  396. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  397. ---------------------------------------------------------------------------*/
  398. MPEG4ENC_ERROR MPEG4ENCAPI
  399. MPEG4ENC_Encode(
  400. HANDLE_MPEG4ENC_ENCODER const hMp4Enc, /* an encoder handle */
  401. const float* const pSamples, /* pointer to audio samples, interleaved*/
  402. const int nSamples, /* number of samples
  403. must be a multiple of number of input channels */
  404. int* pSamplesConsumed, /* number of used input samples,
  405. will be a multiple of number of input channels */
  406. unsigned int* const pSamplesNext, /* number of desired samples for a complete frame */
  407. unsigned char* const pOutput, /* pointer to bitstream buffer */
  408. const int nOutputBufSize, /* the size of the output buffer;
  409. must be large enough to receive all data */
  410. int* const pOutputBytes, /* number of bytes in bitstream buffer */
  411. MPEG4ENC_AUINFO **ppAuInfo /* */
  412. );
  413. /*---------------------------------------------------------------------------
  414. functionname: MPEG4ENC_SRInfo
  415. description : returns the sample rate range and
  416. to be called before MPEG4ENC_Open
  417. returns: MPEG4ENC_NO_ERROR on success,
  418. MPEG4ENC_INIT_ERROR if the bitrate, channel, aot configuration
  419. is not supported
  420. ---------------------------------------------------------------------------*/
  421. MPEG4ENC_ERROR MPEG4ENCAPI
  422. MPEG4ENC_SRInfo (
  423. const int bitRate, /* the targeted bit rate */
  424. const MPEG4ENC_BITRATE_MODE bitrateMode, /* the bitrateMode */
  425. const MPEG4ENC_CH_MODE chMode, /* the number of channels to encode */
  426. const AUD_OBJ_TYP aot, /* the audio object type */
  427. const MPEG4ENC_QUALITY quality, /* encoder quality */
  428. int *const sampleRateMin, /* lowest supported */
  429. int *const sampleRateMax, /* highest supported */
  430. int *const sampleRatePref /* preferred
  431. sampling frequency for the given
  432. bitrate, channel, aot configuration */
  433. );
  434. /*---------------------------------------------------------------------------
  435. functionname: MPEG4ENC_GetInfo
  436. description: get information about the encoding process
  437. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  438. ---------------------------------------------------------------------------*/
  439. MPEG4ENC_ERROR MPEG4ENCAPI
  440. MPEG4ENC_GetInfo(const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  441. MPEG4ENC_INFO * const pInfo);
  442. /*-----------------------------------------------------------------------------
  443. functionname: MPEG4ENC_SetAncDataRate
  444. description: Sets bitrate for ancillary data
  445. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  446. ------------------------------------------------------------------------------*/
  447. MPEG4ENC_ERROR MPEG4ENCAPI
  448. MPEG4ENC_SetAncDataRate(
  449. HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  450. int nAncDataRate
  451. );
  452. /*-----------------------------------------------------------------------------
  453. functionname: MPEG4ENC_SetAncData
  454. description: Passes ancillary data to encoder
  455. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  456. ------------------------------------------------------------------------------*/
  457. MPEG4ENC_ERROR MPEG4ENCAPI
  458. MPEG4ENC_SetAncData(
  459. HANDLE_MPEG4ENC_ENCODER const hMp4Enc, /* an encoder handle */
  460. unsigned char* pAncBytes, /* ancillary data buffer */
  461. unsigned int* pNumAncBytes /* ancillary data bytes left */
  462. );
  463. /*-----------------------------------------------------------------------------
  464. functionname: MPEG4ENC_SetOffsets
  465. description: changes mapping of input audio channels to AAC channels
  466. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  467. ------------------------------------------------------------------------------*/
  468. MPEG4ENC_ERROR MPEG4ENCAPI
  469. MPEG4ENC_SetOffsets(
  470. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  471. const unsigned int nChannels,
  472. const unsigned int *const channelOffset
  473. );
  474. /*-----------------------------------------------------------------------------
  475. functionname: MPEG4ENC_SetSbrTransmissionConfig
  476. description: changes signaling interval of SBR header, additional CRC bits
  477. for SBR data
  478. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  479. ------------------------------------------------------------------------------*/
  480. MPEG4ENC_ERROR MPEG4ENCAPI
  481. MPEG4ENC_SetSbrTransmissionConfig(
  482. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  483. const int bUseCRC,
  484. const float sendHeaderTimeInterval
  485. );
  486. /*-----------------------------------------------------------------------------
  487. functionname: MPEG4ENC_SetInbandPceTimeInterval
  488. description: set update interval for explicit in band PCE transmission
  489. sendPceTimeInterval > 0 -> regular time interval in seconds
  490. sendPceTimeInterval == 0 -> send no PCE (MPEG-2 only)
  491. sendPceTimeInterval < 0 -> send PCE only the 1st frame
  492. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  493. ------------------------------------------------------------------------------*/
  494. MPEG4ENC_ERROR MPEG4ENCAPI
  495. MPEG4ENC_SetInbandPceTimeInterval(const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  496. const float sendPceTimeInterval);
  497. /*-----------------------------------------------------------------------------
  498. functionname: MPEG4ENC_SetAdtsPceTimeInterval
  499. description: set update interval for explicit channel signaling via PCE in
  500. case of ADTS transport stream, MPEG-2/4 AAC and
  501. channel_configuration == 0
  502. sendPceTimeInterval > 0 -> regular time interval in seconds
  503. sendPceTimeInterval == 0 -> send no PCE (MPEG-2 only)
  504. sendPceTimeInterval < 0 -> send PCE only the 1st frame
  505. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  506. ------------------------------------------------------------------------------*/
  507. MPEG4ENC_ERROR MPEG4ENCAPI
  508. MPEG4ENC_SetAdtsPceTimeInterval(
  509. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  510. const float sendPceTimeInterval
  511. );
  512. /*-----------------------------------------------------------------------------
  513. functionname: MPEG4ENC_MpsSetSscTimeInterval
  514. description: set update interval for transmission of SpatialSpecificConfig
  515. (SSC) in case of encoding using MPEG Surround
  516. sendSscTimeInterval > 0 -> regular time interval in seconds
  517. sendSscTimeInterval == 0 -> send SSC every (MPEGS) frame
  518. sendSscTimeInterval < 0 -> send SSC only the 1st frame
  519. - in combination with MPEGS only
  520. - MPEGS payload mode has to be MP4_MPEGS_PAYLOAD_EMBED, because
  521. otherwise the SSC is transmitted in a seperate ESD, which has
  522. to be handled by the user
  523. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  524. ------------------------------------------------------------------------------*/
  525. MPEG4ENC_ERROR MPEG4ENCAPI
  526. MPEG4ENC_MpsSetSscTimeInterval(
  527. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  528. const float sendSscTimeInterval
  529. );
  530. /*-----------------------------------------------------------------------------
  531. functionname: MPEG4ENC_MpsSetDownmixConfig
  532. description: set MPEG Surround Downmix Configuration
  533. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  534. ------------------------------------------------------------------------------*/
  535. MPEG4ENC_ERROR MPEG4ENCAPI
  536. MPEG4ENC_MpsSetDownmixConfig(
  537. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  538. const MPEG4ENC_MPEGS_DOWNMIX_CONFIG mpegsDownmixCfg
  539. );
  540. /*-----------------------------------------------------------------------------
  541. functionname: MPEG4ENC_MpsSetPayloadMode
  542. description: set MPEG Surround Payload Transmission Mode
  543. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  544. ------------------------------------------------------------------------------*/
  545. MPEG4ENC_ERROR MPEG4ENCAPI
  546. MPEG4ENC_MpsSetPayloadMode(
  547. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  548. const MPEG4ENC_MPEGS_PAYLOAD_MODE mpegsPayloadMode
  549. );
  550. /*-----------------------------------------------------------------------------
  551. functionname: MPEG4ENC_SetThreadingMode (deprecated)
  552. description: sets threading mode to single threaded, multiple threaded
  553. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  554. Please note that this function is deprecated and should not be used any more.
  555. ------------------------------------------------------------------------------*/
  556. MPEG4ENC_ERROR MPEG4ENCAPI
  557. MPEG4ENC_SetThreadingMode(const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  558. const MPEG4ENC_THREADING_MODE threadingMode);
  559. /*-----------------------------------------------------------------------------
  560. functionname: MPEG4ENC_GetError
  561. description: get error text
  562. returns: pointer to an error text
  563. ------------------------------------------------------------------------------*/
  564. char* MPEG4ENCAPI
  565. MPEG4ENC_GetError(MPEG4ENC_ERROR error);
  566. /*-----------------------------------------------------------------------------
  567. functionname: MPEG4ENC_SetBandwidth
  568. description: set bandwidth by user, returns with actual used bandwidth
  569. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  570. ------------------------------------------------------------------------------*/
  571. MPEG4ENC_ERROR MPEG4ENCAPI
  572. MPEG4ENC_SetBandwidth(const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  573. const float proposedBandwidth,
  574. float* usedBandwidth);
  575. /*-----------------------------------------------------------------------------
  576. functionname: MPEG4ENC_SetStereoPrePro
  577. description: set bandwidth by user, returns with actual used bandwidth
  578. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  579. ------------------------------------------------------------------------------*/
  580. MPEG4ENC_ERROR MPEG4ENCAPI
  581. MPEG4ENC_SetStereoPrePro(const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  582. const int enableStereoPrePro);
  583. /*-----------------------------------------------------------------------------
  584. functionname: MPEG4ENC_SetLatmSmcTimeInterval
  585. description: set update interval for appearance of stream mux config in
  586. case of LOAS/LATM transport stream
  587. sendSmcTimeInterval > 0 -> regular time interval (every n-th frame, default: 8)
  588. sendSmcTimeInterval == 0 -> send no inband StreamMuxConfig
  589. sendSmcTimeInterval < 0 -> send StreamMuxConfig only the 1st frame
  590. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  591. ------------------------------------------------------------------------------*/
  592. MPEG4ENC_ERROR MPEG4ENCAPI
  593. MPEG4ENC_SetLatmSmcTimeInterval(
  594. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  595. const int sendSmcTimeInterval
  596. );
  597. /*-----------------------------------------------------------------------------
  598. functionname: MPEG4ENC_SetLatmNrOfSubframes
  599. description: set the nr of subframes per latm frame in
  600. case of LOAS/LATM transport stream
  601. nrOfSubframes < 1 -> reserved
  602. nrOfSubframes >= 1 -> use 'nrOfSubframes'
  603. optional, default is 1
  604. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  605. ------------------------------------------------------------------------------*/
  606. MPEG4ENC_ERROR MPEG4ENCAPI
  607. MPEG4ENC_SetLatmNrOfSubframes(
  608. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  609. const int nrOfSubframes
  610. );
  611. /*-----------------------------------------------------------------------------
  612. functionname: MPEG4ENC_GetLatmSmc
  613. description: returns pointer to and size of LATM stream mux config
  614. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  615. ------------------------------------------------------------------------------*/
  616. MPEG4ENC_ERROR MPEG4ENCAPI
  617. MPEG4ENC_GetLatmSmc(
  618. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  619. unsigned char** buffer,
  620. int* nBits
  621. );
  622. /*---------------------------------------------------------------------------
  623. functionname: MPEG4ENC_Submit_Metadata
  624. description: submit metadata
  625. returns: MPEG4ENC_ERROR (error code)
  626. ---------------------------------------------------------------------------*/
  627. MPEG4ENC_ERROR MPEG4ENCAPI
  628. MPEG4ENC_Submit_Metadata(
  629. const HANDLE_MPEG4ENC_ENCODER hMpeg4Enc, /* an encoder handle */
  630. const HANDLE_MPEG4ENC_METADATA pMetadata /* pointer to metadata */
  631. );
  632. /*---------------------------------------------------------------------------
  633. functionname: MPEG4ENC_Submit_ExtMetadata
  634. description: submit metadata
  635. returns: MPEG4ENC_ERROR (error code)
  636. ---------------------------------------------------------------------------*/
  637. MPEG4ENC_ERROR MPEG4ENCAPI
  638. MPEG4ENC_Submit_ExtMetadata(
  639. const HANDLE_MPEG4ENC_ENCODER hMpeg4Enc, /* an encoder handle */
  640. const HANDLE_MPEG4ENC_EXTMETADATA pExtMetadata /* pointer to extended metadata */
  641. );
  642. /*---------------------------------------------------------------------------
  643. functionname: MPEG4ENC_BRInfo
  644. description : Provides the compatible bitrate range
  645. returns: MPEG4ENC_ERROR (error code)
  646. ---------------------------------------------------------------------------*/
  647. MPEG4ENC_ERROR MPEG4ENCAPI
  648. MPEG4ENC_BRInfo (
  649. const AUD_OBJ_TYP aot,
  650. const MPEG4ENC_CH_MODE chMode,
  651. const int samplingRate,
  652. int* brMin,
  653. int* brMax);
  654. /*---------------------------------------------------------------------------
  655. functionname: MPEG4ENC_SetSbrSpeechConfig
  656. description : Sets SBR Speech config flag
  657. returns: MPEG4ENC_ERROR (error code)
  658. ---------------------------------------------------------------------------*/
  659. MPEG4ENC_ERROR MPEG4ENCAPI
  660. MPEG4ENC_SetSbrSpeechConfig(
  661. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  662. unsigned int flag
  663. );
  664. /*---------------------------------------------------------------------------
  665. functionname: MPEG4ENC_SetSbrTimeDiffCoding
  666. description : Sets SBR time differential coding (TDC);
  667. flag==0: Do not use TDC
  668. flag==1: Use TDC
  669. returns: MPEG4ENC_ERROR (error code)
  670. ---------------------------------------------------------------------------*/
  671. MPEG4ENC_ERROR MPEG4ENCAPI
  672. MPEG4ENC_SetSbrTimeDiffCoding(
  673. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  674. unsigned int flag
  675. );
  676. /*---------------------------------------------------------------------------
  677. functionname: MPEG4ENC_SetUseIntensityStereo
  678. description : Sets intensity stereo coding (IS);
  679. flag==1: Use IS (default)
  680. flag==0: Do not use IS
  681. returns: MPEG4ENC_ERROR (error code)
  682. ---------------------------------------------------------------------------*/
  683. MPEG4ENC_ERROR MPEG4ENCAPI
  684. MPEG4ENC_SetUseIntensityStereo(
  685. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  686. unsigned int flag
  687. );
  688. /*-----------------------------------------------------------------------------
  689. functionname: MPEG4ENC_SendChCfgZero
  690. description: will always use channel config zero + pce although a standard
  691. channel config could be signalled
  692. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  693. ------------------------------------------------------------------------------*/
  694. MPEG4ENC_ERROR MPEG4ENCAPI
  695. MPEG4ENC_SendChCfgZero(
  696. const HANDLE_MPEG4ENC_ENCODER hMp4Enc
  697. );
  698. /*-----------------------------------------------------------------------------
  699. functionname: MPEG4ENC_SetSyncFrame
  700. description: will generate a synchaable frame
  701. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  702. ------------------------------------------------------------------------------*/
  703. MPEG4ENC_ERROR MPEG4ENCAPI
  704. MPEG4ENC_SetSyncFrame(
  705. const HANDLE_MPEG4ENC_ENCODER hMp4Enc
  706. );
  707. /*-----------------------------------------------------------------------------
  708. functionname: MPEG4ENC_SetSyncFrameWithType
  709. description: will generate a synchaable frame
  710. returns: MPEG4ENC_NO_ERROR on success, an appropriate error code else
  711. ------------------------------------------------------------------------------*/
  712. MPEG4ENC_ERROR MPEG4ENCAPI
  713. MPEG4ENC_SetSyncFrameWithType(
  714. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  715. const MPEG4ENC_SYNCFRAME_TYPES syncType
  716. );
  717. /*---------------------------------------------------------------------------
  718. functionname: MPEG4ENC_InitDASH
  719. description : Configure encoder for DASH mode
  720. returns: MPEG4ENC_ERROR (error code)
  721. ---------------------------------------------------------------------------*/
  722. MPEG4ENC_ERROR MPEG4ENCAPI
  723. MPEG4ENC_InitDASH(
  724. const HANDLE_MPEG4ENC_ENCODER hMp4Enc
  725. );
  726. /*---------------------------------------------------------------------------
  727. functionname: MPEG4ENC_SetTransportType
  728. description : Reconfigure Transport Format
  729. returns: MPEG4ENC_ERROR (error code)
  730. ---------------------------------------------------------------------------*/
  731. MPEG4ENC_ERROR MPEG4ENCAPI
  732. MPEG4ENC_SetTransportType(
  733. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  734. const MPEG4ENC_TRANSPORT_TYPE transportType
  735. );
  736. /*---------------------------------------------------------------------------
  737. functionname: MPEG4ENC_SetMPEG4Flag
  738. description : Reconfigure MPEG-2/4 compliance
  739. returns: MPEG4ENC_ERROR (error code)
  740. ---------------------------------------------------------------------------*/
  741. MPEG4ENC_ERROR MPEG4ENCAPI
  742. MPEG4ENC_SetMPEG4Flag(
  743. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  744. const int mpeg4Flag
  745. );
  746. #ifdef SUPPORT_UPMIX
  747. /*---------------------------------------------------------------------------
  748. functionname: MPEG4ENC_SetSXProUpmixParameter
  749. description : Sets SXPro parameters;
  750. umxMode: Upmix workmode
  751. umxLFE: Upmix LFE on/off
  752. returns: MPEG4ENC_ERROR (error code)
  753. ---------------------------------------------------------------------------*/
  754. MPEG4ENC_ERROR MPEG4ENCAPI
  755. MPEG4ENC_SetSXProUpmixParameter(
  756. const HANDLE_MPEG4ENC_ENCODER hMp4Enc,
  757. const MP4_SXPRO_UPMIX_WORKMODE umxMode,
  758. const MP4_SXPRO_UPMIX_LFE umxLFE
  759. );
  760. #endif
  761. /*---------------------------------------------------------------------------*/
  762. #if defined(WIN32) || defined(WIN64)
  763. #pragma pack(pop)
  764. #endif
  765. /*-------------------------------------------------------------------------*/
  766. #ifdef __cplusplus
  767. }
  768. #endif
  769. #endif /* _mp4FastAAClib_h_ */