Home | History | Annotate | Download | only in src
      1 /* -----------------------------------------------------------------------------
      2 Software License for The Fraunhofer FDK AAC Codec Library for Android
      3 
      4  Copyright  1995 - 2018 Fraunhofer-Gesellschaft zur Frderung der angewandten
      5 Forschung e.V. All rights reserved.
      6 
      7  1.    INTRODUCTION
      8 The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software
      9 that implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding
     10 scheme for digital audio. This FDK AAC Codec software is intended to be used on
     11 a wide variety of Android devices.
     12 
     13 AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient
     14 general perceptual audio codecs. AAC-ELD is considered the best-performing
     15 full-bandwidth communications codec by independent studies and is widely
     16 deployed. AAC has been standardized by ISO and IEC as part of the MPEG
     17 specifications.
     18 
     19 Patent licenses for necessary patent claims for the FDK AAC Codec (including
     20 those of Fraunhofer) may be obtained through Via Licensing
     21 (www.vialicensing.com) or through the respective patent owners individually for
     22 the purpose of encoding or decoding bit streams in products that are compliant
     23 with the ISO/IEC MPEG audio standards. Please note that most manufacturers of
     24 Android devices already license these patent claims through Via Licensing or
     25 directly from the patent owners, and therefore FDK AAC Codec software may
     26 already be covered under those patent licenses when it is used for those
     27 licensed purposes only.
     28 
     29 Commercially-licensed AAC software libraries, including floating-point versions
     30 with enhanced sound quality, are also available from Fraunhofer. Users are
     31 encouraged to check the Fraunhofer website for additional applications
     32 information and documentation.
     33 
     34 2.    COPYRIGHT LICENSE
     35 
     36 Redistribution and use in source and binary forms, with or without modification,
     37 are permitted without payment of copyright license fees provided that you
     38 satisfy the following conditions:
     39 
     40 You must retain the complete text of this software license in redistributions of
     41 the FDK AAC Codec or your modifications thereto in source code form.
     42 
     43 You must retain the complete text of this software license in the documentation
     44 and/or other materials provided with redistributions of the FDK AAC Codec or
     45 your modifications thereto in binary form. You must make available free of
     46 charge copies of the complete source code of the FDK AAC Codec and your
     47 modifications thereto to recipients of copies in binary form.
     48 
     49 The name of Fraunhofer may not be used to endorse or promote products derived
     50 from this library without prior written permission.
     51 
     52 You may not charge copyright license fees for anyone to use, copy or distribute
     53 the FDK AAC Codec software or your modifications thereto.
     54 
     55 Your modified versions of the FDK AAC Codec must carry prominent notices stating
     56 that you changed the software and the date of any change. For modified versions
     57 of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android"
     58 must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK
     59 AAC Codec Library for Android."
     60 
     61 3.    NO PATENT LICENSE
     62 
     63 NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without
     64 limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE.
     65 Fraunhofer provides no warranty of patent non-infringement with respect to this
     66 software.
     67 
     68 You may use this FDK AAC Codec software or modifications thereto only for
     69 purposes that are authorized by appropriate patent licenses.
     70 
     71 4.    DISCLAIMER
     72 
     73 This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright
     74 holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
     75 including but not limited to the implied warranties of merchantability and
     76 fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
     77 CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary,
     78 or consequential damages, including but not limited to procurement of substitute
     79 goods or services; loss of use, data, or profits, or business interruption,
     80 however caused and on any theory of liability, whether in contract, strict
     81 liability, or tort (including negligence), arising in any way out of the use of
     82 this software, even if advised of the possibility of such damage.
     83 
     84 5.    CONTACT INFORMATION
     85 
     86 Fraunhofer Institute for Integrated Circuits IIS
     87 Attention: Audio and Multimedia Departments - FDK AAC LL
     88 Am Wolfsmantel 33
     89 91058 Erlangen, Germany
     90 
     91 www.iis.fraunhofer.de/amm
     92 amm-info (at) iis.fraunhofer.de
     93 ----------------------------------------------------------------------------- */
     94 
     95 /*********************** MPEG surround decoder library *************************
     96 
     97    Author(s):
     98 
     99    Description: interface - spatial specific config struct
    100 
    101 *******************************************************************************/
    102 
    103 #ifndef SAC_DEC_SSC_STRUCT_H
    104 #define SAC_DEC_SSC_STRUCT_H
    105 
    106 #include "FDK_audio.h"
    107 
    108 #define MAX_NUM_QMF_BANDS (128)
    109 #define MAX_TIME_SLOTS 64
    110 #define MAX_INPUT_CHANNELS 1
    111 #define MAX_OUTPUT_CHANNELS                                             \
    112   2 /* CAUTION: This does NOT restrict the number of                    \
    113                             output channels exclusively! In addition it \
    114        affects the max number of bitstream and residual channels! */
    115 #define MAX_NUM_OTT (5)
    116 #define MAX_NUM_TTT (0)
    117 #define MAX_NUM_EXT_TYPES (8)
    118 #define MAX_PARAMETER_BANDS (28)
    119 #define MAX_PARAMETER_BANDS_LD (23)
    120 
    121 #define MAX_NUM_XCHANNELS (6)
    122 
    123 #define MAX_ARBITRARY_TREE_LEVELS (0)
    124 
    125 typedef enum {
    126   /* CAUTION: Do not change enum values! */
    127   SPATIALDEC_FREQ_RES_40 = 40,
    128   SPATIALDEC_FREQ_RES_28 = 28,
    129   SPATIALDEC_FREQ_RES_23 = 23,
    130   SPATIALDEC_FREQ_RES_20 = 20,
    131   SPATIALDEC_FREQ_RES_15 = 15,
    132   SPATIALDEC_FREQ_RES_14 = 14,
    133   SPATIALDEC_FREQ_RES_12 = 12,
    134   SPATIALDEC_FREQ_RES_10 = 10,
    135   SPATIALDEC_FREQ_RES_9 = 9,
    136   SPATIALDEC_FREQ_RES_7 = 7,
    137   SPATIALDEC_FREQ_RES_5 = 5,
    138   SPATIALDEC_FREQ_RES_4 = 4
    139 
    140 } SPATIALDEC_FREQ_RES;
    141 
    142 typedef enum {
    143 
    144   SPATIALDEC_QUANT_FINE_DEF = 0,
    145   SPATIALDEC_QUANT_EDQ1 = 1,
    146   SPATIALDEC_QUANT_EDQ2 = 2,
    147   SPATIALDEC_QUANT_RSVD3 = 3,
    148   SPATIALDEC_QUANT_RSVD4 = 4,
    149   SPATIALDEC_QUANT_RSVD5 = 5,
    150   SPATIALDEC_QUANT_RSVD6 = 6,
    151   SPATIALDEC_QUANT_RSVD7 = 7
    152 
    153 } SPATIALDEC_QUANT_MODE;
    154 
    155 typedef enum { SPATIALDEC_MODE_RSVD7 = 7 } SPATIALDEC_TREE_CONFIG;
    156 
    157 typedef enum {
    158 
    159   SPATIALDEC_GAIN_MODE0 = 0,
    160   SPATIALDEC_GAIN_RSVD1 = 1,
    161   SPATIALDEC_GAIN_RSVD2 = 2,
    162   SPATIALDEC_GAIN_RSVD3 = 3,
    163   SPATIALDEC_GAIN_RSVD4 = 4,
    164   SPATIALDEC_GAIN_RSVD5 = 5,
    165   SPATIALDEC_GAIN_RSVD6 = 6,
    166   SPATIALDEC_GAIN_RSVD7 = 7,
    167   SPATIALDEC_GAIN_RSVD8 = 8,
    168   SPATIALDEC_GAIN_RSVD9 = 9,
    169   SPATIALDEC_GAIN_RSVD10 = 10,
    170   SPATIALDEC_GAIN_RSVD11 = 11,
    171   SPATIALDEC_GAIN_RSVD12 = 12,
    172   SPATIALDEC_GAIN_RSVD13 = 13,
    173   SPATIALDEC_GAIN_RSVD14 = 14,
    174   SPATIALDEC_GAIN_RSVD15 = 15
    175 
    176 } SPATIALDEC_FIXED_GAINS;
    177 
    178 typedef enum {
    179 
    180   SPATIALDEC_TS_TPNOWHITE = 0,
    181   SPATIALDEC_TS_TPWHITE = 1,
    182   SPATIALDEC_TS_TES = 2,
    183   SPATIALDEC_TS_NOTS = 3,
    184   SPATIALDEC_TS_RSVD4 = 4,
    185   SPATIALDEC_TS_RSVD5 = 5,
    186   SPATIALDEC_TS_RSVD6 = 6,
    187   SPATIALDEC_TS_RSVD7 = 7,
    188   SPATIALDEC_TS_RSVD8 = 8,
    189   SPATIALDEC_TS_RSVD9 = 9,
    190   SPATIALDEC_TS_RSVD10 = 10,
    191   SPATIALDEC_TS_RSVD11 = 11,
    192   SPATIALDEC_TS_RSVD12 = 12,
    193   SPATIALDEC_TS_RSVD13 = 13,
    194   SPATIALDEC_TS_RSVD14 = 14,
    195   SPATIALDEC_TS_RSVD15 = 15
    196 
    197 } SPATIALDEC_TS_CONF;
    198 
    199 typedef enum {
    200 
    201   SPATIALDEC_DECORR_MODE0 = 0,
    202   SPATIALDEC_DECORR_MODE1 = 1,
    203   SPATIALDEC_DECORR_MODE2 = 2,
    204   SPATIALDEC_DECORR_RSVD3 = 3,
    205   SPATIALDEC_DECORR_RSVD4 = 4,
    206   SPATIALDEC_DECORR_RSVD5 = 5,
    207   SPATIALDEC_DECORR_RSVD6 = 6,
    208   SPATIALDEC_DECORR_RSVD7 = 7,
    209   SPATIALDEC_DECORR_RSVD8 = 8,
    210   SPATIALDEC_DECORR_RSVD9 = 9,
    211   SPATIALDEC_DECORR_RSVD10 = 10,
    212   SPATIALDEC_DECORR_RSVD11 = 11,
    213   SPATIALDEC_DECORR_RSVD12 = 12,
    214   SPATIALDEC_DECORR_RSVD13 = 13,
    215   SPATIALDEC_DECORR_RSVD14 = 14,
    216   SPATIALDEC_DECORR_RSVD15 = 15
    217 
    218 } SPATIALDEC_DECORR_CONF;
    219 
    220 typedef struct T_SPATIALDEC_OTT_CONF {
    221   int nOttBands;
    222 
    223 } SPATIALDEC_OTT_CONF;
    224 
    225 typedef struct T_SPATIALDEC_RESIDUAL_CONF {
    226   int bResidualPresent;
    227   int nResidualBands;
    228 
    229 } SPATIALDEC_RESIDUAL_CONF;
    230 
    231 typedef struct T_SPATIAL_SPECIFIC_CONFIG {
    232   UINT syntaxFlags;
    233   int samplingFreq;
    234   int nTimeSlots;
    235   SPATIALDEC_FREQ_RES freqRes;
    236   SPATIALDEC_TREE_CONFIG treeConfig;
    237   SPATIALDEC_QUANT_MODE quantMode;
    238   int bArbitraryDownmix;
    239 
    240   int bResidualCoding;
    241   SPATIALDEC_FIXED_GAINS bsFixedGainDMX;
    242 
    243   SPATIALDEC_TS_CONF tempShapeConfig;
    244   SPATIALDEC_DECORR_CONF decorrConfig;
    245 
    246   int nInputChannels;  /* derived from  treeConfig */
    247   int nOutputChannels; /* derived from  treeConfig */
    248 
    249   /* ott config */
    250   int nOttBoxes;                              /* derived from  treeConfig */
    251   SPATIALDEC_OTT_CONF OttConfig[MAX_NUM_OTT]; /* dimension nOttBoxes */
    252 
    253   /* ttt config */
    254   int nTttBoxes; /* derived from  treeConfig */
    255 
    256   /* residual config */
    257   SPATIALDEC_RESIDUAL_CONF
    258   ResidualConfig[MAX_NUM_OTT +
    259                  MAX_NUM_TTT]; /* dimension (nOttBoxes + nTttBoxes) */
    260 
    261   int sacExtCnt;
    262   int sacExtType[MAX_NUM_EXT_TYPES];
    263   int envQuantMode;
    264 
    265   AUDIO_OBJECT_TYPE coreCodec;
    266 
    267   UCHAR stereoConfigIndex;
    268   UCHAR coreSbrFrameLengthIndex; /* Table 70 in ISO/IEC FDIS 23003-3:2011 */
    269   UCHAR bsHighRateMode;
    270   UCHAR bsDecorrType;
    271   UCHAR bsPseudoLr;
    272   UCHAR bsPhaseCoding;
    273   UCHAR bsOttBandsPhasePresent;
    274   int bsOttBandsPhase;
    275 
    276   SCHAR ottCLDdefault[MAX_NUM_OTT];
    277   UCHAR numOttBandsIPD;
    278   UCHAR bitstreamOttBands[MAX_NUM_OTT];
    279   UCHAR numOttBands[MAX_NUM_OTT];
    280 
    281 } SPATIAL_SPECIFIC_CONFIG;
    282 
    283 #endif
    284