faaccfg.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * FAAC - Freeware Advanced Audio Coder
  3. * Copyright (C) 2001 Menno Bakker
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. * $Id: faaccfg.h,v 1.3 2004/07/04 12:12:05 corrados Exp $
  19. */
  20. #ifndef _FAACCFG_H_
  21. #define _FAACCFG_H_
  22. #define FAAC_CFG_VERSION 104
  23. /* MPEG ID's */
  24. #define MPEG2 1
  25. #define MPEG4 0
  26. /* AAC object types */
  27. #define MAIN 1
  28. #define LOW 2
  29. #define SSR 3
  30. #define LTP 4
  31. /* Input Formats */
  32. #define FAAC_INPUT_NULL 0
  33. #define FAAC_INPUT_16BIT 1
  34. #define FAAC_INPUT_24BIT 2
  35. #define FAAC_INPUT_32BIT 3
  36. #define FAAC_INPUT_FLOAT 4
  37. #define SHORTCTL_NORMAL 0
  38. #define SHORTCTL_NOSHORT 1
  39. #define SHORTCTL_NOLONG 2
  40. #pragma pack(push, 1)
  41. typedef struct faacEncConfiguration {
  42. /* config version */
  43. int version;
  44. /* library version */
  45. char *name;
  46. /* copyright string */
  47. char *copyright;
  48. /* MPEG version, 2 or 4 */
  49. unsigned int mpegVersion;
  50. /* AAC object type */
  51. unsigned int aacObjectType;
  52. /* Allow mid/side coding */
  53. unsigned int allowMidside;
  54. /* Use one of the channels as LFE channel */
  55. unsigned int useLfe;
  56. /* Use Temporal Noise Shaping */
  57. unsigned int useTns;
  58. /* bitrate / channel of AAC file */
  59. unsigned long bitRate;
  60. /* AAC file frequency bandwidth */
  61. unsigned int bandWidth;
  62. /* Quantizer quality */
  63. unsigned long quantqual;
  64. /* Bitstream output format (0 = Raw; 1 = ADTS) */
  65. unsigned int outputFormat;
  66. /* psychoacoustic model list */
  67. psymodellist_t *psymodellist;
  68. /* selected index in psymodellist */
  69. unsigned int psymodelidx;
  70. /*
  71. PCM Sample Input Format
  72. 0 FAAC_INPUT_NULL invalid, signifies a misconfigured config
  73. 1 FAAC_INPUT_16BIT native endian 16bit
  74. 2 FAAC_INPUT_24BIT native endian 24bit in 24 bits (not implemented)
  75. 3 FAAC_INPUT_32BIT native endian 24bit in 32 bits (DEFAULT)
  76. 4 FAAC_INPUT_FLOAT 32bit floating point
  77. */
  78. unsigned int inputFormat;
  79. /* block type enforcing (SHORTCTL_NORMAL/SHORTCTL_NOSHORT/SHORTCTL_NOLONG) */
  80. int shortctl;
  81. /*
  82. Channel Remapping
  83. Default 0, 1, 2, 3 ... 63 (64 is MAX_CHANNELS in coder.h)
  84. WAVE 4.0 2, 0, 1, 3
  85. WAVE 5.0 2, 0, 1, 3, 4
  86. WAVE 5.1 2, 0, 1, 4, 5, 3
  87. AIFF 5.1 2, 0, 3, 1, 4, 5
  88. */
  89. int channel_map[64];
  90. } faacEncConfiguration, *faacEncConfigurationPtr;
  91. #pragma pack(pop)
  92. #endif /* _FAACCFG_H_ */