00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _MLO_SYNTACTIC_ELEMENTS_H_
00027 #define _MLO_SYNTACTIC_ELEMENTS_H_
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #include "MloSamplingFreq.h"
00038 #include "MloBitStream.h"
00039 #include "MloElementCce.h"
00040 #include "MloElementCpe.h"
00041 #include "MloElementFil.h"
00042 #include "MloElementPce.h"
00043 #include "MloElementSceLfe.h"
00044 #include "MloFilterBank.h"
00045 #include "MloIndivChnPool.h"
00046 #include "MloSampleBuffer.h"
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #define MLO_ERROR_SCE_TAG_DUPLICATED (MLO_ERROR_BASE_SYNTACTIC_ELEMENTS-0)
00057 #define MLO_ERROR_CPE_TAG_DUPLICATED (MLO_ERROR_BASE_SYNTACTIC_ELEMENTS-1)
00058 #define MLO_ERROR_SCE_TAG_UNKNOWN (MLO_ERROR_BASE_SYNTACTIC_ELEMENTS-2)
00059 #define MLO_ERROR_CPE_TAG_UNKNOWN (MLO_ERROR_BASE_SYNTACTIC_ELEMENTS-3)
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 typedef enum MLO_SyntacticElements_ContentType
00070 {
00071 MLO_SYNTACTIC_ELEMENTS_CONTENT_TYPE_SCE = 0,
00072 MLO_SYNTACTIC_ELEMENTS_CONTENT_TYPE_CPE,
00073 MLO_SYNTACTIC_ELEMENTS_CONTENT_TYPE_LFE,
00074
00075 MLO_SYNTACTIC_ELEMENTS_CONTENT_TYPE_SCE_NBR_ELT
00076 } MLO_SyntacticElements_ContentType;
00077
00078
00079
00080 typedef struct MLO_SyntacticElements_ContentRef
00081 {
00082 MLO_SyntacticElements_ContentType
00083 type;
00084 int index;
00085 } MLO_SyntacticElements_ContentRef;
00086
00087
00088
00089 typedef int MLO_SyntacticElements_TagMap [16];
00090
00091
00092
00093 typedef struct MLO_SyntacticElements
00094 {
00095 MLO_ElementPce pce;
00096
00097 MLO_IndivChnPool
00098 chn_pool;
00099
00100 int nbr_fil;
00101 MLO_ElementFil fil_arr [16];
00102
00103 int nbr_sce;
00104 MLO_ElementSceLfe
00105 sce_arr [16];
00106 MLO_SyntacticElements_TagMap
00107 sce_tag_map;
00108
00109 int nbr_lfe;
00110 MLO_ElementSceLfe
00111 lfe_arr [16];
00112
00113 int nbr_cpe;
00114 MLO_ElementCpe cpe_arr [16];
00115 MLO_SyntacticElements_TagMap
00116 cpe_tag_map;
00117
00118 int nbr_cce;
00119 MLO_ElementCce cce_arr [16];
00120
00121 int nbr_received_elements;
00122 MLO_SyntacticElements_ContentRef
00123 order_arr [64];
00124 } MLO_SyntacticElements;
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 #ifdef __cplusplus
00135 extern "C" {
00136 #endif
00137
00138
00139
00140 MLO_Result MLO_SyntacticElements_Init (MLO_SyntacticElements *se_ptr);
00141 void MLO_SyntacticElements_Restore (MLO_SyntacticElements *se_ptr);
00142 MLO_Result MLO_SyntacticElements_SetNbrChn (MLO_SyntacticElements *se_ptr, int nbr_chn);
00143
00144 void MLO_SyntacticElements_StartNewFrame (MLO_SyntacticElements *se_ptr, MLO_SamplingFreq_Index fs_index);
00145
00146 MLO_Result MLO_SyntacticElements_Decode (MLO_SyntacticElements *se_ptr, MLO_BitStream *bit_ptr);
00147 MLO_Result MLO_SyntacticElements_FinishSpectralProc (MLO_SyntacticElements *se_ptr);
00148 MLO_Result MLO_SyntacticElements_ConvertSpectralToTime (MLO_SyntacticElements *se_ptr, MLO_FilterBank *fb_ptr);
00149 MLO_Result MLO_SyntacticElements_SendToOutput (const MLO_SyntacticElements *se_ptr, MLO_SampleBuffer *outbuf_ptr);
00150
00151 MLO_Result MLO_SyntacticElements_UseSce (MLO_SyntacticElements *se_ptr, int tag, MLO_ElementSceLfe **sce_ptr_ptr);
00152 MLO_Result MLO_SyntacticElements_UseCpe (MLO_SyntacticElements *se_ptr, int tag, MLO_ElementCpe **cpe_ptr_ptr);
00153
00154
00155 #ifdef __cplusplus
00156 }
00157 #endif
00158
00159
00160
00161 #endif