11bd4fe43Sopenharmony_ci/*
21bd4fe43Sopenharmony_ci * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
31bd4fe43Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
41bd4fe43Sopenharmony_ci * you may not use this file except in compliance with the License.
51bd4fe43Sopenharmony_ci * You may obtain a copy of the License at
61bd4fe43Sopenharmony_ci *
71bd4fe43Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
81bd4fe43Sopenharmony_ci *
91bd4fe43Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
101bd4fe43Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
111bd4fe43Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121bd4fe43Sopenharmony_ci * See the License for the specific language governing permissions and
131bd4fe43Sopenharmony_ci * limitations under the License.
141bd4fe43Sopenharmony_ci */
151bd4fe43Sopenharmony_ci
161bd4fe43Sopenharmony_ci#ifndef __AACDEC_H__
171bd4fe43Sopenharmony_ci#define __AACDEC_H__
181bd4fe43Sopenharmony_ci
191bd4fe43Sopenharmony_ci#include "hi_type.h"
201bd4fe43Sopenharmony_ci
211bd4fe43Sopenharmony_ci#ifdef __cplusplus
221bd4fe43Sopenharmony_ci#if __cplusplus
231bd4fe43Sopenharmony_ciextern "C" {
241bd4fe43Sopenharmony_ci#endif /* __cpluscplus */
251bd4fe43Sopenharmony_ci#endif /* __cpluscplus */
261bd4fe43Sopenharmony_ci
271bd4fe43Sopenharmony_ci/********************************Macro Definition********************************/
281bd4fe43Sopenharmony_ci/** \addtogroup      AACDEC */
291bd4fe43Sopenharmony_ci/** @{ */ /** <!-- [AACDEC] */
301bd4fe43Sopenharmony_ci
311bd4fe43Sopenharmony_ci#ifndef AAC_MAX_NCHANS
321bd4fe43Sopenharmony_ci#define AAC_MAX_NCHANS 2
331bd4fe43Sopenharmony_ci#endif
341bd4fe43Sopenharmony_ci#define AAC_MAX_NSAMPS   1024
351bd4fe43Sopenharmony_ci/*
361bd4fe43Sopenharmony_ci * according to spec (13818-7 section 8.2.2, 14496-3 section 4.5.3),
371bd4fe43Sopenharmony_ci * 6144 bits =  768 bytes per SCE or CCE-I,12288 bits = 1536 bytes per CPE
381bd4fe43Sopenharmony_ci */
391bd4fe43Sopenharmony_ci#define AAC_MAINBUF_SIZE (768 * AAC_MAX_NCHANS)
401bd4fe43Sopenharmony_ci
411bd4fe43Sopenharmony_ci#define AAC_NUM_PROFILES 3
421bd4fe43Sopenharmony_ci#define AAC_PROFILE_MP   0
431bd4fe43Sopenharmony_ci#define AAC_PROFILE_LC   1
441bd4fe43Sopenharmony_ci#define AAC_PROFILE_SSR  2
451bd4fe43Sopenharmony_ci
461bd4fe43Sopenharmony_ci#define AACDEC_VERSION_MAX_BYTE 64 /* version max byte size */
471bd4fe43Sopenharmony_ci
481bd4fe43Sopenharmony_ci#ifndef HI_SUCCESS
491bd4fe43Sopenharmony_ci#define HI_SUCCESS 0
501bd4fe43Sopenharmony_ci#endif
511bd4fe43Sopenharmony_ci/** @} */ /** <!-- ==== Macro Definition end ==== */
521bd4fe43Sopenharmony_ci
531bd4fe43Sopenharmony_ci/*************************** Structure Definition ****************************/
541bd4fe43Sopenharmony_ci/** \addtogroup      AACDEC */
551bd4fe43Sopenharmony_ci/** @{ */ /** <!-- [AACDEC] */
561bd4fe43Sopenharmony_ci
571bd4fe43Sopenharmony_ci/** Defines AACDEC error code */
581bd4fe43Sopenharmony_citypedef enum {
591bd4fe43Sopenharmony_ci    ERR_AAC_NONE                          =   0,        /* no decode error */
601bd4fe43Sopenharmony_ci    ERR_AAC_INDATA_UNDERFLOW              =  -1,        /* not enough input data */
611bd4fe43Sopenharmony_ci    ERR_AAC_NULL_POINTER                  =  -2,        /* null pointer */
621bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_ADTS_HEADER           =  -3,        /* invalid adts header */
631bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_ADIF_HEADER           =  -4,        /* invalid adif header */
641bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_FRAME                 =  -5,        /* invalid frame */
651bd4fe43Sopenharmony_ci    ERR_AAC_MPEG4_UNSUPPORTED             =  -6,        /* upsupport mpeg4 format */
661bd4fe43Sopenharmony_ci    ERR_AAC_CHANNEL_MAP                   =  -7,        /* channel map error */
671bd4fe43Sopenharmony_ci    ERR_AAC_SYNTAX_ELEMENT                =  -8,        /* element error */
681bd4fe43Sopenharmony_ci    ERR_AAC_DEQUANT                       =  -9,        /* dequant error */
691bd4fe43Sopenharmony_ci    ERR_AAC_STEREO_PROCESS                = -10,        /* stereo process error */
701bd4fe43Sopenharmony_ci    ERR_AAC_PNS                           = -11,        /* pns process error */
711bd4fe43Sopenharmony_ci    ERR_AAC_SHORT_BLOCK_DEINT             = -12,        /* reserved */
721bd4fe43Sopenharmony_ci    ERR_AAC_TNS                           = -13,        /* TNS process error */
731bd4fe43Sopenharmony_ci    ERR_AAC_IMDCT                         = -14,        /* IMDCT process error */
741bd4fe43Sopenharmony_ci    ERR_AAC_NCHANS_TOO_HIGH               = -15,        /* unsupport mutil channel */
751bd4fe43Sopenharmony_ci    ERR_AAC_SBR_INIT                      = -16,        /* SBR init error */
761bd4fe43Sopenharmony_ci    ERR_AAC_SBR_BITSTREAM                 = -17,        /* SBR bitstream error */
771bd4fe43Sopenharmony_ci    ERR_AAC_SBR_DATA                      = -18,        /* SBR data error */
781bd4fe43Sopenharmony_ci    ERR_AAC_SBR_PCM_FORMAT                = -19,        /* SBR pcm data error */
791bd4fe43Sopenharmony_ci    ERR_AAC_SBR_NCHANS_TOO_HIGH           = -20,        /* unsupport SBR multi channel */
801bd4fe43Sopenharmony_ci    ERR_AAC_SBR_SINGLERATE_UNSUPPORTED    = -21,        /* SBR invalid samplerate */
811bd4fe43Sopenharmony_ci    ERR_AAC_RAWBLOCK_PARAMS               = -22,        /* invalid RawBlock params */
821bd4fe43Sopenharmony_ci    ERR_AAC_PS_INIT                       = -23,        /* PS init error */
831bd4fe43Sopenharmony_ci    ERR_AAC_CH_MAPPING                    = -24,
841bd4fe43Sopenharmony_ci    ERR_UNKNOWN                           = -9999,      /* reserved */
851bd4fe43Sopenharmony_ci    ERR_AAC_OUT_OF_MEMORY                 = 2,          /* Heap returned NULL pointer.
861bd4fe43Sopenharmony_ci                                                           Output buffer is invalid. */
871bd4fe43Sopenharmony_ci    ERR_AAC_UNKNOWN                       = 5,          /* Error condition is of unknown reason, or from a another
881bd4fe43Sopenharmony_ci                                                           module. Output buffer is invalid. */
891bd4fe43Sopenharmony_ci    ERR_AAC_TRANSPORT_SYNC_ERROR          = 4097,       /* The transport decoder had syncronisation problems.
901bd4fe43Sopenharmony_ci                                                           Do not exit decoding. Just feed new bitstream data. */
911bd4fe43Sopenharmony_ci    ERR_AAC_NOT_ENOUGH_BITS               = 4098,       /* The input buffer ran out of bits. */
921bd4fe43Sopenharmony_ci    ERR_AAC_TRANSPORT_FATAL_ERROR         = 4099,       /* The transport decoder occut fatal error. Reset Tranport */
931bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_HANDLE                = 8193,       /* The handle passed to the function call
941bd4fe43Sopenharmony_ci                                                           was invalid (NULL). */
951bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_AOT               = 8194,       /* The AOT found in the configuration is not supported. */
961bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_FORMAT            = 8195,       /* The bitstream format is not supported.  */
971bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_ER_FORMAT         = 8196,       /* The error resilience tool format is not supported. */
981bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_EPCONFIG          = 8197,       /* The error protection format is not supported. */
991bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_MULTILAYER        = 8198,       /* More than one layer for AAC scalable is not supported. */
1001bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_CHANNELCONFIG     = 8199,       /* The channel configuration (either number or arrangement)
1011bd4fe43Sopenharmony_ci                                                           is not supported. */
1021bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_SAMPLINGRATE      = 8200,       /* The sample rate specified in the configuration
1031bd4fe43Sopenharmony_ci                                                           is not supported. */
1041bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_SBR_CONFIG            = 8201,       /* The SBR configuration is not supported. */
1051bd4fe43Sopenharmony_ci    ERR_AAC_SET_PARAM_FAIL                = 8202,       /* The parameter could not be set. Either the value was out
1061bd4fe43Sopenharmony_ci                                                           of range or the parameter does not exist. */
1071bd4fe43Sopenharmony_ci    ERR_AAC_NEED_TO_RESTART               = 8203,       /* The decoder needs to be restarted, since the requiered
1081bd4fe43Sopenharmony_ci                                                           configuration change cannot be performed. */
1091bd4fe43Sopenharmony_ci    ERR_AAC_TRANSPORT_ERROR               = 16385,      /* The transport decoder encountered an unexpected error. */
1101bd4fe43Sopenharmony_ci    ERR_AAC_PARSE_ERROR                   = 16386,      /* Error while parsing the bitstream. Most probably it is
1111bd4fe43Sopenharmony_ci                                                           corrupted, or the system crashed. */
1121bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_EXTENSION_PAYLOAD = 16387,      /* Error while parsing the extension payload of the bitstream.
1131bd4fe43Sopenharmony_ci                                                           The extension payload type found is not supported. */
1141bd4fe43Sopenharmony_ci    ERR_AAC_DECODE_FRAME_ERROR            = 16388,      /* The parsed bitstream value is out of range. Most probably
1151bd4fe43Sopenharmony_ci                                                           the bitstream is corrupt, or the system crashed. */
1161bd4fe43Sopenharmony_ci    ERR_AAC_CRC_ERROR                     = 16389,      /* The embedded CRC did not match. */
1171bd4fe43Sopenharmony_ci    ERR_AAC_INVALID_CODE_BOOK             = 16390,      /* An invalid codebook was signalled. Most probably the
1181bd4fe43Sopenharmony_ci                                                           bitstream is corrupt, or the system crashed. */
1191bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_PREDICTION        = 16391,      /* Predictor found, but not supported in the AAC Low
1201bd4fe43Sopenharmony_ci                                                           Complexity profile. Most probably the bitstream is
1211bd4fe43Sopenharmony_ci                                                           corrupt, or has a wrong format. */
1221bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_CCE               = 16392,      /* A CCE element was found which is not supported.
1231bd4fe43Sopenharmony_ci                                                           Most probably the bitstream is corrupt,
1241bd4fe43Sopenharmony_ci                                                           or has a wrong format. */
1251bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_LFE               = 16393,      /* A LFE element was found which is not supported.
1261bd4fe43Sopenharmony_ci                                                           Most probably the bitstream is corrupt,
1271bd4fe43Sopenharmony_ci                                                           or has a wrong format. */
1281bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_GAIN_CONTROL_DATA = 16394,      /* Gain control data found but not supported.
1291bd4fe43Sopenharmony_ci                                                           Most probably the bitstream is corrupt,
1301bd4fe43Sopenharmony_ci                                                           or has a wrong format. */
1311bd4fe43Sopenharmony_ci    ERR_AAC_UNSUPPORTED_SBA               = 16395,      /* SBA found, but currently not supported
1321bd4fe43Sopenharmony_ci                                                           in the BSAC profile. */
1331bd4fe43Sopenharmony_ci    ERR_AAC_TNS_READ_ERROR                = 16396,      /* Error while reading TNS data. Most probably
1341bd4fe43Sopenharmony_ci                                                           the bitstream is corrupt or the system crashed. */
1351bd4fe43Sopenharmony_ci    ERR_AAC_RVLC_ERROR                    = 16397,      /* Error while decoding error resillient data. */
1361bd4fe43Sopenharmony_ci    ERR_AAC_ANC_DATA_ERROR                = 32769,      /* Non severe error concerning the ancillary data handling. */
1371bd4fe43Sopenharmony_ci    ERR_AAC_TOO_SMALL_ANC_BUFFER          = 32770,      /* The registered ancillary data buffer is too small
1381bd4fe43Sopenharmony_ci                                                           to receive the parsed data. */
1391bd4fe43Sopenharmony_ci    ERR_AAC_TOO_MANY_ANC_ELEMENTS         = 32771,      /* More than the allowed number of ancillary data elements
1401bd4fe43Sopenharmony_ci                                                           should be written to buffer. */
1411bd4fe43Sopenharmony_ci} HI_AACDEC_ERR_E;
1421bd4fe43Sopenharmony_ci
1431bd4fe43Sopenharmony_citypedef struct _AACFrameInfo {
1441bd4fe43Sopenharmony_ci    int bitRate;
1451bd4fe43Sopenharmony_ci    int nChans;        /* channels,range:1,2 */
1461bd4fe43Sopenharmony_ci    int sampRateCore;  /* inner sample rate */
1471bd4fe43Sopenharmony_ci    int sampRateOut;   /* output samplerate */
1481bd4fe43Sopenharmony_ci    int bitsPerSample; /* bitwidth ,range:16 */
1491bd4fe43Sopenharmony_ci    int outputSamps;   /* output samples */
1501bd4fe43Sopenharmony_ci    int profile;       /* profile */
1511bd4fe43Sopenharmony_ci    int tnsUsed;       /* tns tools */
1521bd4fe43Sopenharmony_ci    int pnsUsed;       /* pns tools */
1531bd4fe43Sopenharmony_ci} AACFrameInfo;
1541bd4fe43Sopenharmony_ci
1551bd4fe43Sopenharmony_citypedef enum {
1561bd4fe43Sopenharmony_ci    AACDEC_ADTS = 0,
1571bd4fe43Sopenharmony_ci    AACDEC_LOAS = 1,
1581bd4fe43Sopenharmony_ci    AACDEC_LATM_MCP1 = 2,
1591bd4fe43Sopenharmony_ci} AACDECTransportType;
1601bd4fe43Sopenharmony_ci
1611bd4fe43Sopenharmony_citypedef void *HAACDecoder;
1621bd4fe43Sopenharmony_ci
1631bd4fe43Sopenharmony_citypedef struct hiAACDEC_VERSION_S {
1641bd4fe43Sopenharmony_ci    HI_U8 aVersion[AACDEC_VERSION_MAX_BYTE];
1651bd4fe43Sopenharmony_ci} AACDEC_VERSION_S;
1661bd4fe43Sopenharmony_ci
1671bd4fe43Sopenharmony_ci/** @} */ /** <!-- ==== Structure Definition End ==== */
1681bd4fe43Sopenharmony_ci
1691bd4fe43Sopenharmony_ci/******************************* API declaration *****************************/
1701bd4fe43Sopenharmony_ci/** \addtogroup      AACDEC */
1711bd4fe43Sopenharmony_ci/** @{ */ /** <!--  [AACDEC] */
1721bd4fe43Sopenharmony_ci
1731bd4fe43Sopenharmony_ci/**
1741bd4fe43Sopenharmony_ci\brief Get version information.
1751bd4fe43Sopenharmony_ci\attention \n
1761bd4fe43Sopenharmony_ciN/A
1771bd4fe43Sopenharmony_ci\param[in] pVersion    :   version describe struct
1781bd4fe43Sopenharmony_ci\retval ::HI_SUCCESS   :   Success
1791bd4fe43Sopenharmony_ci\retval ::HI_FAILURE   :   pVersion is NULL, return HI_FAILURE
1801bd4fe43Sopenharmony_ci\see \n
1811bd4fe43Sopenharmony_ciN/A
1821bd4fe43Sopenharmony_ci*/
1831bd4fe43Sopenharmony_ciHI_S32 HI_AACDEC_GetVersion(AACDEC_VERSION_S *pVersion);
1841bd4fe43Sopenharmony_ci
1851bd4fe43Sopenharmony_ci/**
1861bd4fe43Sopenharmony_ci\brief create and initial decoder device.
1871bd4fe43Sopenharmony_ci\attention \n
1881bd4fe43Sopenharmony_ciN/A
1891bd4fe43Sopenharmony_ci\param[in] enTranType   : transport type
1901bd4fe43Sopenharmony_ci\retval ::HAACDecoder   : init success, return non-NULL handle.
1911bd4fe43Sopenharmony_ci\retval ::NULL          : init failure, return NULL
1921bd4fe43Sopenharmony_ci\see \n
1931bd4fe43Sopenharmony_ciN/A
1941bd4fe43Sopenharmony_ci*/
1951bd4fe43Sopenharmony_ciHAACDecoder AACInitDecoder(AACDECTransportType enTranType);
1961bd4fe43Sopenharmony_ci
1971bd4fe43Sopenharmony_ci/**
1981bd4fe43Sopenharmony_ci\brief destroy AAC-Decoder, free the memory.
1991bd4fe43Sopenharmony_ci\attention \n
2001bd4fe43Sopenharmony_ciN/A
2011bd4fe43Sopenharmony_ci\param[in] hAACDecoder  : AAC-Decoder handle
2021bd4fe43Sopenharmony_ci\see \n
2031bd4fe43Sopenharmony_ciN/A
2041bd4fe43Sopenharmony_ci*/
2051bd4fe43Sopenharmony_ciHI_VOID AACFreeDecoder(HAACDecoder hAACDecoder);
2061bd4fe43Sopenharmony_ci
2071bd4fe43Sopenharmony_ci/**
2081bd4fe43Sopenharmony_ci\brief set RawMode before decode Raw Format aac bitstream(Reserved API, unused now.)
2091bd4fe43Sopenharmony_ci\attention \n
2101bd4fe43Sopenharmony_ciN/A
2111bd4fe43Sopenharmony_ci\param[in] hAACDecoder  : AAC-Decoder handle
2121bd4fe43Sopenharmony_ci\param[in] nChans       : inout channels
2131bd4fe43Sopenharmony_ci\param[in] sampRate     : input sampelrate
2141bd4fe43Sopenharmony_ci\retval ::HI_FAILURE    : RESERVED API, always return HI_FAILURE.
2151bd4fe43Sopenharmony_ci\see \n
2161bd4fe43Sopenharmony_ciN/A
2171bd4fe43Sopenharmony_ci*/
2181bd4fe43Sopenharmony_ciHI_S32 AACSetRawMode(HAACDecoder hAACDecoder, HI_S32 nChans, HI_S32 sampRate);
2191bd4fe43Sopenharmony_ci
2201bd4fe43Sopenharmony_ci/**
2211bd4fe43Sopenharmony_ci\brief look for valid AAC sync header
2221bd4fe43Sopenharmony_ci\attention \n
2231bd4fe43Sopenharmony_ciN/A
2241bd4fe43Sopenharmony_ci\param[in] hAACDecoder      : AAC-Decoder handle
2251bd4fe43Sopenharmony_ci\param[in/out] ppInbufPtr   : address of the pointer of start-point of the bitstream
2261bd4fe43Sopenharmony_ci\param[in/out] pBytesLeft   : pointer to BytesLeft that indicates bitstream numbers at input buffer
2271bd4fe43Sopenharmony_ci\retval ::<0                : err, always return ERR_AAC_INDATA_UNDERFLOW
2281bd4fe43Sopenharmony_ci\retval ::other             : Success, return number bytes of current frame
2291bd4fe43Sopenharmony_ci\see \n
2301bd4fe43Sopenharmony_ciN/A
2311bd4fe43Sopenharmony_ci*/
2321bd4fe43Sopenharmony_ciHI_S32 AACDecodeFindSyncHeader(HAACDecoder hAACDecoder, HI_U8 **ppInbufPtr, HI_S32 *pBytesLeft);
2331bd4fe43Sopenharmony_ci
2341bd4fe43Sopenharmony_ci/**
2351bd4fe43Sopenharmony_ci\brief decoding AAC frame and output 1024(LC) OR 2048(HEAAC/eAAC/eAAC+) 16bit PCM samples per channel.
2361bd4fe43Sopenharmony_ci\attention \n
2371bd4fe43Sopenharmony_ci\param[in] hAACDecoder       : AAC-Decoder handle
2381bd4fe43Sopenharmony_ci\param[in] ppInbufPtr        : address of the pointer of start-point of the bitstream
2391bd4fe43Sopenharmony_ci\param[in/out] pBytesLeft    : pointer to BytesLeft that indicates bitstream numbers at input buffer,
2401bd4fe43Sopenharmony_ci                               indicates the left bytes
2411bd4fe43Sopenharmony_ci\param[in] pOutPcm           : the address of the out pcm buffer,pcm data in noninterlaced fotmat: L/L/L/... R/R/R/...
2421bd4fe43Sopenharmony_ci\retval :: SUCCESS           : Success
2431bd4fe43Sopenharmony_ci\retval :: ERROR_CODE        : FAILURE, return error_code.
2441bd4fe43Sopenharmony_ci\see \n
2451bd4fe43Sopenharmony_ciN/A
2461bd4fe43Sopenharmony_ci*/
2471bd4fe43Sopenharmony_ciHI_S32 AACDecodeFrame(HAACDecoder hAACDecoder, HI_U8 **ppInbufPtr, HI_S32 *pBytesLeft, HI_S16 *pOutPcm);
2481bd4fe43Sopenharmony_ci
2491bd4fe43Sopenharmony_ci/**
2501bd4fe43Sopenharmony_ci\brief get the frame information.
2511bd4fe43Sopenharmony_ci\attention \n
2521bd4fe43Sopenharmony_ci\param[in] hAACDecoder       : AAC-Decoder handle
2531bd4fe43Sopenharmony_ci\param[out] aacFrameInfo     : frame information
2541bd4fe43Sopenharmony_ci\retval :: HI_SUCCESS        : Success
2551bd4fe43Sopenharmony_ci\retval :: ERROR_CODE        : FAILURE, return error_code.
2561bd4fe43Sopenharmony_ci\see \n
2571bd4fe43Sopenharmony_ciN/A
2581bd4fe43Sopenharmony_ci*/
2591bd4fe43Sopenharmony_ciHI_S32 AACGetLastFrameInfo(HAACDecoder hAACDecoder, AACFrameInfo *aacFrameInfo);
2601bd4fe43Sopenharmony_ci
2611bd4fe43Sopenharmony_ci/**
2621bd4fe43Sopenharmony_ci\brief set eosflag.
2631bd4fe43Sopenharmony_ci\attention \n
2641bd4fe43Sopenharmony_ci\param[in] hAACDecoder       : AAC-Decoder handle
2651bd4fe43Sopenharmony_ci\param[in] s32Eosflag        : end flag
2661bd4fe43Sopenharmony_ci\retval :: HI_SUCCESS        : Success
2671bd4fe43Sopenharmony_ci\retval :: ERROR_CODE        : FAILURE, return error_code.
2681bd4fe43Sopenharmony_ci\see \n
2691bd4fe43Sopenharmony_ciN/A
2701bd4fe43Sopenharmony_ci*/
2711bd4fe43Sopenharmony_ciHI_S32 AACDecoderSetEosFlag(HAACDecoder hAACDecoder, HI_S32 s32Eosflag);
2721bd4fe43Sopenharmony_ci
2731bd4fe43Sopenharmony_ci/**
2741bd4fe43Sopenharmony_ci\brief flush internal codec state (after seeking, for example)
2751bd4fe43Sopenharmony_ci\attention \n
2761bd4fe43Sopenharmony_ci\param[in] hAACDecoder       : AAC-Decoder handle
2771bd4fe43Sopenharmony_ci\retval :: HI_SUCCESS        : Success
2781bd4fe43Sopenharmony_ci\retval :: ERROR_CODE        : FAILURE, return error_code.
2791bd4fe43Sopenharmony_ci\see \n
2801bd4fe43Sopenharmony_ciN/A
2811bd4fe43Sopenharmony_ci*/
2821bd4fe43Sopenharmony_ciHI_S32 AACFlushCodec(HAACDecoder hAACDecoder);
2831bd4fe43Sopenharmony_ci
2841bd4fe43Sopenharmony_ci/**
2851bd4fe43Sopenharmony_ci\brief register sbrdec module
2861bd4fe43Sopenharmony_ci\attention \n
2871bd4fe43Sopenharmony_ciN/A
2881bd4fe43Sopenharmony_ci\param[in] pModuleHandle     : pointer to WorkHandle of sbrdec module
2891bd4fe43Sopenharmony_ci\retval :: HI_SUCCESS        : Success
2901bd4fe43Sopenharmony_ci\retval :: ERROR_CODE        : FAILURE, return error_code.
2911bd4fe43Sopenharmony_ci\see \n
2921bd4fe43Sopenharmony_ciN/A
2931bd4fe43Sopenharmony_ci*/
2941bd4fe43Sopenharmony_ciHI_S32 AACDecoderRegisterModule(HI_VOID *pModuleHandle);
2951bd4fe43Sopenharmony_ci
2961bd4fe43Sopenharmony_ci/**
2971bd4fe43Sopenharmony_ci\brief Get WorkHandle of sbrdec module
2981bd4fe43Sopenharmony_ci\attention \n
2991bd4fe43Sopenharmony_ciN/A
3001bd4fe43Sopenharmony_ci\retval :: HI_VOID *          : pointer to WorkHandle of sbrdec module
3011bd4fe43Sopenharmony_ci\see \n
3021bd4fe43Sopenharmony_ciN/A
3031bd4fe43Sopenharmony_ci*/
3041bd4fe43Sopenharmony_ciHI_VOID *HI_AAC_SBRDEC_GetHandle(HI_VOID);
3051bd4fe43Sopenharmony_ci
3061bd4fe43Sopenharmony_ci/** @} */ /** <!-- ==== API declaration end ==== */
3071bd4fe43Sopenharmony_ci
3081bd4fe43Sopenharmony_ci#ifdef __cplusplus
3091bd4fe43Sopenharmony_ci#if __cplusplus
3101bd4fe43Sopenharmony_ci}
3111bd4fe43Sopenharmony_ci#endif /* __cpluscplus */
3121bd4fe43Sopenharmony_ci#endif /* __cpluscplus */
3131bd4fe43Sopenharmony_ci
3141bd4fe43Sopenharmony_ci#endif /* __AACDEC_H__ */
315