Lines Matching refs:hDel
223 FDK_SACENC_ERROR fdk_sacenc_delay_SubCalulateBufferDelays(HANDLE_DELAY hDel) { in fdk_sacenc_delay_SubCalulateBufferDelays() argument
226 if (NULL == hDel) { in fdk_sacenc_delay_SubCalulateBufferDelays()
233 if (hDel->config.bSacTimeAlignmentDynamicOut > 0) { in fdk_sacenc_delay_SubCalulateBufferDelays()
234 hDel->config.nSacTimeAlignment = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
239 2 * hDel->config.nQmfLen + in fdk_sacenc_delay_SubCalulateBufferDelays()
240 hDel->config.nQmfLen / 2; /* Only Ld-QMF Delay, no hybrid */ in fdk_sacenc_delay_SubCalulateBufferDelays()
241 nEncoderSynDelay = 1 * hDel->config.nQmfLen + hDel->config.nQmfLen / 2; in fdk_sacenc_delay_SubCalulateBufferDelays()
242 nDecoderAnDelay = 2 * hDel->config.nQmfLen + hDel->config.nQmfLen / 2; in fdk_sacenc_delay_SubCalulateBufferDelays()
243 nDecoderSynDelay = 1 * hDel->config.nQmfLen + hDel->config.nQmfLen / 2; in fdk_sacenc_delay_SubCalulateBufferDelays()
245 hDel->config.nFrameLen / 2; /* WindowLookahead is just half a frame */ in fdk_sacenc_delay_SubCalulateBufferDelays()
253 if (hDel->config.bTimeDomDmx == 0) { in fdk_sacenc_delay_SubCalulateBufferDelays()
257 hDel->nSurroundAnalysisBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
258 hDel->nArbDmxAnalysisBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
259 tempDelay = nEncoderSynDelay + hDel->config.nLimiterDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
260 hDel->config.nCoreCoderDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
261 hDel->config.nSacTimeAlignment + nDecoderAnDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
262 tempDelay = (nResidualCoderFrameDelay * hDel->config.nFrameLen) + in fdk_sacenc_delay_SubCalulateBufferDelays()
263 hDel->config.nSacStreamMuxDelay - tempDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
266 hDel->nBitstreamFrameBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
267 hDel->nOutputAudioBuffer = tempDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
270 hDel->nBitstreamFrameBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
271 (tempDelay + hDel->config.nFrameLen - 1) / hDel->config.nFrameLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
272 hDel->nOutputAudioBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
273 (hDel->nBitstreamFrameBuffer * hDel->config.nFrameLen) - tempDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
276 hDel->nOutputAudioQmfFrameBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
277 (hDel->nOutputAudioBuffer + (hDel->config.nQmfLen / 2) - 1) / in fdk_sacenc_delay_SubCalulateBufferDelays()
278 hDel->config.nQmfLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
280 if (hDel->config.bDmxAlign > 0) { in fdk_sacenc_delay_SubCalulateBufferDelays()
282 hDel->nOutputAudioBuffer + hDel->config.nLimiterDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
283 hDel->config.nCoreCoderDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
284 hDel->nDiscardOutFrames = in fdk_sacenc_delay_SubCalulateBufferDelays()
285 (tempDelay + hDel->config.nFrameLen - 1) / hDel->config.nFrameLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
286 hDel->nDmxAlignBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
287 hDel->nDiscardOutFrames * hDel->config.nFrameLen - tempDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
289 hDel->nDiscardOutFrames = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
290 hDel->nDmxAlignBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
294 hDel->nInfoDmxDelay = hDel->nSurroundAnalysisBuffer + nEncoderAnDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
296 hDel->nOutputAudioBuffer + in fdk_sacenc_delay_SubCalulateBufferDelays()
297 hDel->config.nLimiterDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
298 hDel->nInfoCodecDelay = in fdk_sacenc_delay_SubCalulateBufferDelays()
299 hDel->nInfoDmxDelay + hDel->config.nCoreCoderDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
300 hDel->config.nSacTimeAlignment + nDecoderAnDelay + nDecoderSynDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
306 tempDelay1 = hDel->config.nArbDmxDelay - hDel->config.nSurroundDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
309 hDel->nSurroundAnalysisBuffer = tempDelay1; in fdk_sacenc_delay_SubCalulateBufferDelays()
310 hDel->nArbDmxAnalysisBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
312 hDel->nSurroundAnalysisBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
313 hDel->nArbDmxAnalysisBuffer = -tempDelay1; in fdk_sacenc_delay_SubCalulateBufferDelays()
316 tempDelay1 = nEncoderWinDelay + hDel->config.nSurroundDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
317 hDel->nSurroundAnalysisBuffer + in fdk_sacenc_delay_SubCalulateBufferDelays()
319 tempDelay2 = nEncoderWinDelay + hDel->config.nArbDmxDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
320 hDel->nArbDmxAnalysisBuffer + in fdk_sacenc_delay_SubCalulateBufferDelays()
322 tempDelay3 = hDel->config.nArbDmxDelay + hDel->config.nLimiterDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
323 hDel->config.nCoreCoderDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
324 hDel->config.nSacTimeAlignment + in fdk_sacenc_delay_SubCalulateBufferDelays()
329 hDel->config.nFrameLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
330 tempDelay12 += hDel->config.nSacStreamMuxDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
339 if (hDel->config.bMinimizeDelay > 0) { in fdk_sacenc_delay_SubCalulateBufferDelays()
340 hDel->nBitstreamFrameBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
341 (tempDelay3 - tempDelay12) / hDel->config.nFrameLen; /*floor*/ in fdk_sacenc_delay_SubCalulateBufferDelays()
342 hDel->nOutputAudioBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
343 hDel->nSurroundAnalysisBuffer += in fdk_sacenc_delay_SubCalulateBufferDelays()
345 (hDel->nBitstreamFrameBuffer * hDel->config.nFrameLen)); in fdk_sacenc_delay_SubCalulateBufferDelays()
346 hDel->nArbDmxAnalysisBuffer += in fdk_sacenc_delay_SubCalulateBufferDelays()
348 (hDel->nBitstreamFrameBuffer * hDel->config.nFrameLen)); in fdk_sacenc_delay_SubCalulateBufferDelays()
350 hDel->nBitstreamFrameBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
351 ((tempDelay3 - tempDelay12) + hDel->config.nFrameLen - 1) / in fdk_sacenc_delay_SubCalulateBufferDelays()
352 hDel->config.nFrameLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
353 hDel->nOutputAudioBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
354 hDel->nBitstreamFrameBuffer * hDel->config.nFrameLen + in fdk_sacenc_delay_SubCalulateBufferDelays()
358 hDel->nBitstreamFrameBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
359 hDel->nOutputAudioBuffer = tempDelay12 - tempDelay3; in fdk_sacenc_delay_SubCalulateBufferDelays()
362 if (hDel->config.bDmxAlign > 0) { in fdk_sacenc_delay_SubCalulateBufferDelays()
363 int tempDelay = hDel->config.nArbDmxDelay + hDel->nOutputAudioBuffer + in fdk_sacenc_delay_SubCalulateBufferDelays()
364 hDel->config.nLimiterDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
365 hDel->config.nCoreCoderDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
366 hDel->nDiscardOutFrames = in fdk_sacenc_delay_SubCalulateBufferDelays()
367 (tempDelay + hDel->config.nFrameLen - 1) / hDel->config.nFrameLen; in fdk_sacenc_delay_SubCalulateBufferDelays()
368 hDel->nDmxAlignBuffer = in fdk_sacenc_delay_SubCalulateBufferDelays()
369 hDel->nDiscardOutFrames * hDel->config.nFrameLen - tempDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
371 hDel->nDiscardOutFrames = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
372 hDel->nDmxAlignBuffer = 0; in fdk_sacenc_delay_SubCalulateBufferDelays()
376 hDel->nInfoDmxDelay = hDel->config.nArbDmxDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
377 hDel->nOutputAudioBuffer + in fdk_sacenc_delay_SubCalulateBufferDelays()
378 hDel->config.nLimiterDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
379 hDel->nInfoCodecDelay = in fdk_sacenc_delay_SubCalulateBufferDelays()
380 hDel->nInfoDmxDelay + hDel->config.nCoreCoderDelay + in fdk_sacenc_delay_SubCalulateBufferDelays()
381 hDel->config.nSacTimeAlignment + nDecoderAnDelay + nDecoderSynDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
382 hDel->nInfoDecoderDelay = nDecoderAnDelay + nDecoderSynDelay; in fdk_sacenc_delay_SubCalulateBufferDelays()
387 hDel->nBitstreamFrameBufferSize = hDel->nBitstreamFrameBuffer + 1; in fdk_sacenc_delay_SubCalulateBufferDelays()