| 1 | /* |
| 2 | ** Copyright 2003-2010, VisualOn, Inc. |
| 3 | ** |
| 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | ** you may not use this file except in compliance with the License. |
| 6 | ** You may obtain a copy of the License at |
| 7 | ** |
| 8 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | ** |
| 10 | ** Unless required by applicable law or agreed to in writing, software |
| 11 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | ** See the License for the specific language governing permissions and |
| 14 | ** limitations under the License. |
| 15 | */ |
| 16 | /******************************************************************************* |
| 17 | File: aacenc_core.h |
| 18 | |
| 19 | Content: aac encoder interface functions |
| 20 | |
| 21 | *******************************************************************************/ |
| 22 | |
| 23 | #ifndef _aacenc_core_h_ |
| 24 | #define _aacenc_core_h_cxx . . $ `aacenc/inc/aacenc_core.h:24:9`! |
| 25 | |
| 26 | |
| 27 | #include "typedef.h"cxx . . $ `<file>/aacenc/basic_op/typedef.h`/ |
| 28 | #include "config.h"cxx . . $ `<file>/aacenc/inc/config.h`/ |
| 29 | #include "bitenc.h"cxx . . $ `<file>/aacenc/inc/bitenc.h`/ |
| 30 | |
| 31 | #include "psy_configuration.h"cxx . . $ `<file>/aacenc/inc/psy_configuration.h`/ |
| 32 | #include "psy_main.h"cxx . . $ `<file>/aacenc/inc/psy_main.h`/ |
| 33 | #include "qc_main.h"cxx . . $ `<file>/aacenc/inc/qc_main.h`/ |
| 34 | #include "psy_main.h"cxx . . $ `<file>/aacenc/inc/psy_main.h`/ |
| 35 | /*-------------------------- defines --------------------------------------*/ |
| 36 | |
| 37 | |
| 38 | /*-------------------- structure definitions ------------------------------*/ |
| 39 | typedef structcxx . . $ $anonymous_type_5b5de6600f36b889_0# { |
| 40 | Word32cxx . . $ Word32# sampleRatecxx . . $ $anonymous_type_5b5de6600f36b889_0#sampleRate.; /* audio file sample rate */ |
| 41 | Word32cxx . . $ Word32# bitRatecxx . . $ $anonymous_type_5b5de6600f36b889_0#bitRate.; /* encoder bit rate in bits/sec */ |
| 42 | Word16cxx . . $ Word16# nChannelsIncxx . . $ $anonymous_type_5b5de6600f36b889_0#nChannelsIn.; /* number of channels on input (1,2) */ |
| 43 | Word16cxx . . $ Word16# nChannelsOutcxx . . $ $anonymous_type_5b5de6600f36b889_0#nChannelsOut.; /* number of channels on output (1,2) */ |
| 44 | Word16cxx . . $ Word16# bandWidthcxx . . $ $anonymous_type_5b5de6600f36b889_0#bandWidth.; /* targeted audio bandwidth in Hz */ |
| 45 | Word16cxx . . $ Word16# adtsUsedcxx . . $ $anonymous_type_5b5de6600f36b889_0#adtsUsed.; /* whether write adts header */ |
| 46 | } AACENC_CONFIGcxx . . $ AACENC_CONFIG#; |
| 47 | |
| 48 | |
| 49 | typedef structcxx . . $ $anonymous_type_5b5de6600f36b889_1# { |
| 50 | |
| 51 | AACENC_CONFIGcxx . . $ AACENC_CONFIG# configcxx . . $ $anonymous_type_5b5de6600f36b889_1#config.; /* Word16 size: 8 */ |
| 52 | |
| 53 | ELEMENT_INFOcxx . . $ ELEMENT_INFO# elInfocxx . . $ $anonymous_type_5b5de6600f36b889_1#elInfo.; /* Word16 size: 4 */ |
| 54 | |
| 55 | QC_STATEcxx . . $ QC_STATE# qcKernelcxx . . $ $anonymous_type_5b5de6600f36b889_1#qcKernel.; /* Word16 size: 6 + 5(PADDING) + 7(ELEMENT_BITS) + 54(ADJ_THR_STATE) = 72 */ |
| 56 | QC_OUTcxx . . $ QC_OUT# qcOutcxx . . $ $anonymous_type_5b5de6600f36b889_1#qcOut.; /* Word16 size: MAX_CHANNELS*920(QC_OUT_CHANNEL) + 5(QC_OUT_ELEMENT) + 7 = 932 / 1852 */ |
| 57 | |
| 58 | PSY_OUTcxx . . $ PSY_OUT# psyOutcxx . . $ $anonymous_type_5b5de6600f36b889_1#psyOut.; /* Word16 size: MAX_CHANNELS*186 + 2 = 188 / 374 */ |
| 59 | PSY_KERNELcxx . . $ PSY_KERNEL# psyKernelcxx . . $ $anonymous_type_5b5de6600f36b889_1#psyKernel.; /* Word16 size: 2587 / 4491 */ |
| 60 | |
| 61 | struct BITSTREAMENCODER_INITcxx . . $ BITSTREAMENCODER_INIT# bseInitcxx . . $ $anonymous_type_5b5de6600f36b889_1#bseInit.; /* Word16 size: 6 */ |
| 62 | struct BIT_BUFcxx . . $ BIT_BUF# bitStreamcxx . . $ $anonymous_type_5b5de6600f36b889_1#bitStream.; /* Word16 size: 8 */ |
| 63 | HANDLE_BIT_BUFcxx . . $ HANDLE_BIT_BUF# hBitStreamcxx . . $ $anonymous_type_5b5de6600f36b889_1#hBitStream.; |
| 64 | int initOKcxx . . $ $anonymous_type_5b5de6600f36b889_1#initOK.; |
| 65 | |
| 66 | short *intbufcxx . . $ $anonymous_type_5b5de6600f36b889_1#intbuf.; |
| 67 | short *encbufcxx . . $ $anonymous_type_5b5de6600f36b889_1#encbuf.; |
| 68 | short *inbufcxx . . $ $anonymous_type_5b5de6600f36b889_1#inbuf.; |
| 69 | int enclencxx . . $ $anonymous_type_5b5de6600f36b889_1#enclen.; |
| 70 | int inlencxx . . $ $anonymous_type_5b5de6600f36b889_1#inlen.; |
| 71 | int intlencxx . . $ $anonymous_type_5b5de6600f36b889_1#intlen.; |
| 72 | int uselengthcxx . . $ $anonymous_type_5b5de6600f36b889_1#uselength.; |
| 73 | |
| 74 | void *hCheckcxx . . $ $anonymous_type_5b5de6600f36b889_1#hCheck.; |
| 75 | VO_MEM_OPERATORcxx . . $ VO_MEM_OPERATOR# *voMemopcxx . . $ $anonymous_type_5b5de6600f36b889_1#voMemop.; |
| 76 | VO_MEM_OPERATORcxx . . $ VO_MEM_OPERATOR# voMemopratorcxx . . $ $anonymous_type_5b5de6600f36b889_1#voMemoprator.; |
| 77 | |
| 78 | }AAC_ENCODERcxx . . $ AAC_ENCODER#; /* Word16 size: 3809 / 6851 */ |
| 79 | |
| 80 | /*----------------------------------------------------------------------------- |
| 81 | |
| 82 | functionname: AacInitDefaultConfig |
| 83 | description: gives reasonable default configuration |
| 84 | returns: --- |
| 85 | |
| 86 | ------------------------------------------------------------------------------*/ |
| 87 | void AacInitDefaultConfigcxx . . $ AacInitDefaultConfig(d277834f89db8e4b).(AACENC_CONFIGcxx . . $ AACENC_CONFIG# *config); |
| 88 | |
| 89 | /*--------------------------------------------------------------------------- |
| 90 | |
| 91 | functionname:AacEncOpen |
| 92 | description: allocate and initialize a new encoder instance |
| 93 | returns: AACENC_OK if success |
| 94 | |
| 95 | ---------------------------------------------------------------------------*/ |
| 96 | |
| 97 | Word16cxx . . $ Word16# AacEncOpencxx . . $ AacEncOpen(ba88609b04fa0dc2). (AAC_ENCODERcxx . . $ AAC_ENCODER# *hAacEnc, /* pointer to an encoder handle, initialized on return */ |
| 98 | const AACENC_CONFIGcxx . . $ AACENC_CONFIG# config); /* pre-initialized config struct */ |
| 99 | |
| 100 | Word16cxx . . $ Word16# AacEncEncodecxx . . $ AacEncEncode(e0703a949d898de3).(AAC_ENCODERcxx . . $ AAC_ENCODER# *hAacEnc, |
| 101 | Word16cxx . . $ Word16# *timeSignal, |
| 102 | const UWord8cxx . . $ UWord8# *ancBytes, /*!< pointer to ancillary data bytes */ |
| 103 | Word16cxx . . $ Word16# *numAncBytes, /*!< number of ancillary Data Bytes, send as fill element */ |
| 104 | UWord8cxx . . $ UWord8# *outBytes, /*!< pointer to output buffer */ |
| 105 | VO_U32cxx . . $ VO_U32# *numOutBytes /*!< number of bytes in output buffer */ |
| 106 | ); |
| 107 | |
| 108 | /*--------------------------------------------------------------------------- |
| 109 | |
| 110 | functionname:AacEncClose |
| 111 | description: deallocate an encoder instance |
| 112 | |
| 113 | ---------------------------------------------------------------------------*/ |
| 114 | |
| 115 | void AacEncClosecxx . . $ AacEncClose(46c9a5cd61820d0d). (AAC_ENCODERcxx . . $ AAC_ENCODER#* hAacEnc, VO_MEM_OPERATORcxx . . $ VO_MEM_OPERATOR# *pMemOP); /* an encoder handle */ |
| 116 | |
| 117 | #endif /* _aacenc_h_ */ |