• Home
  • Raw
  • Download

Lines Matching refs:pstrEncParams

37 uint32_t SBC_Encode(SBC_ENC_PARAMS* pstrEncParams, int16_t* input,  in SBC_Encode()  argument
47 int32_t s32NumOfBlocks = pstrEncParams->s16NumOfBlocks; in SBC_Encode()
53 register int32_t s32NumOfSubBands = pstrEncParams->s16NumOfSubBands; in SBC_Encode()
57 SbcAnalysisFilter4(pstrEncParams, input); in SBC_Encode()
59 SbcAnalysisFilter8(pstrEncParams, input); in SBC_Encode()
62 ps16ScfL = pstrEncParams->as16ScaleFactor; in SBC_Encode()
63 s32Ch = pstrEncParams->s16NumOfChannels * s32NumOfSubBands; in SBC_Encode()
66 SbBuffer = pstrEncParams->s32SbBuffer + s32Sb; in SBC_Encode()
84 if (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO) { in SBC_Encode()
86 ps16ScfL = pstrEncParams->as16ScaleFactor; in SBC_Encode()
89 SbBuffer = pstrEncParams->s32SbBuffer + s32Sb; in SBC_Encode()
122 SbBuffer = pstrEncParams->s32SbBuffer + s32Sb; in SBC_Encode()
135 pstrEncParams->as16Join[s32Sb] = 1; in SBC_Encode()
137 pstrEncParams->as16Join[s32Sb] = 0; in SBC_Encode()
141 pstrEncParams->as16Join[s32Sb] = 0; in SBC_Encode()
145 pstrEncParams->s16MaxBitNeed = (int16_t)maxBit; in SBC_Encode()
148 if ((pstrEncParams->s16ChannelMode == SBC_STEREO) || in SBC_Encode()
149 (pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO)) in SBC_Encode()
150 sbc_enc_bit_alloc_ste(pstrEncParams); in SBC_Encode()
152 sbc_enc_bit_alloc_mono(pstrEncParams); in SBC_Encode()
155 return EncPacking(pstrEncParams, output); in SBC_Encode()
163 void SBC_Encoder_Init(SBC_ENC_PARAMS* pstrEncParams) { in SBC_Encoder_Init() argument
171 if (pstrEncParams->s16ChannelMode == SBC_MONO) in SBC_Encoder_Init()
172 pstrEncParams->s16NumOfChannels = 1; in SBC_Encoder_Init()
174 pstrEncParams->s16NumOfChannels = 2; in SBC_Encoder_Init()
177 if (pstrEncParams->s16SamplingFreq == SBC_sf16000) in SBC_Encoder_Init()
179 else if (pstrEncParams->s16SamplingFreq == SBC_sf32000) in SBC_Encoder_Init()
181 else if (pstrEncParams->s16SamplingFreq == SBC_sf44100) in SBC_Encoder_Init()
186 if ((pstrEncParams->s16ChannelMode == SBC_JOINT_STEREO) || in SBC_Encoder_Init()
187 (pstrEncParams->s16ChannelMode == SBC_STEREO)) { in SBC_Encoder_Init()
189 (int16_t)((pstrEncParams->u16BitRate * pstrEncParams->s16NumOfSubBands * in SBC_Encoder_Init()
191 ((32 + (4 * pstrEncParams->s16NumOfSubBands * in SBC_Encoder_Init()
192 pstrEncParams->s16NumOfChannels) + in SBC_Encoder_Init()
193 ((pstrEncParams->s16ChannelMode - 2) * in SBC_Encoder_Init()
194 pstrEncParams->s16NumOfSubBands)) / in SBC_Encoder_Init()
195 pstrEncParams->s16NumOfBlocks)); in SBC_Encoder_Init()
198 (4 * pstrEncParams->s16NumOfSubBands * in SBC_Encoder_Init()
199 pstrEncParams->s16NumOfChannels) / in SBC_Encoder_Init()
201 (((pstrEncParams->s16ChannelMode - 2) * in SBC_Encoder_Init()
202 pstrEncParams->s16NumOfSubBands) + in SBC_Encoder_Init()
203 (pstrEncParams->s16NumOfBlocks * s16Bitpool)) / in SBC_Encoder_Init()
207 (pstrEncParams->s16NumOfSubBands * in SBC_Encoder_Init()
208 pstrEncParams->s16NumOfBlocks * 1000); in SBC_Encoder_Init()
210 if (s16BitRate > pstrEncParams->u16BitRate) s16Bitpool--; in SBC_Encoder_Init()
212 if (pstrEncParams->s16NumOfSubBands == 8) in SBC_Encoder_Init()
213 pstrEncParams->s16BitPool = (s16Bitpool > 255) ? 255 : s16Bitpool; in SBC_Encoder_Init()
215 pstrEncParams->s16BitPool = (s16Bitpool > 128) ? 128 : s16Bitpool; in SBC_Encoder_Init()
218 ((pstrEncParams->s16NumOfSubBands * pstrEncParams->u16BitRate * 1000) / in SBC_Encoder_Init()
219 (s16SamplingFreq * pstrEncParams->s16NumOfChannels)) - in SBC_Encoder_Init()
220 (((32 / pstrEncParams->s16NumOfChannels) + in SBC_Encoder_Init()
221 (4 * pstrEncParams->s16NumOfSubBands)) / in SBC_Encoder_Init()
222 pstrEncParams->s16NumOfBlocks)); in SBC_Encoder_Init()
224 pstrEncParams->s16BitPool = in SBC_Encoder_Init()
225 (s16Bitpool > (16 * pstrEncParams->s16NumOfSubBands)) in SBC_Encoder_Init()
226 ? (16 * pstrEncParams->s16NumOfSubBands) in SBC_Encoder_Init()
230 if (pstrEncParams->s16BitPool < 0) pstrEncParams->s16BitPool = 0; in SBC_Encoder_Init()
232 HeaderParams = ((pstrEncParams->s16SamplingFreq & 3) << 6); in SBC_Encoder_Init()
235 HeaderParams |= (((pstrEncParams->s16NumOfBlocks - 4) & 12) << 2); in SBC_Encoder_Init()
238 HeaderParams |= ((pstrEncParams->s16ChannelMode & 3) << 2); in SBC_Encoder_Init()
241 HeaderParams |= ((pstrEncParams->s16AllocationMethod & 1) << 1); in SBC_Encoder_Init()
242 HeaderParams |= ((pstrEncParams->s16NumOfSubBands >> 3) & 1); /*4 or 8*/ in SBC_Encoder_Init()
243 pstrEncParams->FrameHeader = HeaderParams; in SBC_Encoder_Init()
245 if (pstrEncParams->s16NumOfSubBands == 4) { in SBC_Encoder_Init()
246 if (pstrEncParams->s16NumOfChannels == 1) in SBC_Encoder_Init()
251 if (pstrEncParams->s16NumOfChannels == 1) in SBC_Encoder_Init()