Lines Matching refs:pConcealmentInfo

207     CConcealmentInfo *pConcealmentInfo,
213 CConcealmentInfo *pConcealmentInfo,
220 CConcealmentInfo *pConcealmentInfo, int frameOk,
239 int mode, CConcealmentInfo *pConcealmentInfo,
244 static void CConcealment_TDNoise_Apply(CConcealmentInfo *const pConcealmentInfo,
799 CConcealmentInfo *pConcealmentInfo, in CConcealment_ApplyNoise() argument
810 FDK_ASSERT(pConcealmentInfo != NULL); in CConcealment_ApplyNoise()
813 switch (pConcealmentInfo->concealState) { in CConcealment_ApplyNoise()
821 /*mode =*/1, pConcealmentInfo, pAacDecoderStaticChannelInfo, in CConcealment_ApplyNoise()
829 pConcealmentInfo->windowShape; /* Prevent an invalid WindowShape in CConcealment_ApplyNoise()
832 CConcealment_GetWinSeq(pConcealmentInfo->windowSequence); in CConcealment_ApplyNoise()
833 pConcealmentInfo->windowSequence = in CConcealment_ApplyNoise()
841 FDKmemclear(pConcealmentInfo->spectralCoefficient, in CConcealment_ApplyNoise()
871 CConcealmentInfo *pConcealmentInfo, in CConcealment_ApplyInter() argument
876 CConcealParams *pConcealCommonData = pConcealmentInfo->pConcealParams; in CConcealment_ApplyInter()
895 pIcsInfo->WindowShape = pConcealmentInfo->windowShape; in CConcealment_ApplyInter()
896 pIcsInfo->WindowSequence = pConcealmentInfo->windowSequence; in CConcealment_ApplyInter()
901 FX_CNCL2FX_DBL(pConcealmentInfo->spectralCoefficient[i]); in CConcealment_ApplyInter()
905 FDKmemcpy(pSpecScale, pConcealmentInfo->specScale, 8 * sizeof(SHORT)); in CConcealment_ApplyInter()
909 if (!pConcealmentInfo->prevFrameOk[1] || mute_release_active) { in CConcealment_ApplyInter()
914 if (frameOk && pConcealmentInfo->prevFrameOk[0] && !mute_release_active) { in CConcealment_ApplyInter()
926 if (pConcealmentInfo->windowSequence == in CConcealment_ApplyInter()
944 &pConcealmentInfo->spectralCoefficient[wnd * (samplesPerFrame / in CConcealment_ApplyInter()
952 &pSpecScale[wnd], &pConcealmentInfo->specScale[wnd], in CConcealment_ApplyInter()
972 pConcealmentInfo->spectralCoefficient, /* spec_n */ in CConcealment_ApplyInter()
981 pConcealmentInfo->spectralCoefficient[i]; /* spec_n */ in CConcealment_ApplyInter()
992 &pConcealmentInfo->specScale[0], &pSpecScale[0], &specScaleOut, in CConcealment_ApplyInter()
1004 SHORT specScaleAct = pConcealmentInfo->specScale[0]; in CConcealment_ApplyInter()
1010 if (pConcealmentInfo->windowSequence == in CConcealment_ApplyInter()
1018 if (pConcealmentInfo->specScale[i] > specScaleAct) { in CConcealment_ApplyInter()
1019 specScaleAct = pConcealmentInfo->specScale[i]; in CConcealment_ApplyInter()
1025 pConcealmentInfo->spectralCoefficient, /* spec_n */ in CConcealment_ApplyInter()
1035 pConcealmentInfo->spectralCoefficient, /* spec_n */ in CConcealment_ApplyInter()
1048 CConcealment_ApplyRandomSign(pConcealmentInfo->iRandomPhase, in CConcealment_ApplyInter()
1051 pConcealmentInfo->iRandomPhase = in CConcealment_ApplyInter()
1052 (pConcealmentInfo->iRandomPhase + 1) & (AAC_NF_NO_RANDOM_VAL - 1); in CConcealment_ApplyInter()
1056 switch (pConcealmentInfo->concealState) { in CConcealment_ApplyInter()
1062 FDK_ASSERT(pConcealmentInfo->cntFadeFrames >= 0); in CConcealment_ApplyInter()
1063 FDK_ASSERT(pConcealmentInfo->cntFadeFrames < in CConcealment_ApplyInter()
1065 FDK_ASSERT(pConcealmentInfo->cntFadeFrames < in CConcealment_ApplyInter()
1075 FDK_ASSERT(pConcealmentInfo->cntFadeFrames >= 0); in CConcealment_ApplyInter()
1076 FDK_ASSERT(pConcealmentInfo->cntFadeFrames < in CConcealment_ApplyInter()
1078 FDK_ASSERT(pConcealmentInfo->cntFadeFrames < in CConcealment_ApplyInter()
1091 pConcealmentInfo->windowShape; /* Prevent an invalid WindowShape in CConcealment_ApplyInter()
1094 CConcealment_GetWinSeq(pConcealmentInfo->windowSequence); in CConcealment_ApplyInter()
1095 pConcealmentInfo->windowSequence = in CConcealment_ApplyInter()
1327 CConcealmentInfo *pConcealmentInfo, int frameOk, in CConcealment_UpdateState() argument
1330 CConcealParams *pConcealCommonData = pConcealmentInfo->pConcealParams; in CConcealment_UpdateState()
1334 if (pConcealmentInfo->concealState != ConcealState_Ok) { in CConcealment_UpdateState()
1337 pConcealmentInfo->cntValidFrames += 1; in CConcealment_UpdateState()
1339 pConcealmentInfo->cntValidFrames = 0; in CConcealment_UpdateState()
1344 switch (pConcealmentInfo->concealState) { in CConcealment_UpdateState()
1347 pConcealmentInfo->cntFadeFrames = 0; in CConcealment_UpdateState()
1348 pConcealmentInfo->cntValidFrames = 0; in CConcealment_UpdateState()
1349 pConcealmentInfo->attGrpOffset[0] = 0; in CConcealment_UpdateState()
1350 pConcealmentInfo->attGrpOffset[1] = 0; in CConcealment_UpdateState()
1351 pConcealmentInfo->winGrpOffset[0] = 0; in CConcealment_UpdateState()
1352 pConcealmentInfo->winGrpOffset[1] = 0; in CConcealment_UpdateState()
1355 pConcealmentInfo->concealState = ConcealState_Single; in CConcealment_UpdateState()
1358 /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo, in CConcealment_UpdateState()
1363 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1372 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1374 if (pConcealmentInfo->cntFadeFrames >= in CConcealment_UpdateState()
1377 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1380 pConcealmentInfo->concealState = ConcealState_FadeOut; in CConcealment_UpdateState()
1383 /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo, in CConcealment_UpdateState()
1390 if (pConcealmentInfo->cntValidFrames > in CConcealment_UpdateState()
1394 pConcealmentInfo->concealState = ConcealState_FadeIn; in CConcealment_UpdateState()
1395 pConcealmentInfo->cntFadeFrames = findEquiFadeFrame( in CConcealment_UpdateState()
1396 pConcealCommonData, pConcealmentInfo->cntFadeFrames, in CConcealment_UpdateState()
1400 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1406 pConcealmentInfo->winGrpOffset[0] = 0; in CConcealment_UpdateState()
1407 pConcealmentInfo->winGrpOffset[1] = 0; in CConcealment_UpdateState()
1408 pConcealmentInfo->attGrpOffset[0] = 0; in CConcealment_UpdateState()
1409 pConcealmentInfo->attGrpOffset[1] = 0; in CConcealment_UpdateState()
1411 if (pConcealmentInfo->cntFadeFrames >= in CConcealment_UpdateState()
1414 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1419 /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo, in CConcealment_UpdateState()
1426 if (pConcealmentInfo->cntValidFrames > in CConcealment_UpdateState()
1430 pConcealmentInfo->concealState = ConcealState_FadeIn; in CConcealment_UpdateState()
1431 pConcealmentInfo->cntFadeFrames = in CConcealment_UpdateState()
1435 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1441 pConcealmentInfo->winGrpOffset[0] = 0; in CConcealment_UpdateState()
1442 pConcealmentInfo->winGrpOffset[1] = 0; in CConcealment_UpdateState()
1443 pConcealmentInfo->attGrpOffset[0] = 0; in CConcealment_UpdateState()
1444 pConcealmentInfo->attGrpOffset[1] = 0; in CConcealment_UpdateState()
1450 pConcealmentInfo->cntFadeFrames -= 1; in CConcealment_UpdateState()
1452 if (pConcealmentInfo->cntFadeFrames < 0) { in CConcealment_UpdateState()
1454 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1459 pConcealmentInfo->concealState = ConcealState_FadeOut; in CConcealment_UpdateState()
1460 pConcealmentInfo->cntFadeFrames = findEquiFadeFrame( in CConcealment_UpdateState()
1461 pConcealCommonData, pConcealmentInfo->cntFadeFrames + 1, in CConcealment_UpdateState()
1463 pConcealmentInfo->winGrpOffset[0] = 0; in CConcealment_UpdateState()
1464 pConcealmentInfo->winGrpOffset[1] = 0; in CConcealment_UpdateState()
1465 pConcealmentInfo->attGrpOffset[0] = 0; in CConcealment_UpdateState()
1466 pConcealmentInfo->attGrpOffset[1] = 0; in CConcealment_UpdateState()
1468 pConcealmentInfo in CConcealment_UpdateState()
1474 /*mode =*/0, pConcealmentInfo, pAacDecoderStaticChannelInfo, in CConcealment_UpdateState()
1478 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1491 if (pConcealmentInfo->concealState != ConcealState_Ok) { in CConcealment_UpdateState()
1493 if (pConcealmentInfo->prevFrameOk[1] || in CConcealment_UpdateState()
1494 (pConcealmentInfo->prevFrameOk[0] && in CConcealment_UpdateState()
1495 !pConcealmentInfo->prevFrameOk[1] && frameOk)) { in CConcealment_UpdateState()
1498 pConcealmentInfo->cntValidFrames += 1; in CConcealment_UpdateState()
1500 pConcealmentInfo->cntValidFrames = 0; in CConcealment_UpdateState()
1505 switch (pConcealmentInfo->concealState) { in CConcealment_UpdateState()
1507 if (!(pConcealmentInfo->prevFrameOk[1] || in CConcealment_UpdateState()
1508 (pConcealmentInfo->prevFrameOk[0] && in CConcealment_UpdateState()
1509 !pConcealmentInfo->prevFrameOk[1] && frameOk))) { in CConcealment_UpdateState()
1513 pConcealmentInfo->concealState = ConcealState_FadeOut; in CConcealment_UpdateState()
1516 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1518 pConcealmentInfo->cntFadeFrames = 0; in CConcealment_UpdateState()
1519 pConcealmentInfo->cntValidFrames = 0; in CConcealment_UpdateState()
1524 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1528 pConcealmentInfo->cntFadeFrames += 1; in CConcealment_UpdateState()
1530 if (pConcealmentInfo->cntValidFrames > in CConcealment_UpdateState()
1534 pConcealmentInfo->concealState = ConcealState_FadeIn; in CConcealment_UpdateState()
1535 pConcealmentInfo->cntFadeFrames = findEquiFadeFrame( in CConcealment_UpdateState()
1536 pConcealCommonData, pConcealmentInfo->cntFadeFrames - 1, in CConcealment_UpdateState()
1540 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1543 if (pConcealmentInfo->cntFadeFrames >= in CConcealment_UpdateState()
1546 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1552 if (pConcealmentInfo->cntValidFrames > in CConcealment_UpdateState()
1556 pConcealmentInfo->concealState = ConcealState_FadeIn; in CConcealment_UpdateState()
1557 pConcealmentInfo->cntFadeFrames = in CConcealment_UpdateState()
1561 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1567 pConcealmentInfo->cntFadeFrames -= in CConcealment_UpdateState()
1570 if (frameOk || pConcealmentInfo->prevFrameOk[1]) { in CConcealment_UpdateState()
1571 if (pConcealmentInfo->cntFadeFrames < 0) { in CConcealment_UpdateState()
1573 pConcealmentInfo->concealState = ConcealState_Ok; in CConcealment_UpdateState()
1578 pConcealmentInfo->concealState = ConcealState_FadeOut; in CConcealment_UpdateState()
1579 pConcealmentInfo->cntFadeFrames = findEquiFadeFrame( in CConcealment_UpdateState()
1580 pConcealCommonData, pConcealmentInfo->cntFadeFrames + 1, in CConcealment_UpdateState()
1584 pConcealmentInfo->concealState = ConcealState_Mute; in CConcealment_UpdateState()
1672 int mode, CConcealmentInfo *pConcealmentInfo, in CConcealment_ApplyFadeOut() argument
1693 if (pConcealmentInfo->lastRenderMode == AACDEC_RENDER_LPD) { in CConcealment_ApplyFadeOut()
1713 pConcealmentInfo->lastWinGrpLen = 1; in CConcealment_ApplyFadeOut()
1715 pIcsInfo->WindowShape = pConcealmentInfo->windowShape; in CConcealment_ApplyFadeOut()
1716 pIcsInfo->WindowSequence = pConcealmentInfo->windowSequence; in CConcealment_ApplyFadeOut()
1718 if (pConcealmentInfo->windowSequence == BLOCK_SHORT) { in CConcealment_ApplyFadeOut()
1722 srcGrpStart = numWindows - pConcealmentInfo->lastWinGrpLen; in CConcealment_ApplyFadeOut()
1727 fMax(1, (int)(numWindows / (pConcealmentInfo->lastWinGrpLen + 1))); in CConcealment_ApplyFadeOut()
1730 attIdx = pConcealmentInfo->cntFadeFrames; in CConcealment_ApplyFadeOut()
1731 numWinGrpPerFac = pConcealmentInfo->attGrpOffset[mode]; in CConcealment_ApplyFadeOut()
1732 srcWin = srcGrpStart + pConcealmentInfo->winGrpOffset[mode]; in CConcealment_ApplyFadeOut()
1739 pConcealmentInfo->spectralCoefficient + (srcWin * windowLen); in CConcealment_ApplyFadeOut()
1744 if (attIdx > pConcealmentInfo->pConcealParams->numFadeOutFrames) { in CConcealment_ApplyFadeOut()
1755 CConcealment_ApplyRandomSign(pConcealmentInfo->iRandomPhase, pOut, in CConcealment_ApplyFadeOut()
1759 pConcealmentInfo->iRandomPhase = in CConcealment_ApplyFadeOut()
1760 (pConcealmentInfo->iRandomPhase + 1) & (AAC_NF_NO_RANDOM_VAL - 1); in CConcealment_ApplyFadeOut()
1764 pConcealmentInfo->specScale[srcWin * winIdxStride]; in CConcealment_ApplyFadeOut()
1782 pConcealmentInfo->winGrpOffset[mode] = srcWin - srcGrpStart; in CConcealment_ApplyFadeOut()
1783 FDK_ASSERT((pConcealmentInfo->winGrpOffset[mode] >= 0) && in CConcealment_ApplyFadeOut()
1784 (pConcealmentInfo->winGrpOffset[mode] < 8)); in CConcealment_ApplyFadeOut()
1785 pConcealmentInfo->attGrpOffset[mode] = numWinGrpPerFac; in CConcealment_ApplyFadeOut()
1786 FDK_ASSERT((pConcealmentInfo->attGrpOffset[mode] >= 0) && in CConcealment_ApplyFadeOut()
1787 (pConcealmentInfo->attGrpOffset[mode] < attIdxStride)); in CConcealment_ApplyFadeOut()
1790 pConcealmentInfo->cntFadeFrames = attIdx; in CConcealment_ApplyFadeOut()
1860 CConcealmentInfo *pConcealmentInfo = in CConcealment_TDFading() local
1862 CConcealParams *pConcealParams = pConcealmentInfo->pConcealParams; in CConcealment_TDFading()
1863 const CConcealmentState concealState = pConcealmentInfo->concealState; in CConcealment_TDFading()
1868 pConcealmentInfo in CConcealment_TDFading()
1871 const INT cntFadeFrames = pConcealmentInfo->cntFadeFrames; in CConcealment_TDFading()
1889 pConcealmentInfo->pConcealParams->numFadeOutFrames) { in CConcealment_TDFading()
1901 fadingType = (pConcealmentInfo->concealState_old == ConcealState_Mute) in CConcealment_TDFading()
1916 if (pConcealmentInfo->pConcealParams->numFadeInFrames == 0) { in CConcealment_TDFading()
1930 if (pConcealmentInfo->pConcealParams->numFadeOutFrames == 0) { in CConcealment_TDFading()
1965 CConcealment_TDNoise_Apply(pConcealmentInfo, len, pcmdata); in CConcealment_TDFading()
1968 pConcealmentInfo->lastFadingType = fadingType; in CConcealment_TDFading()
1969 pConcealmentInfo->fade_old = fadeStop; in CConcealment_TDFading()
1970 pConcealmentInfo->concealState_old = concealState; in CConcealment_TDFading()
2057 static void CConcealment_TDNoise_Apply(CConcealmentInfo *const pConcealmentInfo, in CConcealment_TDNoise_Apply() argument
2059 FIXP_PCM *states = pConcealmentInfo->TDNoiseStates; in CConcealment_TDNoise_Apply()
2062 FIXP_SGL *coef = pConcealmentInfo->TDNoiseCoef; in CConcealment_TDNoise_Apply()
2064 ULONG seed = pConcealmentInfo->TDNoiseSeed = in CConcealment_TDNoise_Apply()
2065 (ULONG)CConcealment_TDNoise_Random(&pConcealmentInfo->TDNoiseSeed) + 1; in CConcealment_TDNoise_Apply()
2067 TDNoiseAtt = pConcealmentInfo->pConcealParams->comfortNoiseLevel; in CConcealment_TDNoise_Apply()
2071 if ((pConcealmentInfo->concealState != ConcealState_Ok || in CConcealment_TDNoise_Apply()
2072 pConcealmentInfo->concealState_old != ConcealState_Ok) && in CConcealment_TDNoise_Apply()