Lines Matching refs:psyData
467 PSY_DATA *RESTRICT psyData[(2)];
499 psyData[ch] = &psyDynamic->psyData[ch];
503 psyData[ch]->mdctSpectrum = psyOutChannel[ch]->mdctSpectrum;
571 pSfbMaxScaleSpec[ch] = psyData[ch]->sfbMaxScaleSpec.Short[0];
572 pSfbEnergy[ch] = psyData[ch]->sfbEnergy.Short[0];
573 pSfbSpreadEnergy[ch] = psyData[ch]->sfbSpreadEnergy.Short[0];
574 pSfbEnergyLdData[ch] = psyData[ch]->sfbEnergyLdData.Short[0];
575 pSfbEnergyMS[ch] = psyData[ch]->sfbEnergyMS.Short[0];
576 pSfbThreshold[ch] = psyData[ch]->sfbThreshold.Short[0];
585 pSfbMaxScaleSpec[ch] = psyData[ch]->sfbMaxScaleSpec.Long;
586 pSfbEnergy[ch] = psyData[ch]->sfbEnergy.Long;
587 pSfbSpreadEnergy[ch] = psyData[ch]->sfbSpreadEnergy.Long;
588 pSfbEnergyLdData[ch] = psyData[ch]->sfbEnergyLdData.Long;
589 pSfbEnergyMS[ch] = psyData[ch]->sfbEnergyMS.Long;
590 pSfbThreshold[ch] = psyData[ch]->sfbThreshold.Long;
599 psyData[ch]->sfbActive = hThisPsyConf[ch]->sfbActiveLFE;
600 psyData[ch]->lowpassLine = hThisPsyConf[ch]->lowpassLineLFE;
603 psyData[ch]->sfbActive = hThisPsyConf[ch]->sfbActive;
604 psyData[ch]->lowpassLine = hThisPsyConf[ch]->lowpassLine;
612 psyData[ch]->mdctSpectrum+wOffset,
623 FDKmemclear(&psyData[ch]->mdctSpectrum[psyData[ch]->lowpassLine+wOffset],
624 (windowLength[ch]-psyData[ch]->lowpassLine)*sizeof(FIXP_DBL));
626 if ( (hPsyConfLong->filterbank != FB_LC) && (psyData[ch]->lowpassLine >= FADE_OUT_LEN) ) {
629 psyData[ch]->mdctSpectrum[psyData[ch]->lowpassLine+wOffset - FADE_OUT_LEN + i] = fMult(psyData[ch]->mdctSpectrum[psyData[ch]->lowpassLine+wOffset - FADE_OUT_LEN + i], fadeOutFactor[i]);
635 for(line=0; (line<psyData[ch]->lowpassLine) && (zeroSpec==TRUE); line++) {
636 if (psyData[ch]->mdctSpectrum[line+wOffset] != (FIXP_DBL)0) {
644 psyData[ch]->mdctScale = mdctSpectrum_e;
673 FDKaacEnc_CalcSfbMaxScaleSpec(psyData[ch]->mdctSpectrum+wOffset,
676 psyData[ch]->sfbActive);
678 for (sfb = 0; sfb<psyData[ch]->sfbActive; sfb++)
688 currNrg = FDKaacEnc_CheckBandEnergyOptim(psyData[ch]->mdctSpectrum+wOffset,
691 psyData[ch]->sfbActive,
713 if (finalShift > psyData[0]->mdctScale + 3 )
714 finalShift = psyData[0]->mdctScale + 3;
722 for(sfb=0; sfb<psyData[ch]->sfbActive; sfb++) {
737 for(line=0; line<psyData[ch]->lowpassLine; line++) {
738 psyData[ch]->mdctSpectrum[line+wOffset] <<= finalShift;
741 for (sfb = 0; sfb<psyData[ch]->sfbActive; sfb++)
745 psyData[ch]->mdctScale -= finalShift;
752 psyData[ch]->mdctScale = 0; /* otherwise mdctScale would be for example 7 and PCM quantization thresholds would be shifted
756 for (sfb = 0; sfb<psyData[ch]->sfbActive; sfb++) {
777 FDKaacEnc_CalculateFullTonality( psyData[ch]->mdctSpectrum,
781 psyData[ch]->sfbActive,
802 psyData[ch]->mdctSpectrum+wOffset,
842 psyData[ch]->mdctSpectrum[sfb] = psyData[ch]->mdctSpectrum[sfb] >> shift;
846 for (sfb=0; sfb<psyData[ch]->sfbActive; sfb++) {
850 psyData[ch]->mdctScale += shift; /* update mdctScale */
866 hThisPsyConf[ch]->sfbOffset[psyData[ch]->sfbActive],/*hThisPsyConf[ch]->lowpassLine*/ /* filter stops before that line ! */
867 psyData[ch]->mdctSpectrum+wOffset,
874 FDKaacEnc_CalcSfbMaxScaleSpec(psyData[ch]->mdctSpectrum+wOffset,
877 psyData[ch]->sfbActive);
888 FDKaacEnc_CalcBandEnergyOptimShort(psyData[ch]->mdctSpectrum+w*windowLength[ch],
891 psyData[ch]->sfbActive,
896 FDKaacEnc_CalcBandEnergyOptimLong(psyData[ch]->mdctSpectrum,
899 psyData[ch]->sfbActive,
913 psyData[ch]->mdctSpectrum[line] >>= tnsSpecShift;
916 for(sfb=0; sfb<psyData[ch]->sfbActive; sfb++) {
921 psyData[ch]->mdctScale += tnsSpecShift; /* update mdctScale; not necessary to update sfbMaxScaleSpec */
939 INT energyShift = psyData[ch]->mdctScale*2 ;
958 for (i=0; i<psyData[ch]->sfbActive; i++) {
963 FDKaacEnc_SpreadingMax(psyData[ch]->sfbActive,
973 for (i=0; i<psyData[ch]->sfbActive;i++) {
979 for (i=0; i<psyData[ch]->sfbActive;i++) {
991 for (i=0; i<psyData[ch]->sfbActive;i++) {
1001 psyData[ch]->sfbActive,
1005 psyData[ch]->mdctScale,
1014 for (i=0; i<psyData[ch]->sfbActive;i++) {
1025 FDKmemcpy(pSfbSpreadEnergy[ch]+w*maxSfb[ch], pSfbEnergy[ch]+w*maxSfb[ch], psyData[ch]->sfbActive*sizeof(FIXP_DBL));
1027 FDKaacEnc_SpreadingMax(psyData[ch]->sfbActive,
1038 FDKaacEnc_CalcBandNrgMSOpt(psyData[0]->mdctSpectrum+wOffset,
1039 psyData[1]->mdctSpectrum+wOffset,
1043 psyData[0]->sfbActive,
1047 psyData[0]->sfbEnergyMSLdData,
1048 psyData[1]->sfbEnergyMSLdData);
1061 FDKaacEnc_groupShortData( psyData[ch]->mdctSpectrum,
1062 &psyData[ch]->sfbThreshold,
1063 &psyData[ch]->sfbEnergy,
1064 &psyData[ch]->sfbEnergyMS,
1065 &psyData[ch]->sfbSpreadEnergy,
1067 psyData[ch]->sfbActive,
1070 psyData[ch]->groupedSfbOffset,
1080 LdDataVector(&psyData[ch]->sfbEnergy.Long[sfbGrp], &psyOutChannel[ch]->sfbEnergyLdData[sfbGrp], psyData[ch]->sfbActive);
1085 LdDataVector(&psyData[ch]->sfbThreshold.Long[sfbGrp], &psyOutChannel[ch]->sfbThresholdLdData[sfbGrp], psyData[ch]->sfbActive);
1086 for (sfb=0;sfb<psyData[ch]->sfbActive;sfb++) {
1094 LdDataVector(&psyData[ch]->sfbEnergyMS.Long[sfbGrp], &psyData[ch]->sfbEnergyMSLdData[sfbGrp], psyData[ch]->sfbActive);
1098 FDKmemcpy(psyOutChannel[ch]->sfbOffsets, psyData[ch]->groupedSfbOffset, (MAX_GROUPED_SFB+1)*sizeof(INT));
1102 for (sfb = psyData[ch]->sfbActive-1; sfb >= 0; sfb--) {
1104 if (psyData[ch]->mdctSpectrum[line] != FL2FXCONST_SGL(0.0f)) break;
1110 maxSfbPerGroup[ch] = fixMax(fixMin(5,psyData[ch]->sfbActive),maxSfbPerGroup[ch]);
1113 FDKmemcpy(psyOutChannel[ch]->sfbEnergyLdData, psyData[ch]->sfbEnergyLdData.Long, psyData[ch]->sfbActive*sizeof(FIXP_DBL));
1118 FDKmemcpy(psyOutChannel[ch]->sfbMinSnrLdData, hPsyConfLong->sfbMinSnrLdData, psyData[ch]->sfbActive*sizeof(FIXP_DBL));
1123 LdDataVector(psyData[ch]->sfbThreshold.Long, psyOutChannel[ch]->sfbThresholdLdData, psyData[ch]->sfbActive);
1124 for (i=0;i<psyData[ch]->sfbActive;i++) {
1152 psyData[ch]->sfbActive,
1156 psyData[ch]->mdctSpectrum,
1157 psyData[ch]->sfbMaxScaleSpec.Long,
1182 psyData[0]->sfbActive,
1183 (&psyData[0]->sfbEnergy)->Long,
1184 (&psyData[1]->sfbEnergy)->Long,
1187 psyData[0]->sfbEnergyMS.Long,
1193 psyData[0]->sfbEnergy.Long,
1194 psyData[1]->sfbEnergy.Long,
1195 psyData[0]->mdctSpectrum,
1196 psyData[1]->mdctSpectrum,
1197 psyData[0]->sfbThreshold.Long,
1198 psyData[1]->sfbThreshold.Long,
1200 psyData[0]->sfbSpreadEnergy.Long,
1201 psyData[1]->sfbSpreadEnergy.Long,
1216 psyData,
1221 psyData[0]->sfbActive,
1222 psyData[0]->sfbActive,
1227 FDKaacEnc_PostProcessPnsChannelPair(psyData[0]->sfbActive,
1236 psyData[0]->sfbEnergy.Long,
1237 psyData[1]->sfbEnergy.Long,
1238 psyData[0]->mdctSpectrum,
1239 psyData[1]->mdctSpectrum,
1240 psyData[0]->sfbThreshold.Long,
1241 psyData[1]->sfbThreshold.Long,
1243 psyData[0]->sfbSpreadEnergy.Long,
1244 psyData[1]->sfbSpreadEnergy.Long,
1252 psyData[0]->groupedSfbOffset,
1259 FDKaacEnc_MsStereoProcessing( psyData,
1277 for(sfb = 0; sfb < psyData[ch]->sfbActive; sfb++) {
1282 FDKaacEnc_CodePnsChannel(psyData[ch]->sfbActive,
1285 psyData[ch]->sfbEnergyLdData.Long,
1299 psyOutChannel[ch]->mdctScale = psyData[ch]->mdctScale;
1330 FDKmemcpy(psyOutChannel[ch]->sfbEnergy,(&psyData[ch]->sfbEnergy)->Long, MAX_GROUPED_SFB*sizeof(FIXP_DBL));
1331 FDKmemcpy(psyOutChannel[ch]->sfbSpreadEnergy,(&psyData[ch]->sfbSpreadEnergy)->Long, MAX_GROUPED_SFB*sizeof(FIXP_DBL));
1332 // FDKmemcpy(psyOutChannel[ch]->mdctSpectrum, psyData[ch]->mdctSpectrum, (1024)*sizeof(FIXP_DBL));