• Home
  • Raw
  • Download

Lines Matching refs:hSbrElement

748   HANDLE_SBR_ELEMENT hSbrElement = *phSbrElement;  in sbrEncoder_ElementClose()  local
750 if (hSbrElement != NULL) { in sbrEncoder_ElementClose()
751 if (hSbrElement->sbrConfigData.v_k_master) in sbrEncoder_ElementClose()
752 FreeRam_Sbr_v_k_master(&hSbrElement->sbrConfigData.v_k_master); in sbrEncoder_ElementClose()
753 if (hSbrElement->sbrConfigData.freqBandTable[LO]) in sbrEncoder_ElementClose()
755 &hSbrElement->sbrConfigData.freqBandTable[LO]); in sbrEncoder_ElementClose()
756 if (hSbrElement->sbrConfigData.freqBandTable[HI]) in sbrEncoder_ElementClose()
758 &hSbrElement->sbrConfigData.freqBandTable[HI]); in sbrEncoder_ElementClose()
949 HANDLE_SBR_ELEMENT hSbrElement = NULL; in FDKsbrEnc_EnvEncodeFrame() local
959 hSbrElement = hEnvEncoder->sbrElement[iElement]; in FDKsbrEnc_EnvEncodeFrame()
961 if (hSbrElement == NULL) return -1; in FDKsbrEnc_EnvEncodeFrame()
964 HANDLE_SBR_BITSTREAM_DATA sbrBitstreamData = &hSbrElement->sbrBitstreamData; in FDKsbrEnc_EnvEncodeFrame()
992 if (hSbrElement->CmonData.dynBwEnabled) { in FDKsbrEnc_EnvEncodeFrame()
995 hSbrElement->dynXOverFreqDelay[i] = hSbrElement->dynXOverFreqDelay[i - 1]; in FDKsbrEnc_EnvEncodeFrame()
997 hSbrElement->dynXOverFreqDelay[0] = hSbrElement->CmonData.dynXOverFreqEnc; in FDKsbrEnc_EnvEncodeFrame()
998 if (hSbrElement->dynXOverFreqDelay[1] > hSbrElement->dynXOverFreqDelay[2]) in FDKsbrEnc_EnvEncodeFrame()
999 newXOver = hSbrElement->dynXOverFreqDelay[2]; in FDKsbrEnc_EnvEncodeFrame()
1001 newXOver = hSbrElement->dynXOverFreqDelay[1]; in FDKsbrEnc_EnvEncodeFrame()
1004 if (hSbrElement->sbrConfigData.dynXOverFreq != newXOver) { in FDKsbrEnc_EnvEncodeFrame()
1006 cutoffSb = ((4 * newXOver * hSbrElement->sbrConfigData.noQmfBands / in FDKsbrEnc_EnvEncodeFrame()
1007 hSbrElement->sbrConfigData.sampleFreq) + in FDKsbrEnc_EnvEncodeFrame()
1011 for (band = 0; band < hSbrElement->sbrConfigData.num_Master; band++) { in FDKsbrEnc_EnvEncodeFrame()
1012 if (cutoffSb == hSbrElement->sbrConfigData.v_k_master[band]) break; in FDKsbrEnc_EnvEncodeFrame()
1014 FDK_ASSERT(band < hSbrElement->sbrConfigData.num_Master); in FDKsbrEnc_EnvEncodeFrame()
1016 hSbrElement->sbrConfigData.dynXOverFreq = newXOver; in FDKsbrEnc_EnvEncodeFrame()
1017 hSbrElement->sbrHeaderData.sbr_xover_band = band; in FDKsbrEnc_EnvEncodeFrame()
1018 hSbrElement->sbrBitstreamData.HeaderActive = 1; in FDKsbrEnc_EnvEncodeFrame()
1024 if (updateFreqBandTable(&hSbrElement->sbrConfigData, in FDKsbrEnc_EnvEncodeFrame()
1025 &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvEncodeFrame()
1030 INT nEnvCh = hSbrElement->sbrConfigData.nChannels; in FDKsbrEnc_EnvEncodeFrame()
1032 if (resetEnvChannel(&hSbrElement->sbrConfigData, in FDKsbrEnc_EnvEncodeFrame()
1033 &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvEncodeFrame()
1034 &hSbrElement->sbrChannel[ch]->hEnvChannel)) in FDKsbrEnc_EnvEncodeFrame()
1044 &hSbrElement->CmonData, in FDKsbrEnc_EnvEncodeFrame()
1045 hSbrElement->payloadDelayLine[hEnvEncoder->nBitstrDelay], in FDKsbrEnc_EnvEncodeFrame()
1047 hSbrElement->sbrConfigData.sbrSyntaxFlags); in FDKsbrEnc_EnvEncodeFrame()
1069 for (ch = 0; ch < hSbrElement->sbrConfigData.nChannels; ch++) { in FDKsbrEnc_EnvEncodeFrame()
1070 HANDLE_ENV_CHANNEL h_envChan = &hSbrElement->sbrChannel[ch]->hEnvChannel; in FDKsbrEnc_EnvEncodeFrame()
1073 if (hSbrElement->elInfo.fParametricStereo == 0) { in FDKsbrEnc_EnvEncodeFrame()
1083 hSbrElement->hQmfAnalysis[ch], pQmfReal, pQmfImag, &tmpScale, in FDKsbrEnc_EnvEncodeFrame()
1084 samples + hSbrElement->elInfo.ChannelIndex[ch] * samplesBufSize, 0, in FDKsbrEnc_EnvEncodeFrame()
1096 if (hSbrElement->elInfo.fParametricStereo) { in FDKsbrEnc_EnvEncodeFrame()
1117 samples + hSbrElement->elInfo.ChannelIndex[0] * samplesBufSize, in FDKsbrEnc_EnvEncodeFrame()
1118 samples + hSbrElement->elInfo.ChannelIndex[1] * samplesBufSize}; in FDKsbrEnc_EnvEncodeFrame()
1121 hSbrElement->hQmfAnalysis, sbrExtrEnv->rBuffer, in FDKsbrEnc_EnvEncodeFrame()
1123 samples + hSbrElement->elInfo.ChannelIndex[ch] * samplesBufSize, in FDKsbrEnc_EnvEncodeFrame()
1135 FDKsbrEnc_extractSbrEnvelope1(&hSbrElement->sbrConfigData, in FDKsbrEnc_EnvEncodeFrame()
1136 &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvEncodeFrame()
1137 &hSbrElement->sbrBitstreamData, h_envChan, in FDKsbrEnc_EnvEncodeFrame()
1138 &hSbrElement->CmonData, &eData[ch], fData); in FDKsbrEnc_EnvEncodeFrame()
1148 &hSbrElement->sbrConfigData, &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvEncodeFrame()
1149 (hSbrElement->elInfo.fParametricStereo) ? hEnvEncoder->hParametricStereo in FDKsbrEnc_EnvEncodeFrame()
1151 &hSbrElement->sbrBitstreamData, &hSbrElement->sbrChannel[0]->hEnvChannel, in FDKsbrEnc_EnvEncodeFrame()
1152 (hSbrElement->sbrConfigData.stereoMode != SBR_MONO) in FDKsbrEnc_EnvEncodeFrame()
1153 ? &hSbrElement->sbrChannel[1]->hEnvChannel in FDKsbrEnc_EnvEncodeFrame()
1155 &hSbrElement->CmonData, eData, fData, clearOutput); in FDKsbrEnc_EnvEncodeFrame()
1157 hSbrElement->sbrBitstreamData.rightBorderFIX = 0; in FDKsbrEnc_EnvEncodeFrame()
1162 FDKsbrEnc_AssembleSbrBitstream(&hSbrElement->CmonData, &crcInfo, crcReg, in FDKsbrEnc_EnvEncodeFrame()
1163 hSbrElement->sbrConfigData.sbrSyntaxFlags); in FDKsbrEnc_EnvEncodeFrame()
1168 hSbrElement->payloadDelayLineSize[hEnvEncoder->nBitstrDelay] = in FDKsbrEnc_EnvEncodeFrame()
1169 FDKgetValidBits(&hSbrElement->CmonData.sbrBitbuf); in FDKsbrEnc_EnvEncodeFrame()
1171 if (hSbrElement->payloadDelayLineSize[hEnvEncoder->nBitstrDelay] > in FDKsbrEnc_EnvEncodeFrame()
1173 hSbrElement->payloadDelayLineSize[hEnvEncoder->nBitstrDelay] = 0; in FDKsbrEnc_EnvEncodeFrame()
1177 *sbrDataBits = hSbrElement->payloadDelayLineSize[0]; in FDKsbrEnc_EnvEncodeFrame()
1178 FDKmemcpy(sbrData, hSbrElement->payloadDelayLine[0], in FDKsbrEnc_EnvEncodeFrame()
1179 (hSbrElement->payloadDelayLineSize[0] + 7) >> 3); in FDKsbrEnc_EnvEncodeFrame()
1183 if (hSbrElement->sbrBitstreamData.HeaderActive == 1) { in FDKsbrEnc_EnvEncodeFrame()
1184 hSbrElement->sbrBitstreamData.HeaderActiveDelay = in FDKsbrEnc_EnvEncodeFrame()
1187 if (hSbrElement->sbrBitstreamData.HeaderActiveDelay > 0) { in FDKsbrEnc_EnvEncodeFrame()
1188 hSbrElement->sbrBitstreamData.HeaderActiveDelay--; in FDKsbrEnc_EnvEncodeFrame()
1213 HANDLE_SBR_ELEMENT hSbrElement = NULL; in FDKsbrEnc_Downsample() local
1221 hSbrElement = hSbrEncoder->sbrElement[el]; in FDKsbrEnc_Downsample()
1225 int nChannels = hSbrElement->sbrConfigData.nChannels; in FDKsbrEnc_Downsample()
1229 &hSbrElement->sbrChannel[ch]->downSampler, in FDKsbrEnc_Downsample()
1231 hSbrElement->elInfo.ChannelIndex[ch] * samplesBufSize + in FDKsbrEnc_Downsample()
1233 hSbrElement->sbrConfigData.frameSize, in FDKsbrEnc_Downsample()
1234 samples + hSbrElement->elInfo.ChannelIndex[ch] * samplesBufSize, in FDKsbrEnc_Downsample()
1604 HANDLE_SBR_ELEMENT hSbrElement = hSbrEncoder->sbrElement[el]; in FDKsbrEnc_Reallocate() local
1608 hSbrElement->sbrChannel[ch] = hSbrEncoder->pSbrChannel[totalCh]; in FDKsbrEnc_Reallocate()
1615 hSbrElement->elInfo.ChannelIndex[ch] = pelInfo->ChannelIndex[ch]; in FDKsbrEnc_Reallocate()
1616 hSbrElement->hQmfAnalysis[ch] = &hSbrEncoder->QmfAnalysis[totalQmf++]; in FDKsbrEnc_Reallocate()
1620 hSbrElement->elInfo.elType = pelInfo->elType; in FDKsbrEnc_Reallocate()
1621 hSbrElement->elInfo.instanceTag = pelInfo->instanceTag; in FDKsbrEnc_Reallocate()
1622 hSbrElement->elInfo.nChannelsInEl = pelInfo->nChannelsInEl; in FDKsbrEnc_Reallocate()
1623 hSbrElement->elInfo.fParametricStereo = pelInfo->fParametricStereo; in FDKsbrEnc_Reallocate()
1624 hSbrElement->elInfo.fDualMono = pelInfo->fDualMono; in FDKsbrEnc_Reallocate()
1639 static INT FDKsbrEnc_bsBufInit(HANDLE_SBR_ELEMENT hSbrElement, in FDKsbrEnc_bsBufInit() argument
1644 bitstreamBuffer = hSbrElement->payloadDelayLine[nBitstrDelay]; in FDKsbrEnc_bsBufInit()
1645 FDKinitBitStream(&hSbrElement->CmonData.sbrBitbuf, bitstreamBuffer, in FDKsbrEnc_bsBufInit()
1660 static INT FDKsbrEnc_EnvInit(HANDLE_SBR_ELEMENT hSbrElement, in FDKsbrEnc_EnvInit() argument
1674 hSbrElement->sbrConfigData.sbrSyntaxFlags = 0; in FDKsbrEnc_EnvInit()
1678 hSbrElement->sbrConfigData.sbrSyntaxFlags |= SBR_SYNTAX_LOW_DELAY; in FDKsbrEnc_EnvInit()
1684 hSbrElement->sbrConfigData.sbrSyntaxFlags |= SBR_SYNTAX_CRC; in FDKsbrEnc_EnvInit()
1687 hSbrElement->sbrConfigData.noQmfBands = 64 >> (2 - params->downSampleFactor); in FDKsbrEnc_EnvInit()
1688 switch (hSbrElement->sbrConfigData.noQmfBands) { in FDKsbrEnc_EnvInit()
1690 hSbrElement->sbrConfigData.noQmfSlots = params->sbrFrameSize >> 6; in FDKsbrEnc_EnvInit()
1693 hSbrElement->sbrConfigData.noQmfSlots = params->sbrFrameSize >> 5; in FDKsbrEnc_EnvInit()
1696 hSbrElement->sbrConfigData.noQmfSlots = params->sbrFrameSize >> 6; in FDKsbrEnc_EnvInit()
1703 hSbrElement->sbrConfigData.nChannels = params->codecSettings.nChannels; in FDKsbrEnc_EnvInit()
1706 if ((hSbrElement->elInfo.elType == ID_CPE) && in FDKsbrEnc_EnvInit()
1707 ((hSbrElement->elInfo.fDualMono == 1))) { in FDKsbrEnc_EnvInit()
1708 hSbrElement->sbrConfigData.stereoMode = SBR_LEFT_RIGHT; in FDKsbrEnc_EnvInit()
1710 hSbrElement->sbrConfigData.stereoMode = params->stereoMode; in FDKsbrEnc_EnvInit()
1713 hSbrElement->sbrConfigData.stereoMode = SBR_MONO; in FDKsbrEnc_EnvInit()
1716 hSbrElement->sbrConfigData.frameSize = params->sbrFrameSize; in FDKsbrEnc_EnvInit()
1718 hSbrElement->sbrConfigData.sampleFreq = in FDKsbrEnc_EnvInit()
1721 hSbrElement->sbrBitstreamData.CountSendHeaderData = 0; in FDKsbrEnc_EnvInit()
1724 hSbrElement->sbrBitstreamData.NrSendHeaderData = (INT)( in FDKsbrEnc_EnvInit()
1725 params->SendHeaderDataTime * hSbrElement->sbrConfigData.sampleFreq / in FDKsbrEnc_EnvInit()
1726 (1000 * hSbrElement->sbrConfigData.frameSize)); in FDKsbrEnc_EnvInit()
1727 hSbrElement->sbrBitstreamData.NrSendHeaderData = in FDKsbrEnc_EnvInit()
1728 fixMax(hSbrElement->sbrBitstreamData.NrSendHeaderData, 1); in FDKsbrEnc_EnvInit()
1731 hSbrElement->sbrBitstreamData.NrSendHeaderData = fixMin( in FDKsbrEnc_EnvInit()
1732 fixMax(headerPeriod, 1), (hSbrElement->sbrConfigData.sampleFreq / in FDKsbrEnc_EnvInit()
1733 hSbrElement->sbrConfigData.frameSize)); in FDKsbrEnc_EnvInit()
1736 hSbrElement->sbrBitstreamData.NrSendHeaderData = 0; in FDKsbrEnc_EnvInit()
1739 hSbrElement->sbrHeaderData.sbr_data_extra = params->sbr_data_extra; in FDKsbrEnc_EnvInit()
1740 hSbrElement->sbrBitstreamData.HeaderActive = 0; in FDKsbrEnc_EnvInit()
1741 hSbrElement->sbrBitstreamData.rightBorderFIX = 0; in FDKsbrEnc_EnvInit()
1742 hSbrElement->sbrHeaderData.sbr_start_frequency = params->startFreq; in FDKsbrEnc_EnvInit()
1743 hSbrElement->sbrHeaderData.sbr_stop_frequency = params->stopFreq; in FDKsbrEnc_EnvInit()
1744 hSbrElement->sbrHeaderData.sbr_xover_band = 0; in FDKsbrEnc_EnvInit()
1745 hSbrElement->sbrHeaderData.sbr_lc_stereo_mode = 0; in FDKsbrEnc_EnvInit()
1749 hSbrElement->sbrHeaderData.sbr_data_extra = 1; in FDKsbrEnc_EnvInit()
1751 hSbrElement->sbrHeaderData.sbr_amp_res = (AMP_RES)params->amp_res; in FDKsbrEnc_EnvInit()
1754 hSbrElement->sbrHeaderData.freqScale = params->freqScale; in FDKsbrEnc_EnvInit()
1755 hSbrElement->sbrHeaderData.alterScale = params->alterScale; in FDKsbrEnc_EnvInit()
1756 hSbrElement->sbrHeaderData.sbr_noise_bands = params->sbr_noise_bands; in FDKsbrEnc_EnvInit()
1757 hSbrElement->sbrHeaderData.header_extra_1 = 0; in FDKsbrEnc_EnvInit()
1762 hSbrElement->sbrHeaderData.header_extra_1 = 1; in FDKsbrEnc_EnvInit()
1766 hSbrElement->sbrHeaderData.sbr_limiter_bands = params->sbr_limiter_bands; in FDKsbrEnc_EnvInit()
1767 hSbrElement->sbrHeaderData.sbr_limiter_gains = params->sbr_limiter_gains; in FDKsbrEnc_EnvInit()
1769 if ((hSbrElement->sbrConfigData.sampleFreq > 48000) && in FDKsbrEnc_EnvInit()
1770 (hSbrElement->sbrHeaderData.sbr_start_frequency >= 9)) { in FDKsbrEnc_EnvInit()
1771 hSbrElement->sbrHeaderData.sbr_limiter_gains = SBR_LIMITER_GAINS_INFINITE; in FDKsbrEnc_EnvInit()
1774 hSbrElement->sbrHeaderData.sbr_interpol_freq = params->sbr_interpol_freq; in FDKsbrEnc_EnvInit()
1775 hSbrElement->sbrHeaderData.sbr_smoothing_length = in FDKsbrEnc_EnvInit()
1777 hSbrElement->sbrHeaderData.header_extra_2 = 0; in FDKsbrEnc_EnvInit()
1783 hSbrElement->sbrHeaderData.header_extra_2 = 1; in FDKsbrEnc_EnvInit()
1787 hSbrElement->sbrConfigData.useWaveCoding = params->useWaveCoding; in FDKsbrEnc_EnvInit()
1788 hSbrElement->sbrConfigData.useParametricCoding = params->parametricCoding; in FDKsbrEnc_EnvInit()
1789 hSbrElement->sbrConfigData.thresholdAmpResFF_m = in FDKsbrEnc_EnvInit()
1791 hSbrElement->sbrConfigData.thresholdAmpResFF_e = in FDKsbrEnc_EnvInit()
1795 if (updateFreqBandTable(&hSbrElement->sbrConfigData, in FDKsbrEnc_EnvInit()
1796 &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvInit()
1802 for (ch = 0; ch < hSbrElement->sbrConfigData.nChannels; ch++) { in FDKsbrEnc_EnvInit()
1803 if (initEnvChannel(&hSbrElement->sbrConfigData, &hSbrElement->sbrHeaderData, in FDKsbrEnc_EnvInit()
1804 &hSbrElement->sbrChannel[ch]->hEnvChannel, params, in FDKsbrEnc_EnvInit()
1812 for (ch = 0; ch < ((hSbrElement->elInfo.fParametricStereo) in FDKsbrEnc_EnvInit()
1814 : hSbrElement->sbrConfigData.nChannels); in FDKsbrEnc_EnvInit()
1818 (hSbrElement->sbrConfigData.sbrSyntaxFlags & SBR_SYNTAX_LOW_DELAY) in FDKsbrEnc_EnvInit()
1827 hSbrElement->hQmfAnalysis[ch], in FDKsbrEnc_EnvInit()
1828 (FIXP_QAS *)hSbrElement->hQmfAnalysis[ch]->FilterStates, in FDKsbrEnc_EnvInit()
1829 hSbrElement->sbrConfigData.noQmfSlots, in FDKsbrEnc_EnvInit()
1830 hSbrElement->sbrConfigData.noQmfBands, in FDKsbrEnc_EnvInit()
1831 hSbrElement->sbrConfigData.noQmfBands, in FDKsbrEnc_EnvInit()
1832 hSbrElement->sbrConfigData.noQmfBands, qmfFlags); in FDKsbrEnc_EnvInit()
1839 hSbrElement->CmonData.xOverFreq = hSbrElement->sbrConfigData.xOverFreq; in FDKsbrEnc_EnvInit()
1840 hSbrElement->CmonData.dynBwEnabled = in FDKsbrEnc_EnvInit()
1842 hSbrElement->CmonData.dynXOverFreqEnc = in FDKsbrEnc_EnvInit()
1843 FDKsbrEnc_SbrGetXOverFreq(hSbrElement, hSbrElement->CmonData.xOverFreq); in FDKsbrEnc_EnvInit()
1845 hSbrElement->dynXOverFreqDelay[i] = hSbrElement->CmonData.dynXOverFreqEnc; in FDKsbrEnc_EnvInit()
1846 hSbrElement->CmonData.sbrNumChannels = hSbrElement->sbrConfigData.nChannels; in FDKsbrEnc_EnvInit()
1847 hSbrElement->sbrConfigData.dynXOverFreq = hSbrElement->CmonData.xOverFreq; in FDKsbrEnc_EnvInit()
1850 *coreBandWith = hSbrElement->CmonData.xOverFreq; in FDKsbrEnc_EnvInit()