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
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef _MLO_INDIV_CHN_STREAM_H_
00035 #define _MLO_INDIV_CHN_STREAM_H_
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #include "MloSamplingFreq.h"
00046 #include "MloBitStream.h"
00047 #include "MloDefs.h"
00048 #include "MloFloat.h"
00049 #include "MloIcsInfo.h"
00050 #include "MloScaleFactor.h"
00051 #include "MloSectionData.h"
00052 #include "MloTns.h"
00053 #include "MloTypes.h"
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 #define MLO_ERROR_GC_IN_LC (MLO_ERROR_BASE_INDIV_CHN_STREAM-0)
00064 #define MLO_ERROR_PULSE_SFB_RANGE (MLO_ERROR_BASE_INDIV_CHN_STREAM-1)
00065 #define MLO_ERROR_TOO_MANY_PULSES (MLO_ERROR_BASE_INDIV_CHN_STREAM-2)
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 typedef struct MLO_IndivChnStream_Pulse
00076 {
00077 MLO_UInt8 offset;
00078 MLO_UInt8 amp;
00079 } MLO_IndivChnStream_Pulse;
00080
00081
00082
00083 typedef struct MLO_IndivChnStream
00084 {
00085 int global_gain;
00086 MLO_IcsInfo ics_info;
00087 MLO_Boolean pulse_data_present_flag;
00088 MLO_Boolean tns_data_present_flag;
00089
00090
00091 MLO_SectionData
00092 section_data;
00093
00094
00095 MLO_ScaleFactor
00096 sf_data;
00097
00098
00099 int number_pulse;
00100 int pulse_start_sfb;
00101 MLO_IndivChnStream_Pulse
00102 pulse [4];
00103
00104
00105 MLO_Tns tns;
00106
00107
00108 MLO_Int16 data [MLO_DEFS_FRAME_LEN_LONG];
00109
00110 MLO_Float coef_arr [MLO_DEFS_FRAME_LEN_LONG];
00111 MLO_Float prev_frame [MLO_DEFS_FRAME_LEN_LONG];
00112
00113 } MLO_IndivChnStream;
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 #ifdef __cplusplus
00124 extern "C" {
00125 #endif
00126
00127
00128
00129 void MLO_IndivChnStream_ClearBuffers (MLO_IndivChnStream *ics_ptr);
00130 MLO_Result MLO_IndivChnStream_Decode (MLO_IndivChnStream *ics_ptr, MLO_BitStream *bit_ptr, MLO_Boolean common_win_flag, MLO_Boolean scale_flag, MLO_SamplingFreq_Index fs_index);
00131
00132
00133
00134 #ifdef __cplusplus
00135 }
00136 #endif
00137
00138
00139
00140 #endif