Lines Matching refs:hPsEncode
719 void FDKsbrEnc_initPsBandNrgScale(HANDLE_PS_ENCODE hPsEncode) { in FDKsbrEnc_initPsBandNrgScale() argument
721 INT nIidGroups = hPsEncode->nQmfIidGroups + hPsEncode->nSubQmfIidGroups; in FDKsbrEnc_initPsBandNrgScale()
723 FDKmemclear(hPsEncode->psBandNrgScale, PS_MAX_BANDS * sizeof(SCHAR)); in FDKsbrEnc_initPsBandNrgScale()
727 bin = hPsEncode->subband2parameterIndex[group]; in FDKsbrEnc_initPsBandNrgScale()
730 if (hPsEncode->psEncMode == PS_BANDS_COARSE) { in FDKsbrEnc_initPsBandNrgScale()
734 hPsEncode->psBandNrgScale[bin] = in FDKsbrEnc_initPsBandNrgScale()
735 (hPsEncode->psBandNrgScale[bin] == 0) in FDKsbrEnc_initPsBandNrgScale()
736 ? (hPsEncode->iidGroupWidthLd[group] + 5) in FDKsbrEnc_initPsBandNrgScale()
737 : (fixMax(hPsEncode->iidGroupWidthLd[group], in FDKsbrEnc_initPsBandNrgScale()
738 hPsEncode->psBandNrgScale[bin]) + in FDKsbrEnc_initPsBandNrgScale()
749 HANDLE_PS_ENCODE hPsEncode = NULL; in FDKsbrEnc_CreatePSEncode() local
750 if (NULL == (hPsEncode = GetRam_PsEncode())) { in FDKsbrEnc_CreatePSEncode()
754 FDKmemclear(hPsEncode, sizeof(PS_ENCODE)); in FDKsbrEnc_CreatePSEncode()
755 *phPsEncode = hPsEncode; /* return allocated handle */ in FDKsbrEnc_CreatePSEncode()
761 FDK_PSENC_ERROR FDKsbrEnc_InitPSEncode(HANDLE_PS_ENCODE hPsEncode, in FDKsbrEnc_InitPSEncode() argument
766 if (NULL == hPsEncode) { in FDKsbrEnc_InitPSEncode()
769 if (PSENC_OK != (InitPSData(&hPsEncode->psData))) { in FDKsbrEnc_InitPSEncode()
776 hPsEncode->nQmfIidGroups = QMF_GROUPS_LO_RES; in FDKsbrEnc_InitPSEncode()
777 hPsEncode->nSubQmfIidGroups = SUBQMF_GROUPS_LO_RES; in FDKsbrEnc_InitPSEncode()
778 FDKmemcpy(hPsEncode->iidGroupBorders, iidGroupBordersLoRes, in FDKsbrEnc_InitPSEncode()
779 (hPsEncode->nQmfIidGroups + hPsEncode->nSubQmfIidGroups + 1) * in FDKsbrEnc_InitPSEncode()
781 FDKmemcpy(hPsEncode->subband2parameterIndex, subband2parameter20, in FDKsbrEnc_InitPSEncode()
782 (hPsEncode->nQmfIidGroups + hPsEncode->nSubQmfIidGroups) * in FDKsbrEnc_InitPSEncode()
784 FDKmemcpy(hPsEncode->iidGroupWidthLd, iidGroupWidthLdLoRes, in FDKsbrEnc_InitPSEncode()
785 (hPsEncode->nQmfIidGroups + hPsEncode->nSubQmfIidGroups) * in FDKsbrEnc_InitPSEncode()
793 hPsEncode->psEncMode = psEncMode; in FDKsbrEnc_InitPSEncode()
794 hPsEncode->iidQuantErrorThreshold = iidQuantErrorThreshold; in FDKsbrEnc_InitPSEncode()
795 FDKsbrEnc_initPsBandNrgScale(hPsEncode); in FDKsbrEnc_InitPSEncode()
822 HANDLE_PS_ENCODE hPsEncode, HANDLE_PS_OUT hPsOut, UCHAR *dynBandScale, in FDKsbrEnc_PSEncode() argument
828 HANDLE_PS_DATA hPsData = &hPsEncode->psData; in FDKsbrEnc_PSEncode()
837 int psBands = (int)hPsEncode->psEncMode; in FDKsbrEnc_PSEncode()
838 int nIidGroups = hPsEncode->nQmfIidGroups + hPsEncode->nSubQmfIidGroups; in FDKsbrEnc_PSEncode()
859 bin = hPsEncode->subband2parameterIndex[group]; in FDKsbrEnc_PSEncode()
862 if (hPsEncode->psEncMode == PS_BANDS_COARSE) { in FDKsbrEnc_PSEncode()
867 int bScale = hPsEncode->psBandNrgScale[bin]; in FDKsbrEnc_PSEncode()
876 for (subband = hPsEncode->iidGroupBorders[group]; in FDKsbrEnc_PSEncode()
877 subband < hPsEncode->iidGroupBorders[group + 1]; subband++) { in FDKsbrEnc_PSEncode()
952 hPsEncode->iidQuantErrorThreshold); in FDKsbrEnc_PSEncode()