1
0

audiospecificconfig_c.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /***************************************************************************\
  2. *
  3. * (C) copyright Fraunhofer - IIS (1998)
  4. * All Rights Reserved
  5. *
  6. * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_asc/audiospecificconfig_c.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
  7. * project : MPEG-4 Audio Decoder
  8. * contents/description: interface to audioSpecificConfig
  9. *
  10. * This software and/or program is protected by copyright law and
  11. * international treaties. Any reproduction or distribution of this
  12. * software and/or program, or any portion of it, may result in severe
  13. * civil and criminal penalties, and will be prosecuted to the maximum
  14. * extent possible under law.
  15. *
  16. \***************************************************************************/
  17. #ifndef __AUDIOSPECIFICCONFIG_C_H__
  18. #define __AUDIOSPECIFICCONFIG_C_H__
  19. #include "mp4dec_asc/audioobjecttypes.h"
  20. #include "mp4dec_asc/gaspecificconfig_c.h"
  21. #include "mp4dec_asc/celpspecificconfig_c.h"
  22. #include "mp4dec_asc/hvxcspecificconfig_c.h"
  23. #include "mp4dec_asc/spatialspecificconfig_c.h"
  24. #include "mp4dec_asc/slsspecificconfig_c.h"
  25. #include "mp4dec_asc/mpeg12specificconfig_c.h"
  26. #include "mp4dec_asc/epspecificconfig_c.h"
  27. #include "mp4dec_asc/eldspecificconfig_c.h"
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif /* __cplusplus */
  31. struct CSBitStream;
  32. typedef struct CSAudioSpecificConfig {
  33. AUDIO_OBJECT_TYPE m_aot;
  34. AUDIO_OBJECT_TYPE m_origAot;
  35. unsigned int m_samplingFrequencyIndex;
  36. unsigned int m_samplingFrequency;
  37. int m_channelConfiguration;
  38. int m_epConfig;
  39. unsigned int m_directMapping;
  40. /* SBR/PS extension */
  41. int m_sbrPresentFlag;
  42. int m_psPresentFlag;
  43. int m_mpsPresentFlag;
  44. int m_saocPresentFlag;
  45. int m_ldmpsPresentFlag;
  46. AUDIO_OBJECT_TYPE m_extensionAudioObjectType;
  47. unsigned int m_extensionSamplingFrequencyIndex;
  48. unsigned int m_extensionSamplingFrequency;
  49. /* */
  50. unsigned int m_nrOfStreams;
  51. unsigned int m_avgBitRate;
  52. unsigned int m_layer;
  53. /* derived values */
  54. int m_channels;
  55. unsigned int m_samplesPerFrame;
  56. /* aot-specific asc's */
  57. CSGaSpecificConfig m_gaSpecificConfig;
  58. CSCelpSpecificConfig m_celpSpecificConfig;
  59. HvxcSpecificConfig m_hvxcSpecificConfig;
  60. CSSpatialSpecificConfig m_mpegsSpecificConfig;
  61. CSSpatialSpecificConfig m_saocSpecificConfig;
  62. CSSpatialSpecificConfig m_ldmpegsSpecificConfig;
  63. CSMpeg12SpecificConfig m_mpeg12SpecificConfig;
  64. CSSlsSpecificConfig m_slsSpecificConfig;
  65. CSEldSpecificConfig m_eldSpecificConfig;
  66. CEpSpecificConfig m_epSpecificConfig;
  67. } CSAudioSpecificConfig, *CSAudioSpecificConfigPtr;
  68. int AudioSpecificConfig_ParseLatm_amv0(
  69. CSAudioSpecificConfigPtr self,
  70. struct CSBitStream *bs
  71. );
  72. int AudioSpecificConfig_ParseLatm_amv1(
  73. CSAudioSpecificConfigPtr self,
  74. struct CSBitStream *bs
  75. );
  76. int AudioSpecificConfig_ParseExt(
  77. CSAudioSpecificConfigPtr self,
  78. CSAudioSpecificConfigPtr baselayer,
  79. struct CSBitStream *bs,
  80. unsigned int streamsPerLayer,
  81. unsigned int avgBitrate,
  82. unsigned int latm_flag
  83. );
  84. void AudioSpecificConfig_Copy(
  85. CSAudioSpecificConfigPtr self,
  86. const CSAudioSpecificConfigPtr asc
  87. );
  88. int AudioSpecificConfig_Compare(
  89. const CSAudioSpecificConfigPtr self,
  90. const CSAudioSpecificConfigPtr asc
  91. );
  92. #ifdef ASC_PRINT
  93. int AudioSpecificConfig_Print(
  94. const CSAudioSpecificConfigPtr asc,
  95. char string[]
  96. );
  97. #endif
  98. AUDIO_OBJECT_TYPE __GetAotFromAsc(CSAudioSpecificConfigPtr asc);
  99. int __GetLayerFromAsc(
  100. CSAudioSpecificConfigPtr asc,
  101. CSAudioSpecificConfigPtr asc_base
  102. );
  103. char* __GetAotString(AUDIO_OBJECT_TYPE aot);
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* __AUDIOSPECIFICCONFIG_H__ */