16cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/* ----------------------------------------------------------------------------- 22228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectSoftware License for The Fraunhofer FDK AAC Codec Library for Android 32228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 46cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten 56cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKForschung e.V. All rights reserved. 62228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 72228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1. INTRODUCTION 86cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software 96cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthat implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding 106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKscheme for digital audio. This FDK AAC Codec software is intended to be used on 116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKa wide variety of Android devices. 126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient 146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKgeneral perceptual audio codecs. AAC-ELD is considered the best-performing 156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfull-bandwidth communications codec by independent studies and is widely 166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdeployed. AAC has been standardized by ISO and IEC as part of the MPEG 176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKspecifications. 186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKPatent licenses for necessary patent claims for the FDK AAC Codec (including 206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthose of Fraunhofer) may be obtained through Via Licensing 216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK(www.vialicensing.com) or through the respective patent owners individually for 226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe purpose of encoding or decoding bit streams in products that are compliant 236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKwith the ISO/IEC MPEG audio standards. Please note that most manufacturers of 246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAndroid devices already license these patent claims through Via Licensing or 256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdirectly from the patent owners, and therefore FDK AAC Codec software may 266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKalready be covered under those patent licenses when it is used for those 276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKlicensed purposes only. 286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCommercially-licensed AAC software libraries, including floating-point versions 306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKwith enhanced sound quality, are also available from Fraunhofer. Users are 316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKencouraged to check the Fraunhofer website for additional applications 326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKinformation and documentation. 332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 342228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project2. COPYRIGHT LICENSE 352228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKRedistribution and use in source and binary forms, with or without modification, 376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKare permitted without payment of copyright license fees provided that you 386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsatisfy the following conditions: 392228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKYou must retain the complete text of this software license in redistributions of 416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe FDK AAC Codec or your modifications thereto in source code form. 422228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKYou must retain the complete text of this software license in the documentation 446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKand/or other materials provided with redistributions of the FDK AAC Codec or 456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKyour modifications thereto in binary form. You must make available free of 466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcharge copies of the complete source code of the FDK AAC Codec and your 472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectmodifications thereto to recipients of copies in binary form. 482228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe name of Fraunhofer may not be used to endorse or promote products derived 506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfrom this library without prior written permission. 512228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKYou may not charge copyright license fees for anyone to use, copy or distribute 536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe FDK AAC Codec software or your modifications thereto. 542228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKYour modified versions of the FDK AAC Codec must carry prominent notices stating 566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthat you changed the software and the date of any change. For modified versions 576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKof the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android" 586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKmust be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK 596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAAC Codec Library for Android." 602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 612228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project3. NO PATENT LICENSE 622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKNO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without 646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKlimitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE. 656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKFraunhofer provides no warranty of patent non-infringement with respect to this 666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsoftware. 672228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKYou may use this FDK AAC Codec software or modifications thereto only for 696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKpurposes that are authorized by appropriate patent licenses. 702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project4. DISCLAIMER 722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThis FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright 746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKholders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, 756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKincluding but not limited to the implied warranties of merchantability and 766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, 786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKor consequential damages, including but not limited to procurement of substitute 796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKgoods or services; loss of use, data, or profits, or business interruption, 806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKhowever caused and on any theory of liability, whether in contract, strict 816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKliability, or tort (including negligence), arising in any way out of the use of 826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthis software, even if advised of the possibility of such damage. 832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 842228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project5. CONTACT INFORMATION 852228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 862228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectFraunhofer Institute for Integrated Circuits IIS 872228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectAttention: Audio and Multimedia Departments - FDK AAC LL 882228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectAm Wolfsmantel 33 892228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project91058 Erlangen, Germany 902228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectwww.iis.fraunhofer.de/amm 922228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projectamm-info@iis.fraunhofer.de 936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK----------------------------------------------------------------------------- */ 942228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/**************************** AAC decoder library ****************************** 962228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 972228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project Author(s): Manuel Jander 982228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Description: 1006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK*******************************************************************************/ 1026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#ifndef AACDECODER_LIB_H 1046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define AACDECODER_LIB_H 1052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1062228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 1072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \file aacdecoder_lib.h 1082228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief FDK AAC decoder library interface header file. 1092228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 1102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1112228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\page INTRO Introduction 1122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section SCOPE Scope 1152228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThis document describes the high-level application interface and usage of the 1176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKISO/MPEG-2/4 AAC Decoder library developed by the Fraunhofer Institute for 1186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIntegrated Circuits (IIS). Depending on the library configuration, decoding of 1196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAAC-LC (Low-Complexity), HE-AAC (High-Efficiency AAC v1 and v2), AAC-LD 1206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK(Low-Delay) and AAC-ELD (Enhanced Low-Delay) is implemented. 1212228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAll references to SBR (Spectral Band Replication) are only applicable to HE-AAC 1236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKand AAC-ELD configurations of the FDK library. All references to PS (Parametric 1246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKStereo) are only applicable to HE-AAC v2 decoder configuration of the library. 1252228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1262228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section DecoderBasics Decoder Basics 1272228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThis document can only give a rough overview about the ISO/MPEG-2, ISO/MPEG-4 1296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAAC audio and MPEG-D USAC coding standards. To understand all details referenced 1306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKin this document, you are encouraged to read the following documents. 1316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK- ISO/IEC 13818-7 (MPEG-2 AAC) Standard, defines the syntax of MPEG-2 AAC audio 1336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbitstreams. 1346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK- ISO/IEC 14496-3 (MPEG-4 AAC, subpart 1 and 4) Standard, defines the syntax of 1356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKMPEG-4 AAC audio bitstreams. 1366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK- ISO/IEC 23003-3 (MPEG-D USAC), defines MPEG-D USAC unified speech and audio 1376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcodec. 1386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK- Lutzky, Schuller, Gayer, Krämer, Wabnik, "A guideline to audio codec 1396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdelay", 116th AES Convention, May 8, 2004 1406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn short, MPEG Advanced Audio Coding is based on a time-to-frequency mapping of 1426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe signal. The signal is partitioned into overlapping time portions and 1436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtransformed into frequency domain. The spectral components are then quantized 1446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKand coded using a highly efficient coding scheme.\n Encoded MPEG-2 and MPEG-4 1456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAAC audio bitstreams are composed of frames. Contrary to MPEG-1/2 Layer-3 (mp3), 1466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe length of individual frames is not restricted to a fixed number of bytes, 1476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbut can take any length between 1 and 768 bytes. 1486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn addition to the above mentioned frequency domain coding mode, MPEG-D USAC 1506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKalso employs a time domain Algebraic Code-Excited Linear Prediction (ACELP) 1516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKspeech coder core. This operating mode is selected by the encoder in order to 1526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKachieve the optimum audio quality for different content type. Several 1536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKenhancements allow achieving higher quality at lower bit rates compared to 1546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKMPEG-4 HE-AAC. 1552228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\page LIBUSE Library Usage 1582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section InterfaceDescritpion API Description 1612228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAll API header files are located in the folder /include of the release package. 1636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe contents of each file is described in detail in this document. All header 1646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfiles are provided for usage in specific C/C++ programs. The main AAC decoder 1656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKlibrary API functions are located in aacdecoder_lib.h header file. 1666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn binary releases the decoder core resides in statically linkable libraries, 1686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfor example libAACdec.a. 1692228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section Calling_Sequence Calling Sequence 1722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 1736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe following sequence is necessary for proper decoding of ISO/MPEG-2/4 AAC, 1746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKHE-AAC v2, or MPEG-D USAC bitstreams. In the following description, input stream 1756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKread and output write function details are left out, since they may be 1766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKimplemented in a variety of configurations depending on the user's specific 1776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKrequirements. The example implementation uses file-based input/output, and in 1786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsuch case one may call mpegFileRead_Open() to open an input file and to allocate 1796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKmemory for the required structures, and the corresponding mpegFileRead_Close() 1806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKto close opened files and to de-allocate associated structures. 1816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKmpegFileRead_Open() will attempt to detect the bitstream format and in case of 1826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKMPEG-4 file format or Raw Packets file format (a proprietary Fraunhofer IIS file 1836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKformat suitable only for testing) it will read the Audio Specific Config data 1846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK(ASC). An unsuccessful attempt to recognize the bitstream format requires the 1856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKuser to provide this information manually. For any other bitstream formats that 1866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKare usually applicable in streaming applications, the decoder itself will try to 1876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsynchronize and parse the given bitstream fragment using the FDK transport 1886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKlibrary. Hence, for streaming applications (without file access) this step is 1896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKnot necessary. 1906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Call aacDecoder_Open() to open and retrieve a handle to a new AAC decoder 1936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKinstance. \code aacDecoderInfo = aacDecoder_Open(transportType, nrOfLayers); 1946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\endcode 1956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# If out-of-band config data (Audio Specific Config (ASC) or Stream Mux Config 1966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK(SMC)) is available, call aacDecoder_ConfigRaw() to pass this data to the 1976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdecoder before beginning the decoding process. If this data is not available in 1986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKadvance, the decoder will configure itself while decoding, during the 1996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_DecodeFrame() function call. 2002228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project-# Begin decoding loop. 2016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\code 2026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdo { 2036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\endcode 2046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Read data from bitstream file or stream buffer in to the driver program 2056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKworking memory (a client-supplied input buffer "inBuffer" in framework). This 2066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer will be used to load AAC bitstream data to the decoder. Only when all 2076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdata in this buffer has been processed will the decoder signal an empty buffer. 2086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKFor file-based input, you may invoke mpegFileRead_Read() to acquire new 2096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbitstream data. 2106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Call aacDecoder_Fill() to fill the decoder's internal bitstream input buffer 2116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKwith the client-supplied bitstream input buffer. Note, if the data loaded in to 2126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe internal buffer is not sufficient to decode a frame, 2136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_DecodeFrame() will return ::AAC_DEC_NOT_ENOUGH_BITS until a 2146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsufficient amount of data is loaded in to the internal buffer. For streaming 2156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKformats (ADTS, LOAS), it is acceptable to load more than one frame to the 2166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdecoder. However, for RAW file format (Fraunhofer IIS proprietary format), only 2176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKone frame may be loaded to the decoder per aacDecoder_DecodeFrame() call. For 2186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKleast amount of communication delay, fill and decode should be performed on a 2196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKframe by frame basis. \code ErrorStatus = aacDecoder_Fill(aacDecoderInfo, 2206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKinBuffer, bytesRead, bytesValid); \endcode 2216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Call aacDecoder_DecodeFrame(). This function decodes one frame and writes 2226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdecoded PCM audio data to a client-supplied buffer. It is the client's 2236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKresponsibility to allocate a buffer which is large enough to hold the decoded 2246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKoutput data. \code ErrorStatus = aacDecoder_DecodeFrame(aacDecoderInfo, 2256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKTimeData, OUT_BUF_SIZE, flags); \endcode If the bitstream configuration (number 2266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKof channels, sample rate, frame size) is not known a priori, you may call 2276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_GetStreamInfo() to retrieve a structure that contains this 2286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKinformation. You may use this data to initialize an audio output device. In the 2296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKexample program, if the number of channels or the sample rate has changed since 2306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKprogram start or the previously decoded frame, the audio output device is then 2316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKre-initialized. If WAVE file output is chosen, a new WAVE file for each new 2326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKstream configuration is be created. \code p_si = 2336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_GetStreamInfo(aacDecoderInfo); \endcode 2346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Repeat steps 5 to 7 until no data is available to decode any more, or in case 2356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKof error. \code } while (bytesRead[0] > 0 || doFlush || doBsFlush || 2366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKforceContinue); \endcode 2376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK-# Call aacDecoder_Close() to de-allocate all AAC decoder and transport layer 2386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKstructures. \code aacDecoder_Close(aacDecoderInfo); \endcode 2396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\image latex decode.png "Decode calling sequence" width=11cm 2416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\image latex change_source.png "Change data source sequence" width 5cm 2436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\image latex conceal.png "Error concealment sequence" width=14cm 2456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\subsection Error_Concealment_Sequence Error Concealment Sequence 2476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThere are different strategies to handle bit stream errors. Depending on the 2496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsystem properties the product designer might choose to take different actions in 2506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcase a bit error occurs. In many cases the decoder might be able to do 2516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKreasonable error concealment without the need of any additional actions from the 2526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsystem. But in some cases its not even possible to know how many decoded PCM 2536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKoutput samples are required to fill the gap due to the data error, then the 2546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsoftware surrounding the decoder must deal with the situation. The most simple 2556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKway would be to just stop audio playback and resume once enough bit stream data 2566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKand/or buffered output samples are available. More sophisticated designs might 2576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKalso be able to deal with sender/receiver clock drifts or data drop outs by 2586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKusing a closed loop control of FIFO fulness levels. The chosen strategy depends 2596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKon the final product requirements. 2606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe error concealment sequence diagram illustrates the general execution paths 2626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfor error handling. 2636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe macro IS_OUTPUT_VALID(err) can be used to identify if the audio output 2656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer contains valid audio either from error free bit stream data or successful 2666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKerror concealment. In case the result is false, the decoder output buffer does 2676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKnot contain meaningful audio samples and should not be passed to any output as 2686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKit is. Most likely in case that a continuous audio output PCM stream is 2696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKrequired, the output buffer must be filled with audio data from the calling 2706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKframework. This might be e.g. an appropriate number of samples all zero. 2716cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2726cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIf error code ::AAC_DEC_TRANSPORT_SYNC_ERROR is returned by the decoder, under 2736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsome particular conditions it is possible to estimate lost frames due to the bit 2746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKstream error. In that case the bit stream is required to have a constant 2756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbitrate, and compatible transport type. Audio samples for the lost frames can be 2766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKobtained by calling aacDecoder_DecodeFrame() with flag ::AACDEC_CONCEAL set 2776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKn-times where n is the count of lost frames. Please note that the decoder has to 2786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKhave encountered valid configuration data at least once to be able to generate 2796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKconcealed data, because at the minimum the sampling rate, frame size and amount 2806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKof audio channels needs to be known. 2816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIf it is not possible to get an estimation of lost frames then a constant 2836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfullness of the audio output buffer can be achieved by implementing different 2846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKFIFO control techniques e.g. just stop taking of samples from the buffer to 2856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKavoid underflow or stop filling new data to the buffer to avoid overflow. But 2866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthis techniques are out of scope of this document. 2876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKFor a detailed description of a specific error code please refer also to 2896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK::AAC_DECODER_ERROR. 2902228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section BufferSystem Buffer System 2922228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 2936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThere are three main buffers in an AAC decoder application. One external input 2946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer to hold bitstream data from file I/O or elsewhere, one decoder-internal 2956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKinput buffer, and one to hold the decoded output PCM sample data. In resource 2966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKlimited applications, the output buffer may be reused as an external input 2976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer prior to the subsequence aacDecoder_Fill() function call. 2986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe external input buffer is set in the example program and its size is defined 3006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKby ::IN_BUF_SIZE. You may freely choose different buffer sizes. To feed the data 3016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKto the decoder-internal input buffer, use the function aacDecoder_Fill(). This 3026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfunction returns important information regarding the number of bytes in the 3036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKexternal input buffer that have not yet been copied into the internal input 3046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer (variable bytesValid). Once the external buffer has been fully copied, it 3056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcan be completely re-filled again. In case you wish to refill the buffer while 3066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthere are unprocessed bytes (bytesValid is unequal 0), you should preserve the 3076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKunconsumed data. However, we recommend to refill the buffer only when bytesValid 3086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKreturns 0. 3096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe bytesValid parameter is an input and output parameter to the FDK decoder. As 3116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKan input, it signals how many valid bytes are available in the external buffer. 3126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKAfter consumption of the external buffer using aacDecoder_Fill() function, the 3136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbytesValid parameter indicates if any of the bytes in the external buffer were 3146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKnot consumed. 3156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK\image latex dec_buffer.png "Life cycle of the external input buffer" width=9cm 3172228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3182228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\page OutputFormat Decoder audio output 3192228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3202228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section OutputFormatObtaining Obtaining channel mapping information 3212228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe decoded audio output format is indicated by a set of variables of the 3236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCStreamInfo structure. While the struct members sampleRate, frameSize and 3246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKnumChannels might be self explanatory, pChannelType and pChannelIndices require 3256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsome further explanation. 3262228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThese two arrays indicate the configuration of channel data within the output 3286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKbuffer. Both arrays have CStreamInfo::numChannels number of cells. Each cell of 3296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKpChannelType indicates the channel type, which is described in the enum 3306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK::AUDIO_CHANNEL_TYPE (defined in FDK_audio.h). The cells of pChannelIndices 3316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKindicate the sub index among the channels starting with 0 among channels of the 3326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKsame audio channel type. 3332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe indexing scheme is structured as defined in MPEG-2/4 Standards. Indices 3356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKstart from the front direction (a center channel if available, will always be 3366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKindex 0) and increment, starting with the left side, pairwise (e.g. L, R) and 3376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfrom front to back (Front L, Front R, Surround L, Surround R). For detailed 3386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKexplanation, please refer to ISO/IEC 13818-7:2005(E), chapter 8.5.3.2. 3392228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn case a Program Config is included in the audio configuration, the channel 3416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKmapping described within it will be adopted. 3422228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn case of MPEG-D Surround the channel mapping will follow the same criteria 3446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdescribed in ISO/IEC 13818-7:2005(E), but adding corresponding top channels (if 3456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKavailable) to the channel types in order to avoid ambiguity. The examples below 3466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKexplain these aspects in detail. 3472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3482228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section OutputFormatChange Changing the audio output format 3492228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKFor MPEG-4 audio the channel order can be changed at runtime through the 3516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKparameter 3526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK::AAC_PCM_OUTPUT_CHANNEL_MAPPING. See the description of those 3536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKparameters and the decoder library function aacDecoder_SetParam() for more 3546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdetail. 3552228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\section OutputFormatExample Channel mapping examples 3572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe following examples illustrate the location of individual audio samples in 3596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKthe audio buffer that is passed to aacDecoder_DecodeFrame() and the expected 3606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKdata in the CStreamInfo structure which can be obtained by calling 3616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_GetStreamInfo(). 3622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3632228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\subsection ExamplesStereo Stereo 3642228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn case of ::AAC_PCM_OUTPUT_CHANNEL_MAPPING set to 1, 3666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKa AAC-LC bit stream which has channelConfiguration = 2 in its audio specific 3676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKconfig would lead to the following values in CStreamInfo: 3682228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3692228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::numChannels = 2 3702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3712228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::pChannelType = { ::ACT_FRONT, ::ACT_FRONT } 3722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3732228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::pChannelIndices = { 0, 1 } 3742228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe output buffer will be formatted as follows: 3762228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3772228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\verbatim 3782228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project <left sample 0> <left sample 1> <left sample 2> ... <left sample N> 3792228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project <right sample 0> <right sample 1> <right sample 2> ... <right sample N> 3802228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\endverbatim 3812228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3822228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectWhere N equals to CStreamInfo::frameSize . 3832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3842228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\subsection ExamplesSurround Surround 5.1 3852228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn case of ::AAC_PCM_OUTPUT_CHANNEL_MAPPING set to 1, 3876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKa AAC-LC bit stream which has channelConfiguration = 6 in its audio specific 3886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKconfig, would lead to the following values in CStreamInfo: 3892228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3902228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::numChannels = 6 3912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCStreamInfo::pChannelType = { ::ACT_FRONT, ::ACT_FRONT, ::ACT_FRONT, ::ACT_LFE, 3936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK::ACT_BACK, ::ACT_BACK } 3942228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3952228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::pChannelIndices = { 1, 2, 0, 0, 0, 1 } 3962228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 3976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKSince ::AAC_PCM_OUTPUT_CHANNEL_MAPPING is 1, WAV file channel ordering will be 3986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKused. For a 5.1 channel scheme, thus the channels would be: front left, front 3996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKright, center, LFE, surround left, surround right. Thus the third channel is the 4006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcenter channel, receiving the index 0. The other front channels are front left, 4016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKfront right being placed as first and second channels with indices 1 and 2 4026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKcorrespondingly. There is only one LFE, placed as the fourth channel and index 4036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK0. Finally both surround channels get the type definition ACT_BACK, and the 4046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKindices 0 and 1. 4052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKThe output buffer will be formatted as follows: 4072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4082228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\verbatim 4092228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample 0> <front right sample 0> 4102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<center sample 0> <LFE sample 0> 4112228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<surround left sample 0> <surround right sample 0> 4122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample 1> <front right sample 1> 4142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<center sample 1> <LFE sample 1> 4152228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<surround left sample 1> <surround right sample 1> 4162228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4172228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project... 4182228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4192228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample N> <front right sample N> 4202228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<center sample N> <LFE sample N> 4212228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<surround left sample N> <surround right sample N> 4222228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\endverbatim 4232228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4242228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectWhere N equals to CStreamInfo::frameSize . 4252228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4262228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\subsection ExamplesArib ARIB coding mode 2/1 4272228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKIn case of ::AAC_PCM_OUTPUT_CHANNEL_MAPPING set to 1, 4296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKin case of a ARIB bit stream using coding mode 2/1 as described in ARIB STD-B32 4306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKPart 2 Version 2.1-E1, page 61, would lead to the following values in 4316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCStreamInfo: 4322228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4332228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::numChannels = 3 4342228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKCStreamInfo::pChannelType = { ::ACT_FRONT, ::ACT_FRONT, ::ACT_BACK } 4362228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4372228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectCStreamInfo::pChannelIndices = { 0, 1, 0 } 4382228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4392228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectThe audio channels will be placed as follows in the audio output buffer: 4402228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4412228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\verbatim 4422228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample 0> <front right sample 0> <mid surround sample 0> 4432228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4442228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample 1> <front right sample 1> <mid surround sample 1> 4452228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4462228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project... 4472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4482228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project<front left sample N> <front right sample N> <mid surround sample N> 4492228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4502228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectWhere N equals to CStreamInfo::frameSize . 4512228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4522228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project\endverbatim 4532228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4542228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project*/ 4552228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#include "machine_type.h" 4572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#include "FDK_audio.h" 4582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4592228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#include "genericStds.h" 4602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 4612228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief AAC decoder error codes. 4622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 4632228e360595641dd906bf1773307f43d304f5b2The Android Open Source Projecttypedef enum { 4646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_OK = 4656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0000, /*!< No error occurred. Output buffer is valid and error free. */ 4666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_OUT_OF_MEMORY = 4676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0002, /*!< Heap returned NULL pointer. Output buffer is invalid. */ 4686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNKNOWN = 4696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0005, /*!< Error condition is of unknown reason, or from a another 4706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK module. Output buffer is invalid. */ 4712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Synchronization errors. Output buffer is invalid. */ 4736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_sync_error_start = 0x1000, 4746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_TRANSPORT_SYNC_ERROR = 0x1001, /*!< The transport decoder had 4756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK synchronization problems. Do not 4766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK exit decoding. Just feed new 4776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK bitstream data. */ 4786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_NOT_ENOUGH_BITS = 0x1002, /*!< The input buffer ran out of bits. */ 4796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_sync_error_end = 0x1FFF, 4802228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 4812228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Initialization errors. Output buffer is invalid. */ 4826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_init_error_start = 0x2000, 4836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_INVALID_HANDLE = 4846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2001, /*!< The handle passed to the function call was invalid (NULL). */ 4856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_AOT = 4866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2002, /*!< The AOT found in the configuration is not supported. */ 4876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_FORMAT = 4886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2003, /*!< The bitstream format is not supported. */ 4896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_ER_FORMAT = 4906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2004, /*!< The error resilience tool format is not supported. */ 4916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_EPCONFIG = 4926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2005, /*!< The error protection format is not supported. */ 4936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_MULTILAYER = 4946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2006, /*!< More than one layer for AAC scalable is not supported. */ 4956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_CHANNELCONFIG = 4966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2007, /*!< The channel configuration (either number or arrangement) is 4976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK not supported. */ 4986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_SAMPLINGRATE = 0x2008, /*!< The sample rate specified in 4996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the configuration is not 5006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK supported. */ 5016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_INVALID_SBR_CONFIG = 5026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x2009, /*!< The SBR configuration is not supported. */ 5036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_SET_PARAM_FAIL = 0x200A, /*!< The parameter could not be set. Either 5046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the value was out of range or the 5056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK parameter does not exist. */ 5066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_NEED_TO_RESTART = 0x200B, /*!< The decoder needs to be restarted, 5076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK since the required configuration change 5086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK cannot be performed. */ 5096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_OUTPUT_BUFFER_TOO_SMALL = 5106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x200C, /*!< The provided output buffer is too small. */ 5116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_init_error_end = 0x2FFF, 5122228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 5132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Decode errors. Output buffer is valid but concealed. */ 5146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_decode_error_start = 0x4000, 5156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_TRANSPORT_ERROR = 5166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x4001, /*!< The transport decoder encountered an unexpected error. */ 5176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_PARSE_ERROR = 0x4002, /*!< Error while parsing the bitstream. Most 5186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK probably it is corrupted, or the system 5196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK crashed. */ 5206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_EXTENSION_PAYLOAD = 5216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x4003, /*!< Error while parsing the extension payload of the bitstream. 5226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK The extension payload type found is not supported. */ 5236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_DECODE_FRAME_ERROR = 0x4004, /*!< The parsed bitstream value is out of 5246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK range. Most probably the bitstream is 5256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK corrupt, or the system crashed. */ 5266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_CRC_ERROR = 0x4005, /*!< The embedded CRC did not match. */ 5276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_INVALID_CODE_BOOK = 0x4006, /*!< An invalid codebook was signaled. 5286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Most probably the bitstream is corrupt, 5296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK or the system crashed. */ 5306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_PREDICTION = 5316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x4007, /*!< Predictor found, but not supported in the AAC Low Complexity 5326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK profile. Most probably the bitstream is corrupt, or has a wrong 5336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK format. */ 5346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_CCE = 0x4008, /*!< A CCE element was found which is not 5356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK supported. Most probably the bitstream is 5366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK corrupt, or has a wrong format. */ 5376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_LFE = 0x4009, /*!< A LFE element was found which is not 5386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK supported. Most probably the bitstream is 5396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK corrupt, or has a wrong format. */ 5406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_GAIN_CONTROL_DATA = 5416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x400A, /*!< Gain control data found but not supported. Most probably the 5426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK bitstream is corrupt, or has a wrong format. */ 5436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_UNSUPPORTED_SBA = 5446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x400B, /*!< SBA found, but currently not supported in the BSAC profile. 5456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 5466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_TNS_READ_ERROR = 0x400C, /*!< Error while reading TNS data. Most 5476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK probably the bitstream is corrupt or the 5486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK system crashed. */ 5496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_RVLC_ERROR = 5506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x400D, /*!< Error while decoding error resilient data. */ 5516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_decode_error_end = 0x4FFF, 5522228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Ancillary data errors. Output buffer is valid. */ 5536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_anc_data_error_start = 0x8000, 5546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_ANC_DATA_ERROR = 5556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x8001, /*!< Non severe error concerning the ancillary data handling. */ 5566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_TOO_SMALL_ANC_BUFFER = 0x8002, /*!< The registered ancillary data 5576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK buffer is too small to receive the 5586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK parsed data. */ 5596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DEC_TOO_MANY_ANC_ELEMENTS = 0x8003, /*!< More than the allowed number of 5606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ancillary data elements should be 5616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK written to buffer. */ 5626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aac_dec_anc_data_error_end = 0x8FFF 5632228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 5642228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} AAC_DECODER_ERROR; 5652228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 5666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/** Macro to identify initialization errors. Output buffer is invalid. */ 5676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define IS_INIT_ERROR(err) \ 5686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ((((err) >= aac_dec_init_error_start) && ((err) <= aac_dec_init_error_end)) \ 5696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ? 1 \ 5706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK : 0) 5716cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/** Macro to identify decode errors. Output buffer is valid but concealed. */ 5726cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define IS_DECODE_ERROR(err) \ 5736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ((((err) >= aac_dec_decode_error_start) && \ 5746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ((err) <= aac_dec_decode_error_end)) \ 5756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ? 1 \ 5766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK : 0) 5776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/** 5786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * Macro to identify if the audio output buffer contains valid samples after 5796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * calling aacDecoder_DecodeFrame(). Output buffer is valid but can be 5806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * concealed. 5816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 5826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define IS_OUTPUT_VALID(err) (((err) == AAC_DEC_OK) || IS_DECODE_ERROR(err)) 5832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 5846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/*! \enum AAC_MD_PROFILE 5856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief The available metadata profiles which are mostly related to downmixing. The values define the arguments 5866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * for the use with parameter ::AAC_METADATA_PROFILE. 5876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 5886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtypedef enum { 5896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_MD_PROFILE_MPEG_STANDARD = 5906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0, /*!< The standard profile creates a mixdown signal based on the 5916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK advanced downmix metadata (from a DSE). The equations and default 5926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK values are defined in ISO/IEC 14496:3 Ammendment 4. Any other 5936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK (legacy) downmix metadata will be ignored. No other parameter will 5946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK be modified. */ 5956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_MD_PROFILE_MPEG_LEGACY = 5966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1, /*!< This profile behaves identical to the standard profile if advanced 5976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK downmix metadata (from a DSE) is available. If not, the 5986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK matrix_mixdown information embedded in the program configuration 5996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK element (PCE) will be applied. If neither is the case, the module 6006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK creates a mixdown using the default coefficients as defined in 6016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ISO/IEC 14496:3 AMD 4. The profile can be used to support legacy 6026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK digital TV (e.g. DVB) streams. */ 6036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_MD_PROFILE_MPEG_LEGACY_PRIO = 6046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2, /*!< Similar to the ::AAC_MD_PROFILE_MPEG_LEGACY profile but if both 6056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the advanced (ISO/IEC 14496:3 AMD 4) and the legacy (PCE) MPEG 6066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK downmix metadata are available the latter will be applied. 6076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 6086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_MD_PROFILE_ARIB_JAPAN = 6096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3 /*!< Downmix creation as described in ABNT NBR 15602-2. But if advanced 6106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK downmix metadata (ISO/IEC 14496:3 AMD 4) is available it will be 6116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK preferred because of the higher resolutions. In addition the 6126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK metadata expiry time will be set to the value defined in the ARIB 6136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK standard (see ::AAC_METADATA_EXPIRY_TIME). 6146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 6156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK} AAC_MD_PROFILE; 6166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 6176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/*! \enum AAC_DRC_DEFAULT_PRESENTATION_MODE_OPTIONS 6186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Options for handling of DRC parameters, if presentation mode is not indicated in bitstream 6196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 6206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtypedef enum { 6216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_PARAMETER_HANDLING_DISABLED = -1, /*!< DRC parameter handling 6226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK disabled, all parameters are 6236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK applied as requested. */ 6246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_PARAMETER_HANDLING_ENABLED = 6256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0, /*!< Apply changes to requested DRC parameters to prevent clipping. */ 6266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_PRESENTATION_MODE_1_DEFAULT = 6276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1, /*!< Use DRC presentation mode 1 as default (e.g. for Nordig) */ 6286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_PRESENTATION_MODE_2_DEFAULT = 6296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2 /*!< Use DRC presentation mode 2 as default (e.g. for DTG DBook) */ 6306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK} AAC_DRC_DEFAULT_PRESENTATION_MODE_OPTIONS; 6312228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 6322228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 6332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief AAC decoder setting parameters 6342228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 6356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtypedef enum { 6366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_DUAL_CHANNEL_OUTPUT_MODE = 6376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0002, /*!< Defines how the decoder processes two channel signals: \n 6386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0: Leave both signals as they are (default). \n 6396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1: Create a dual mono output signal from channel 1. \n 6406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2: Create a dual mono output signal from channel 2. \n 6416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3: Create a dual mono output signal by mixing both channels 6426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK (L' = R' = 0.5*Ch1 + 0.5*Ch2). */ 6436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_OUTPUT_CHANNEL_MAPPING = 6446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0003, /*!< Output buffer channel ordering. 0: MPEG PCE style order, 1: 6456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK WAV file channel order (default). */ 6466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_LIMITER_ENABLE = 6476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0004, /*!< Enable signal level limiting. \n 6486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK -1: Auto-config. Enable limiter for all 6496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK non-lowdelay configurations by default. \n 6506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0: Disable limiter in general. \n 6516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1: Enable limiter always. 6526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK It is recommended to call the decoder 6536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK with a AACDEC_CLRHIST flag to reset all 6546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK states when the limiter switch is changed 6556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK explicitly. */ 6566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_LIMITER_ATTACK_TIME = 0x0005, /*!< Signal level limiting attack time 6576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK in ms. Default configuration is 15 6586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ms. Adjustable range from 1 ms to 15 6596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ms. */ 6606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_LIMITER_RELEAS_TIME = 0x0006, /*!< Signal level limiting release time 6616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK in ms. Default configuration is 50 6626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ms. Adjustable time must be larger 6636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK than 0 ms. */ 6646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_MIN_OUTPUT_CHANNELS = 6656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0011, /*!< Minimum number of PCM output channels. If higher than the 6666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK number of encoded audio channels, a simple channel extension is 6676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK applied (see note 4 for exceptions). \n -1, 0: Disable channel 6686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK extension feature. The decoder output contains the same number 6696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK of channels as the encoded bitstream. \n 1: This value is 6706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK currently needed only together with the mix-down feature. See 6716cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::AAC_PCM_MAX_OUTPUT_CHANNELS and note 2 below. \n 6726cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2: Encoded mono signals will be duplicated to achieve a 6736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2/0/0.0 channel output configuration. \n 6: The decoder 6746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK tries to reorder encoded signals with less than six channels to 6756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK achieve a 3/0/2.1 channel output signal. Missing channels will 6766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK be filled with a zero signal. If reordering is not possible the 6776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK empty channels will simply be appended. Only available if 6786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK instance is configured to support multichannel output. \n 8: 6796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK The decoder tries to reorder encoded signals with less than 6806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK eight channels to achieve a 3/0/4.1 channel output signal. 6816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Missing channels will be filled with a zero signal. If 6826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK reordering is not possible the empty channels will simply be 6836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK appended. Only available if instance is configured to 6846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK support multichannel output.\n NOTE: \n 6856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1. The channel signaling (CStreamInfo::pChannelType and 6866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK CStreamInfo::pChannelIndices) will not be modified. Added empty 6876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK channels will be signaled with channel type 6886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AUDIO_CHANNEL_TYPE::ACT_NONE. \n 6896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2. If the parameter value is greater than that of 6906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::AAC_PCM_MAX_OUTPUT_CHANNELS both will be set to the same 6916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK value. \n 6926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3. This parameter does not affect MPEG Surround processing. 6936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK \n 6946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 4. This parameter will be ignored if the number of encoded 6956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK audio channels is greater than 8. */ 6966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_PCM_MAX_OUTPUT_CHANNELS = 6976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0012, /*!< Maximum number of PCM output channels. If lower than the 6986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK number of encoded audio channels, downmixing is applied 6996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK accordingly (see note 5 for exceptions). If dedicated metadata 7006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK is available in the stream it will be used to achieve better 7016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK mixing results. \n -1, 0: Disable downmixing feature. The 7026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK decoder output contains the same number of channels as the 7036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK encoded bitstream. \n 1: All encoded audio configurations 7046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK with more than one channel will be mixed down to one mono 7056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK output signal. \n 2: The decoder performs a stereo mix-down 7066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK if the number encoded audio channels is greater than two. \n 6: 7076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK If the number of encoded audio channels is greater than six the 7086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK decoder performs a mix-down to meet the target output 7096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK configuration of 3/0/2.1 channels. Only available if instance 7106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK is configured to support multichannel output. \n 8: This 7116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK value is currently needed only together with the channel 7126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK extension feature. See ::AAC_PCM_MIN_OUTPUT_CHANNELS and note 2 7136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK below. Only available if instance is configured to support 7146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK multichannel output. \n NOTE: \n 7156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1. Down-mixing of any seven or eight channel configuration 7166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK not defined in ISO/IEC 14496-3 PDAM 4 is not supported by this 7176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK software version. \n 7186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2. If the parameter value is greater than zero but smaller 7196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK than ::AAC_PCM_MIN_OUTPUT_CHANNELS both will be set to same 7206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK value. \n 7216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 3. The operating mode of the MPEG Surround module will be 7226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK set accordingly. \n 7236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 4. Setting this parameter with any value will disable the 7246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK binaural processing of the MPEG Surround module 7256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 5. This parameter will be ignored if the number of encoded 7266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK audio channels is greater than 8. */ 7276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_METADATA_PROFILE = 7286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0020, /*!< See ::AAC_MD_PROFILE for all available values. */ 7296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_METADATA_EXPIRY_TIME = 0x0021, /*!< Defines the time in ms after which all 7306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the bitstream associated meta-data (DRC, 7316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK downmix coefficients, ...) will be reset 7326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK to default if no update has been 7336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK received. Negative values disable the 7346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK feature. */ 7356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 7366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_CONCEAL_METHOD = 0x0100, /*!< Error concealment: Processing method. \n 7376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0: Spectral muting. \n 7386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1: Noise substitution (see ::CONCEAL_NOISE). 7396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK \n 2: Energy interpolation (adds additional 7406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK signal delay of one frame, see 7416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::CONCEAL_INTER. only some AOTs are 7426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK supported). \n */ 7436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_BOOST_FACTOR = 7446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0200, /*!< Dynamic Range Control: Scaling factor for boosting gain 7456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK values. Defines how the boosting DRC factors (conveyed in the 7466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK bitstream) will be applied to the decoded signal. The valid 7476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK values range from 0 (don't apply boost factors) to 127 (fully 7486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK apply boost factors). Default value is 0. */ 7496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_ATTENUATION_FACTOR = 7506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0201, /*!< Dynamic Range Control: Scaling factor for attenuating gain 7516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK values. Same as 7526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::AAC_DRC_BOOST_FACTOR but for attenuating DRC factors. */ 7536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_REFERENCE_LEVEL = 7546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0202, /*!< Dynamic Range Control (DRC): Target reference level. Defines 7556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the level below full-scale (quantized in steps of 0.25dB) to 7566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK which the output audio signal will be normalized to by the DRC 7576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK module. The parameter controls loudness normalization for both 7586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK MPEG-4 DRC and MPEG-D DRC. The valid values range from 40 (-10 7596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK dBFS) to 127 (-31.75 dBFS). Any value smaller than 0 switches 7606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK off loudness normalization and MPEG-4 DRC. By default, loudness 7616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK normalization and MPEG-4 DRC is switched off. */ 7626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_HEAVY_COMPRESSION = 7636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0203, /*!< Dynamic Range Control: En-/Disable DVB specific heavy 7646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK compression (aka RF mode). If set to 1, the decoder will apply 7656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK the compression values from the DVB specific ancillary data 7666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK field. At the same time the MPEG-4 Dynamic Range Control tool 7676cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK will be disabled. By default, heavy compression is disabled. */ 7686cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_DEFAULT_PRESENTATION_MODE = 7696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0204, /*!< Dynamic Range Control: Default presentation mode (DRC 7706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK parameter handling). \n Defines the handling of the DRC 7716cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK parameters boost factor, attenuation factor and heavy 7726cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK compression, if no presentation mode is indicated in the 7736cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK bitstream.\n For options, see 7746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::AAC_DRC_DEFAULT_PRESENTATION_MODE_OPTIONS.\n Default: 7756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK ::AAC_DRC_PARAMETER_HANDLING_DISABLED */ 7766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_DRC_ENC_TARGET_LEVEL = 7776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0205, /*!< Dynamic Range Control: Encoder target level for light (i.e. 7786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK not heavy) compression.\n If known, this declares the target 7796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK reference level that was assumed at the encoder for calculation 7806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK of limiting gains. The valid values range from 0 (full-scale) 7816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK to 127 (31.75 dB below full-scale). This parameter is used only 7826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK with ::AAC_DRC_PARAMETER_HANDLING_ENABLED and ignored 7836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK otherwise.\n Default: 127 (worst-case assumption).\n */ 7846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_QMF_LOWPOWER = 0x0300, /*!< Quadrature Mirror Filter (QMF) Bank processing 7856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK mode. \n -1: Use internal default. Implies MPEG 7866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Surround partially complex accordingly. \n 0: 7876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Use complex QMF data mode. \n 1: Use real (low 7886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK power) QMF data mode. \n */ 7896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_TPDEC_CLEAR_BUFFER = 7906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0x0603, /*!< Clear internal bit stream buffer of transport layers. The 7916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK decoder will start decoding at new data passed after this event 7926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK and any previous data is discarded. */ 7936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC_UNIDRC_SET_EFFECT = 0x0903 /*!< MPEG-D DRC: Request a DRC effect type for 7946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK selection of a DRC set.\n Supported indices 7956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK are:\n -1: DRC off. Completely disables 7966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK MPEG-D DRC.\n 0: None (default). Disables 7976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK MPEG-D DRC, but automatically enables DRC if 7986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK necessary to prevent clipping.\n 1: Late 7996cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK night\n 2: Noisy environment\n 3: Limited 8006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK playback range\n 4: Low playback level\n 5: 8016cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Dialog enhancement\n 6: General compression. 8026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Used for generally enabling MPEG-D DRC 8036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK without particular request.\n */ 8042228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 8052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} AACDEC_PARAM; 8062228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 8072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 8086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief This structure gives information about the currently decoded audio 8096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * data. All fields are read-only. 8102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 8116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtypedef struct { 8126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK /* These five members are the only really relevant ones for the user. */ 8136cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT sampleRate; /*!< The sample rate in Hz of the decoded PCM audio signal. */ 8146cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT frameSize; /*!< The frame size of the decoded PCM audio signal. \n 8156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Typically this is: \n 8166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1024 or 960 for AAC-LC \n 8176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2048 or 1920 for HE-AAC (v2) \n 8186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 512 or 480 for AAC-LD and AAC-ELD \n 8196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 768, 1024, 2048 or 4096 for USAC */ 8206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT numChannels; /*!< The number of output audio channels before the rendering 8216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK module, i.e. the original channel configuration. */ 8226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AUDIO_CHANNEL_TYPE 8236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK *pChannelType; /*!< Audio channel type of each output audio channel. */ 8246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UCHAR *pChannelIndices; /*!< Audio channel index for each output audio 8256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK channel. See ISO/IEC 13818-7:2005(E), 8.5.3.2 8266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Explicit channel mapping using a 8276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK program_config_element() */ 8282228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Decoder internal members. */ 8296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT aacSampleRate; /*!< Sampling rate in Hz without SBR (from configuration 8306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK info) divided by a (ELD) downscale factor if present. */ 8316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT profile; /*!< MPEG-2 profile (from file header) (-1: not applicable (e. g. 8326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK MPEG-4)). */ 8336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AUDIO_OBJECT_TYPE 8346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK aot; /*!< Audio Object Type (from ASC): is set to the appropriate value 8356cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK for MPEG-2 bitstreams (e. g. 2 for AAC-LC). */ 8366cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT channelConfig; /*!< Channel configuration (0: PCE defined, 1: mono, 2: 8376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK stereo, ... */ 8386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT bitRate; /*!< Instantaneous bit rate. */ 8396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT aacSamplesPerFrame; /*!< Samples per frame for the AAC core (from ASC) 8406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK divided by a (ELD) downscale factor if present. \n 8416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Typically this is (with a downscale factor of 1): 8426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK \n 1024 or 960 for AAC-LC \n 512 or 480 for 8436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AAC-LD and AAC-ELD */ 8446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT aacNumChannels; /*!< The number of audio channels after AAC core 8456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK processing (before PS or MPS processing). CAUTION: This 8466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK are not the final number of output channels! */ 8476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK AUDIO_OBJECT_TYPE extAot; /*!< Extension Audio Object Type (from ASC) */ 8486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT extSamplingRate; /*!< Extension sampling rate in Hz (from ASC) divided by 8496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK a (ELD) downscale factor if present. */ 8506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 8516cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UINT outputDelay; /*!< The number of samples the output is additionally 8526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK delayed by.the decoder. */ 8536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UINT flags; /*!< Copy of internal flags. Only to be written by the decoder, 8546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK and only to be read externally. */ 8556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 8566cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK SCHAR epConfig; /*!< epConfig level (from ASC): only level 0 supported, -1 8576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK means no ER (e. g. AOT=2, MPEG-2 AAC, etc.) */ 8582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project /* Statistics */ 8596cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT numLostAccessUnits; /*!< This integer will reflect the estimated amount of 8606cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK lost access units in case aacDecoder_DecodeFrame() 8616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK returns AAC_DEC_TRANSPORT_SYNC_ERROR. It will be 8626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK < 0 if the estimation failed. */ 8636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 864f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK INT64 numTotalBytes; /*!< This is the number of total bytes that have passed 865f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK through the decoder. */ 866f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK INT64 867f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK numBadBytes; /*!< This is the number of total bytes that were considered 868f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK with errors from numTotalBytes. */ 869f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK INT64 870f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK numTotalAccessUnits; /*!< This is the number of total access units that 871f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK have passed through the decoder. */ 872f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK INT64 numBadAccessUnits; /*!< This is the number of total access units that 873f19e863cce96cc1e5f4ad7ce512810d5a2843ea6Fraunhofer IIS FDK were considered with errors from numTotalBytes. */ 8742228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 8758e087bf394c5ceddcdb8b1d029795aff3026eea0Jean-Michel Trivi /* Metadata */ 8766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK SCHAR drcProgRefLev; /*!< DRC program reference level. Defines the reference 8776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK level below full-scale. It is quantized in steps of 8786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 0.25dB. The valid values range from 0 (0 dBFS) to 127 8796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK (-31.75 dBFS). It is used to reflect the average 8806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK loudness of the audio in LKFS according to ITU-R BS 8816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1770. If no level has been found in the bitstream the 8826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK value is -1. */ 8836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK SCHAR 8846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK drcPresMode; /*!< DRC presentation mode. According to ETSI TS 101 154, 8856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK this field indicates whether light (MPEG-4 Dynamic Range 8866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK Control tool) or heavy compression (DVB heavy 8876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK compression) dynamic range control shall take priority 8886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK on the outputs. For details, see ETSI TS 101 154, table 8896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK C.33. Possible values are: \n -1: No corresponding 8906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK metadata found in the bitstream \n 0: DRC presentation 8916cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK mode not indicated \n 1: DRC presentation mode 1 \n 2: 8926cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK DRC presentation mode 2 \n 3: Reserved */ 8938e087bf394c5ceddcdb8b1d029795aff3026eea0Jean-Michel Trivi 8942228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} CStreamInfo; 8952228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 8966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKtypedef struct AAC_DECODER_INSTANCE 8976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK *HANDLE_AACDECODER; /*!< Pointer to a AAC decoder instance. */ 8982228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 8992228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#ifdef __cplusplus 9006cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKextern "C" { 9012228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif 9022228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9032228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9042228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Initialize ancillary data buffer. 9052228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 9062228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 9072228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param buffer Pointer to (external) ancillary data buffer. 9082228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param size Size of the buffer pointed to by buffer. 9092228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Error code. 9102228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_AncDataInit(HANDLE_AACDECODER self, 9126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UCHAR *buffer, int size); 9132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9152228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Get one ancillary data element. 9162228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 9172228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 9182228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param index Index of the ancillary data element to get. 9196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param ptr Pointer to a buffer receiving a pointer to the requested 9206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * ancillary data element. 9216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param size Pointer to a buffer receiving the length of the requested 9226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * ancillary data element. 9232228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Error code. 9242228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_AncDataGet(HANDLE_AACDECODER self, 9266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK int index, UCHAR **ptr, 9276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK int *size); 9282228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9292228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9302228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Set one single decoder parameter. 9312228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 9322228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 9332228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param param Parameter to be set. 9342228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param value Parameter value. 9352228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Error code. 9362228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_SetParam(const HANDLE_AACDECODER self, 9386cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const AACDEC_PARAM param, 9396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const INT value); 9402228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9412228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Get free bytes inside decoder internal buffer. 9436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param self Handle of AAC decoder instance. 9446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param pFreeBytes Pointer to variable receiving amount of free bytes inside 9456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * decoder internal buffer. 9466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return Error code. 9472228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9482228e360595641dd906bf1773307f43d304f5b2The Android Open Source ProjectLINKSPEC_H AAC_DECODER_ERROR 9496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKaacDecoder_GetFreeBytes(const HANDLE_AACDECODER self, UINT *pFreeBytes); 9502228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9512228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Open an AAC decoder instance. 9536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param transportFmt The transport type to be used. 9546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param nrOfLayers Number of transport layers. 9556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return AAC decoder handle. 9562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9576cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H HANDLE_AACDECODER aacDecoder_Open(TRANSPORT_TYPE transportFmt, 9586cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UINT nrOfLayers); 9592228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Explicitly configure the decoder by passing a raw AudioSpecificConfig 9626cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * (ASC) or a StreamMuxConfig (SMC), contained in a binary buffer. This is 9636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * required for MPEG-4 and Raw Packets file format bitstreams as well as for 9646cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * LATM bitstreams with no in-band SMC. If the transport format is LATM with or 9656cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * without LOAS, configuration is assumed to be an SMC, for all other file 9666cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * formats an ASC. 9672228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 9682228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 9696cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param conf Pointer to an unsigned char buffer containing the binary 9706cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * configuration buffer (either ASC or SMC). 9712228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param length Length of the configuration buffer in bytes. 9722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Error code. 9732228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 9746cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_ConfigRaw(HANDLE_AACDECODER self, 9756cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UCHAR *conf[], 9766cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const UINT length[]); 9772228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9786cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK/** 9796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Submit raw ISO base media file format boxes to decoder for parsing 9806cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * (only some box types are recognized). 9816cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * 9826cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param self AAC decoder handle. 9836cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param buffer Pointer to an unsigned char buffer containing the binary box 9846cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * data (including size and type, can be a sequence of multiple boxes). 9856cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param length Length of the data in bytes. 9866cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return Error code. 9876cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK */ 9886cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_RawISOBMFFData(HANDLE_AACDECODER self, 9896cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UCHAR *buffer, 9906cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UINT length); 9912228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 9922228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 9936cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Fill AAC decoder's internal input buffer with bitstream data from the 9946cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * external input buffer. The function only copies such data as long as the 9956cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * decoder-internal input buffer is not full. So it grabs whatever it can from 9966cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * pBuffer and returns information (bytesValid) so that at a subsequent call of 9976cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * %aacDecoder_Fill(), the right position in pBuffer can be determined to grab 9986cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * the next data. 9992228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 10002228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 10012228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param pBuffer Pointer to external input buffer. 10026cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param bufferSize Size of external input buffer. This argument is required 10036cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * because decoder-internally we need the information to calculate the offset to 10046cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * pBuffer, where the next available data is, which is then 10056cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * fed into the decoder-internal buffer (as much as 10066cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * possible). Our example framework implementation fills the 10076cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * buffer at pBuffer again, once it contains no available valid bytes anymore 10086cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * (meaning bytesValid equal 0). 10096cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param bytesValid Number of bitstream bytes in the external bitstream buffer 10106cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * that have not yet been copied into the decoder's internal bitstream buffer by 10116cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * calling this function. The value is updated according to 10126cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * the amount of newly copied bytes. 10132228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Error code. 10142228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 10156cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_Fill(HANDLE_AACDECODER self, 10166cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UCHAR *pBuffer[], 10176cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const UINT bufferSize[], 10186cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK UINT *bytesValid); 10196cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 10206cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define AACDEC_CONCEAL \ 10216cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 1 /*!< Flag for aacDecoder_DecodeFrame(): Trigger the built-in error \ 10226cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK concealment module to generate a substitute signal for one lost frame. \ 10236cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK New input data will not be considered. */ 10246cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define AACDEC_FLUSH \ 10256cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 2 /*!< Flag for aacDecoder_DecodeFrame(): Flush all filterbanks to get all \ 10266cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK delayed audio without having new input data. Thus new input data will \ 10276cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK not be considered.*/ 10286cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define AACDEC_INTR \ 10296cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 4 /*!< Flag for aacDecoder_DecodeFrame(): Signal an input bit stream data \ 10306cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK discontinuity. Resync any internals as necessary. */ 10316cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK#define AACDEC_CLRHIST \ 10326cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK 8 /*!< Flag for aacDecoder_DecodeFrame(): Clear all signal delay lines and \ 10336cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK history buffers. CAUTION: This can cause discontinuities in the output \ 10346cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK signal. */ 10352228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10362228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 10376cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \brief Decode one audio frame 10382228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 10396cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param self AAC decoder handle. 10406cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param pTimeData Pointer to external output buffer where the decoded PCM 10416cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * samples will be stored into. 10426cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param timeDataSize Size of external output buffer. 10436cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \param flags Bit field with flags for the decoder: \n 10446cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * (flags & AACDEC_CONCEAL) == 1: Do concealment. \n 10456cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * (flags & AACDEC_FLUSH) == 2: Discard input data. Flush 10466cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * filter banks (output delayed audio). \n (flags & AACDEC_INTR) == 4: Input 10476cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * data is discontinuous. Resynchronize any internals as 10486cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * necessary. \n (flags & AACDEC_CLRHIST) == 8: Clear all signal delay lines and 10496cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * history buffers. 10506cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return Error code. 10512228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 10526cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H AAC_DECODER_ERROR aacDecoder_DecodeFrame(HANDLE_AACDECODER self, 10536cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK INT_PCM *pTimeData, 10546cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const INT timeDataSize, 10556cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK const UINT flags); 10562228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10572228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 10582228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief De-allocate all resources of an AAC decoder instance. 10592228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 10602228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 10616cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return void. 10622228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 10636cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H void aacDecoder_Close(HANDLE_AACDECODER self); 10642228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10652228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 10662228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Get CStreamInfo handle from decoder. 10672228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 10682228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param self AAC decoder handle. 10692228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \return Reference to requested CStreamInfo. 10702228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 10716cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H CStreamInfo *aacDecoder_GetStreamInfo(HANDLE_AACDECODER self); 10722228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10732228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project/** 10742228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \brief Get decoder library info. 10752228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * 10762228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project * \param info Pointer to an allocated LIB_INFO structure. 10776cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDK * \return 0 on success. 10782228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project */ 10796cfabd35363c3ef5e3b209b867169a500b3ccc3cFraunhofer IIS FDKLINKSPEC_H INT aacDecoder_GetLibInfo(LIB_INFO *info); 10802228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10812228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#ifdef __cplusplus 10822228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project} 10832228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif 10842228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project 10852228e360595641dd906bf1773307f43d304f5b2The Android Open Source Project#endif /* AACDECODER_LIB_H */ 1086