Lines Matching refs:hEnc
292 const HANDLE_MP4SPACE_ENCODER hEnc, SPATIALSPECIFICCONFIG *const hSsc);
295 const HANDLE_MP4SPACE_ENCODER hEnc,
307 HANDLE_MP4SPACE_ENCODER hEnc, const MP4SPACEENC_BANDS_CONFIG nParamBands);
379 HANDLE_MP4SPACE_ENCODER hEnc = NULL; in mp4SpaceEnc_create() local
389 FDK_ALLOCATE_MEMORY_1D(hEnc, 1, struct MP4SPACE_ENCODER); in mp4SpaceEnc_create()
392 if (NULL != hEnc) { in mp4SpaceEnc_create()
393 FDKmemclear(hEnc, sizeof(struct MP4SPACE_ENCODER)); in mp4SpaceEnc_create()
413 (error = fdk_sacenc_staticGain_OpenConfig(&hEnc->hStaticGainConfig))) { in mp4SpaceEnc_create()
419 &hEnc->hEnhancedTimeDmx, setup.maxFrameLength))) { in mp4SpaceEnc_create()
423 FDK_ALLOCATE_MEMORY_1D(hEnc->pParameterBand2HybridBandOffset, in mp4SpaceEnc_create()
427 if (SACENC_OK != (error = fdk_sacenc_spaceTree_Open(&hEnc->hSpaceTree))) { in mp4SpaceEnc_create()
431 FDK_ALLOCATE_MEMORY_1D(hEnc->pEncoderInputChScale, setup.maxChIn, INT); in mp4SpaceEnc_create()
432 FDK_ALLOCATE_MEMORY_1D(hEnc->staticTimeDomainDmxInScale, setup.maxChIn, in mp4SpaceEnc_create()
435 FDK_ALLOCATE_MEMORY_1D(hEnc->phQmfFiltIn__FDK, setup.maxChIn, in mp4SpaceEnc_create()
440 FDK_ALLOCATE_MEMORY_1D_INT(hEnc->phQmfFiltIn__FDK[ch], 1, in mp4SpaceEnc_create()
442 FDK_ALLOCATE_MEMORY_1D_INT(hEnc->phQmfFiltIn__FDK[ch]->FilterStates, in mp4SpaceEnc_create()
452 (error = fdk_sacenc_createDCFilter(&hEnc->phDCFilterSigIn[ch]))) { in mp4SpaceEnc_create()
460 &hEnc->phOnset[ch], setup.maxFrameTimeSlots))) { in mp4SpaceEnc_create()
465 FDK_ALLOCATE_MEMORY_2D(hEnc->ppTrCurrPos, setup.maxChIn, MAX_NUM_TRANS, in mp4SpaceEnc_create()
470 (error = fdk_sacenc_frameWindow_Create(&hEnc->hFrameWindow))) { in mp4SpaceEnc_create()
475 if (SACENC_OK != (error = fdk_sacenc_staticGain_Open(&hEnc->hStaticGain))) { in mp4SpaceEnc_create()
481 &hEnc->hBitstreamFormatter))) { in mp4SpaceEnc_create()
485 FDK_ALLOCATE_MEMORY_1D(hEnc->sscBuf.pSsc, MAX_SSC_BYTES, UCHAR); in mp4SpaceEnc_create()
488 FDK_ALLOCATE_MEMORY_2D(hEnc->ppTimeSigIn__FDK, setup.maxChIn, in mp4SpaceEnc_create()
492 FDK_ALLOCATE_MEMORY_2D(hEnc->ppTimeSigDelayIn__FDK, setup.maxChIn, in mp4SpaceEnc_create()
499 hEnc->pOutputDelayBuffer__FDK, in mp4SpaceEnc_create()
506 FDK_ALLOCATE_MEMORY_2D(hEnc->ppTimeSigOut__FDK, setup.maxChTotOut, in mp4SpaceEnc_create()
514 hEnc->pppHybridIn__FDK, setup.maxChIn, in mp4SpaceEnc_create()
517 FDK_ALLOCATE_MEMORY_3D(hEnc->pppHybridInStatic__FDK, setup.maxChIn, in mp4SpaceEnc_create()
521 FDK_ALLOCATE_MEMORY_3D(hEnc->pppHybridIn__FDK, setup.maxChIn, in mp4SpaceEnc_create()
528 FDK_ALLOCATE_MEMORY_3D(hEnc->pppProcDataIn__FDK, MAX_SPACE_TREE_CHANNELS, in mp4SpaceEnc_create()
533 FDK_ALLOCATE_MEMORY_1D(hEnc->pFrameWindowAna__FDK[i], in mp4SpaceEnc_create()
537 if (SACENC_OK != (error = fdk_sacenc_delay_Open(&hEnc->hDelay))) { in mp4SpaceEnc_create()
543 FDK_ALLOCATE_MEMORY_2D(hEnc->ppBitstreamDelayBuffer, MAX_BITSTREAM_DELAY, in mp4SpaceEnc_create()
546 FDK_ALLOCATE_MEMORY_1D(hEnc->pnOutputBits, MAX_BITSTREAM_DELAY, INT); in mp4SpaceEnc_create()
548 hEnc->setup = setup; /* save configuration used while encoder allocation. */ in mp4SpaceEnc_create()
549 mp4SpaceEnc_InitDefault(hEnc); in mp4SpaceEnc_create()
552 *phMp4SpaceEnc = hEnc; /* return encoder handle */ in mp4SpaceEnc_create()
560 if (NULL != hEnc) { in mp4SpaceEnc_create()
561 hEnc->setup = setup; in mp4SpaceEnc_create()
562 FDK_sacenc_close(&hEnc); in mp4SpaceEnc_create()
567 static FDK_SACENC_ERROR mp4SpaceEnc_InitDefault(HANDLE_MP4SPACE_ENCODER hEnc) { in mp4SpaceEnc_InitDefault() argument
572 hEnc->hStaticGainConfig))) { in mp4SpaceEnc_InitDefault()
581 HANDLE_MP4SPACE_ENCODER hEnc, const HANDLE_MP4SPACEENC_SETUP hSetup) { in FDK_sacenc_configure() argument
584 hEnc->nSampleRate = hSetup->sampleRate; in FDK_sacenc_configure()
585 hEnc->encMode = hSetup->encMode; in FDK_sacenc_configure()
586 hEnc->nQmfBands = mp4SpaceEnc_GetNumQmfBands(hEnc->nSampleRate); in FDK_sacenc_configure()
592 hEnc->useTimeDomDownmix = hSetup->bTimeDomainDmx; in FDK_sacenc_configure()
595 hEnc->timeAlignment = hSetup->timeAlignment; in FDK_sacenc_configure()
596 hEnc->quantMode = hSetup->quantMode; in FDK_sacenc_configure()
598 hEnc->useCoarseQuantCld = hSetup->bUseCoarseQuant; in FDK_sacenc_configure()
599 hEnc->useCoarseQuantCpc = hSetup->bUseCoarseQuant; in FDK_sacenc_configure()
600 hEnc->useFrameKeep = (hSetup->bLdMode == 2); in FDK_sacenc_configure()
601 hEnc->useCoarseQuantIcc = 0; /* not available */ in FDK_sacenc_configure()
602 hEnc->useCoarseQuantArbDmx = 0; /* not available for user right now */ in FDK_sacenc_configure()
603 hEnc->independencyFactor = hSetup->independencyFactor; in FDK_sacenc_configure()
604 hEnc->independencyCount = 0; in FDK_sacenc_configure()
605 hEnc->independencyFlag = 1; in FDK_sacenc_configure()
608 hEnc->nHybridBands = hEnc->nQmfBands; in FDK_sacenc_configure()
609 hEnc->nFrameTimeSlots = hSetup->frameTimeSlots; in FDK_sacenc_configure()
610 mp4SpaceEnc_InitNumParamBands(hEnc, hSetup->nParamBands); in FDK_sacenc_configure()
615 FDK_SACENC_ERROR FDK_sacenc_init(HANDLE_MP4SPACE_ENCODER hEnc, in FDK_sacenc_init() argument
620 if (NULL == hEnc) { in FDK_sacenc_init()
628 if (SACENC_OK != (error = FDK_sacenc_configure(hEnc, &hEnc->user))) { in FDK_sacenc_init()
632 hEnc->bEncMode_212_only = hEnc->setup.bEncMode_212; in FDK_sacenc_init()
635 if (hEnc->nFrameTimeSlots < 1) { in FDK_sacenc_init()
639 hEnc->nFrameLength = hEnc->nQmfBands * hEnc->nFrameTimeSlots; in FDK_sacenc_init()
641 if (hEnc->useFrameKeep == 1) { in FDK_sacenc_init()
642 hEnc->nAnalysisLengthTimeSlots = 3 * hEnc->nFrameTimeSlots; in FDK_sacenc_init()
643 hEnc->nUpdateHybridPositionTimeSlots = hEnc->nFrameTimeSlots; in FDK_sacenc_init()
645 hEnc->nAnalysisLengthTimeSlots = 2 * hEnc->nFrameTimeSlots; in FDK_sacenc_init()
646 hEnc->nUpdateHybridPositionTimeSlots = 0; in FDK_sacenc_init()
650 hEnc->nAnalysisLookaheadTimeSlots = in FDK_sacenc_init()
651 hEnc->nAnalysisLengthTimeSlots - 3 * hEnc->nFrameTimeSlots / 2; in FDK_sacenc_init()
656 (BOX_SUBBAND_CONFIG)hEnc->nParamBands, hEnc->nHybridBands, in FDK_sacenc_init()
657 hEnc->pParameterBand2HybridBandOffset); in FDK_sacenc_init()
661 (error = mp4SpaceEnc_FillSpaceTreeSetup(hEnc, &hEnc->spaceTreeSetup))) { in FDK_sacenc_init()
668 hEnc->hSpaceTree, &hEnc->spaceTreeSetup, in FDK_sacenc_init()
669 hEnc->pParameterBand2HybridBandOffset, hEnc->useFrameKeep))) { in FDK_sacenc_init()
679 hEnc->hSpaceTree, &spaceTreeDescription))) { in FDK_sacenc_init()
683 hEnc->nInputChannels = in FDK_sacenc_init()
687 hEnc->nOutputChannels = in FDK_sacenc_init()
696 for (ch = 0; ch < hEnc->nInputChannels; ch++) { in FDK_sacenc_init()
698 hEnc->pEncoderInputChScale[ch] = 7; in FDK_sacenc_init()
702 hEnc->pEncoderInputChScale[ch] += 1; in FDK_sacenc_init()
705 { hEnc->pEncoderInputChScale[ch] += DC_FILTER_SF; } in FDK_sacenc_init()
709 for (ch = 0; ch < hEnc->nInputChannels; ch++) { in FDK_sacenc_init()
710 hEnc->phQmfFiltIn__FDK[ch]->flags = in FDK_sacenc_init()
711 updateQmfFlags(hEnc->phQmfFiltIn__FDK[ch]->flags, !initStatesFlag); in FDK_sacenc_init()
714 hEnc->phQmfFiltIn__FDK[ch], in FDK_sacenc_init()
715 (FIXP_QAS *)hEnc->phQmfFiltIn__FDK[ch]->FilterStates, 1, in FDK_sacenc_init()
716 hEnc->nQmfBands, hEnc->nQmfBands, hEnc->nQmfBands, in FDK_sacenc_init()
717 hEnc->phQmfFiltIn__FDK[ch]->flags)) { in FDK_sacenc_init()
725 for (ch = 0; ch < hEnc->nInputChannels; ch++) { in FDK_sacenc_init()
727 hEnc->phDCFilterSigIn[ch], hEnc->nSampleRate))) { in FDK_sacenc_init()
737 onsetDetectConfig.maxTimeSlots = hEnc->nFrameTimeSlots; in FDK_sacenc_init()
739 freq2HybridBand(1725, hEnc->nSampleRate, hEnc->nQmfBands); in FDK_sacenc_init()
740 onsetDetectConfig.upperBoundOnsetDetection = hEnc->nHybridBands; in FDK_sacenc_init()
742 for (ch = 0; ch < hEnc->nInputChannels; ch++) { in FDK_sacenc_init()
744 hEnc->phOnset[ch], &onsetDetectConfig, 1))) { in FDK_sacenc_init()
753 framewindowConfig.nTimeSlotsMax = hEnc->nFrameTimeSlots; in FDK_sacenc_init()
754 framewindowConfig.bFrameKeep = hEnc->useFrameKeep; in FDK_sacenc_init()
757 hEnc->hFrameWindow, &framewindowConfig))) { in FDK_sacenc_init()
764 hEnc->hStaticGainConfig, hEnc->encMode))) { in FDK_sacenc_init()
770 hEnc->hStaticGain, hEnc->hStaticGainConfig, in FDK_sacenc_init()
771 &(hEnc->staticGainScale)))) { in FDK_sacenc_init()
775 for (ch = 0; ch < hEnc->nInputChannels; ch++) { in FDK_sacenc_init()
776 hEnc->pEncoderInputChScale[ch] += hEnc->staticGainScale; in FDK_sacenc_init()
780 if (hEnc->useTimeDomDownmix != 0) { in FDK_sacenc_init()
782 hEnc->hEnhancedTimeDmx, in FDK_sacenc_init()
783 fdk_sacenc_getPreGainPtrFDK(hEnc->hStaticGain), in FDK_sacenc_init()
784 hEnc->staticGainScale, in FDK_sacenc_init()
785 fdk_sacenc_getPostGainFDK(hEnc->hStaticGain), in FDK_sacenc_init()
786 hEnc->staticGainScale, hEnc->nFrameLength))) { in FDK_sacenc_init()
794 hEnc->hBitstreamFormatter))) { in FDK_sacenc_init()
799 hEnc, fdk_sacenc_getSpatialSpecificConfig( in FDK_sacenc_init()
800 hEnc->hBitstreamFormatter)))) { in FDK_sacenc_init()
806 fdk_sacenc_getSpatialSpecificConfig(hEnc->hBitstreamFormatter), in FDK_sacenc_init()
807 hEnc->sscBuf.pSsc, MAX_SSC_BYTES, &hEnc->sscBuf.nSscSizeBits))) { in FDK_sacenc_init()
814 (error = mp4SpaceEnc_InitDelayCompensation(hEnc, dmxDelay))) { in FDK_sacenc_init()
819 hEnc->nSamplesNext = in FDK_sacenc_init()
820 hEnc->nFrameLength * (hEnc->nInputChannels + nChInArbDmx); in FDK_sacenc_init()
821 hEnc->nSamplesValid = 0; in FDK_sacenc_init()
853 HANDLE_MP4SPACE_ENCODER hEnc, INT_PCM const *const pSamples, in __FeedDeinterPreScale() argument
859 if ((hEnc == NULL) || (pSamples == NULL) || (pnSamplesFed == NULL)) { in __FeedDeinterPreScale()
865 const INT nChIn = hEnc->nInputChannels; in __FeedDeinterPreScale()
868 FDKmin(nSamples, hEnc->nSamplesNext - hEnc->nSamplesValid); in __FeedDeinterPreScale()
872 (samplesToFeed > nChInWithDmx * (INT)hEnc->nFrameLength)) { in __FeedDeinterPreScale()
883 pInput2__FDK = pSamples + (hEnc->nInputDelay * nChInWithDmx); in __FeedDeinterPreScale()
886 for (i = 0; i < hEnc->nInputChannels; i++) { in __FeedDeinterPreScale()
887 hEnc->staticTimeDomainDmxInScale[i] = hEnc->staticGainScale; in __FeedDeinterPreScale()
893 FDKmemcpy(&(hEnc->ppTimeSigIn__FDK[ch][0]), in __FeedDeinterPreScale()
894 &(hEnc->ppTimeSigDelayIn__FDK[ch][0]), in __FeedDeinterPreScale()
895 hEnc->nSurroundAnalysisBufferDelay * sizeof(INT_PCM)); in __FeedDeinterPreScale()
901 &(hEnc->ppTimeSigIn__FDK[ch][hEnc->nSurroundAnalysisBufferDelay]), in __FeedDeinterPreScale()
902 1, pInput__FDK + ch, nChInWithDmx, hEnc->nInputDelay); in __FeedDeinterPreScale()
904 &(hEnc->ppTimeSigIn__FDK[ch][hEnc->nSurroundAnalysisBufferDelay + in __FeedDeinterPreScale()
905 hEnc->nInputDelay]), in __FeedDeinterPreScale()
907 nSamplesPerChannel - hEnc->nInputDelay); in __FeedDeinterPreScale()
911 &(hEnc->ppTimeSigIn__FDK[ch][hEnc->nSurroundAnalysisBufferDelay]), in __FeedDeinterPreScale()
913 hEnc->nInputDelay * sizeof(INT_PCM)); in __FeedDeinterPreScale()
915 &(hEnc->ppTimeSigIn__FDK[ch][hEnc->nSurroundAnalysisBufferDelay + in __FeedDeinterPreScale()
916 hEnc->nInputDelay]), in __FeedDeinterPreScale()
918 (nSamplesPerChannel - hEnc->nInputDelay) * sizeof(INT_PCM)); in __FeedDeinterPreScale()
922 FDKmemcpy(&(hEnc->ppTimeSigDelayIn__FDK[ch][0]), in __FeedDeinterPreScale()
923 &(hEnc->ppTimeSigIn__FDK[ch][hEnc->nFrameLength]), in __FeedDeinterPreScale()
924 hEnc->nSurroundAnalysisBufferDelay * sizeof(INT_PCM)); in __FeedDeinterPreScale()
930 if ((hEnc->useTimeDomDownmix > 0)) { in __FeedDeinterPreScale()
931 if ((hEnc->useTimeDomDownmix == 1) || (hEnc->nInputChannels != 2)) { in __FeedDeinterPreScale()
936 if (hEnc->encMode == SACENC_212) { in __FeedDeinterPreScale()
943 hEnc->hEnhancedTimeDmx, hEnc->ppTimeSigIn__FDK, pOutputSamples, in __FeedDeinterPreScale()
944 hEnc->nSurroundAnalysisBufferDelay); in __FeedDeinterPreScale()
946 if (&hEnc->ppTimeSigOut__FDK[0][0] == NULL) { in __FeedDeinterPreScale()
952 hEnc->hEnhancedTimeDmx, hEnc->ppTimeSigIn__FDK, in __FeedDeinterPreScale()
953 &hEnc->ppTimeSigOut__FDK[0][0], in __FeedDeinterPreScale()
954 hEnc->nSurroundAnalysisBufferDelay); in __FeedDeinterPreScale()
960 hEnc->nSamplesValid += samplesToFeed; in __FeedDeinterPreScale()
1487 HANDLE_MP4SPACE_ENCODER const hEnc = *phMp4SpaceEnc; in FDK_sacenc_close() local
1489 if (hEnc->pParameterBand2HybridBandOffset != NULL) { in FDK_sacenc_close()
1490 FDK_FREE_MEMORY_1D(hEnc->pParameterBand2HybridBandOffset); in FDK_sacenc_close()
1493 if (hEnc->pEncoderInputChScale != NULL) { in FDK_sacenc_close()
1494 FDK_FREE_MEMORY_1D(hEnc->pEncoderInputChScale); in FDK_sacenc_close()
1496 if (hEnc->staticTimeDomainDmxInScale != NULL) { in FDK_sacenc_close()
1497 FDK_FREE_MEMORY_1D(hEnc->staticTimeDomainDmxInScale); in FDK_sacenc_close()
1499 if (hEnc->phQmfFiltIn__FDK != NULL) { in FDK_sacenc_close()
1500 for (ch = 0; ch < hEnc->setup.maxChIn; ch++) { in FDK_sacenc_close()
1501 if (hEnc->phQmfFiltIn__FDK[ch] != NULL) { in FDK_sacenc_close()
1502 if (hEnc->phQmfFiltIn__FDK[ch]->FilterStates != NULL) { in FDK_sacenc_close()
1503 FDK_FREE_MEMORY_1D(hEnc->phQmfFiltIn__FDK[ch]->FilterStates); in FDK_sacenc_close()
1505 FDK_FREE_MEMORY_1D(hEnc->phQmfFiltIn__FDK[ch]); in FDK_sacenc_close()
1508 FDK_FREE_MEMORY_1D(hEnc->phQmfFiltIn__FDK); in FDK_sacenc_close()
1510 for (ch = 0; ch < hEnc->setup.maxChIn; ch++) { in FDK_sacenc_close()
1511 if (NULL != hEnc->phDCFilterSigIn[ch]) { in FDK_sacenc_close()
1512 fdk_sacenc_destroyDCFilter(&hEnc->phDCFilterSigIn[ch]); in FDK_sacenc_close()
1516 for (ch = 0; ch < hEnc->setup.maxChIn; ch++) { in FDK_sacenc_close()
1517 if (NULL != hEnc->phOnset[ch]) { in FDK_sacenc_close()
1518 fdk_sacenc_onsetDetect_Close(&hEnc->phOnset[ch]); in FDK_sacenc_close()
1521 if (hEnc->ppTrCurrPos) { in FDK_sacenc_close()
1522 FDK_FREE_MEMORY_2D(hEnc->ppTrCurrPos); in FDK_sacenc_close()
1524 if (hEnc->hFrameWindow) { in FDK_sacenc_close()
1525 fdk_sacenc_frameWindow_Destroy(&hEnc->hFrameWindow); in FDK_sacenc_close()
1528 if (NULL != hEnc->hSpaceTree) { in FDK_sacenc_close()
1529 fdk_sacenc_spaceTree_Close(&hEnc->hSpaceTree); in FDK_sacenc_close()
1531 if (NULL != hEnc->hEnhancedTimeDmx) { in FDK_sacenc_close()
1532 fdk_sacenc_close_enhancedTimeDomainDmx(&hEnc->hEnhancedTimeDmx); in FDK_sacenc_close()
1535 if (NULL != hEnc->hStaticGain) { in FDK_sacenc_close()
1536 fdk_sacenc_staticGain_Close(&hEnc->hStaticGain); in FDK_sacenc_close()
1538 if (NULL != hEnc->hStaticGainConfig) { in FDK_sacenc_close()
1539 fdk_sacenc_staticGain_CloseConfig(&hEnc->hStaticGainConfig); in FDK_sacenc_close()
1542 if (NULL != hEnc->hDelay) { in FDK_sacenc_close()
1543 fdk_sacenc_delay_Close(&hEnc->hDelay); in FDK_sacenc_close()
1546 if (NULL != hEnc->hBitstreamFormatter) { in FDK_sacenc_close()
1547 fdk_sacenc_destroySpatialBitstreamEncoder(&(hEnc->hBitstreamFormatter)); in FDK_sacenc_close()
1549 if (hEnc->pppHybridIn__FDK != NULL) { in FDK_sacenc_close()
1550 if (hEnc->setup.bEncMode_212 == 1) { in FDK_sacenc_close()
1551 FDK_FREE_MEMORY_3D(hEnc->pppHybridIn__FDK); in FDK_sacenc_close()
1552 FDK_FREE_MEMORY_3D(hEnc->pppHybridInStatic__FDK); in FDK_sacenc_close()
1554 FDK_FREE_MEMORY_3D(hEnc->pppHybridIn__FDK); in FDK_sacenc_close()
1557 if (hEnc->pppProcDataIn__FDK != NULL) { in FDK_sacenc_close()
1558 FDK_FREE_MEMORY_3D(hEnc->pppProcDataIn__FDK); in FDK_sacenc_close()
1560 if (hEnc->pOutputDelayBuffer__FDK != NULL) { in FDK_sacenc_close()
1561 FDK_FREE_MEMORY_1D(hEnc->pOutputDelayBuffer__FDK); in FDK_sacenc_close()
1563 if (hEnc->ppTimeSigIn__FDK != NULL) { in FDK_sacenc_close()
1564 { FDK_FREE_MEMORY_2D(hEnc->ppTimeSigIn__FDK); } in FDK_sacenc_close()
1566 if (hEnc->ppTimeSigDelayIn__FDK != NULL) { in FDK_sacenc_close()
1567 FDK_FREE_MEMORY_2D(hEnc->ppTimeSigDelayIn__FDK); in FDK_sacenc_close()
1569 if (hEnc->ppTimeSigOut__FDK != NULL) { in FDK_sacenc_close()
1570 FDK_FREE_MEMORY_2D(hEnc->ppTimeSigOut__FDK); in FDK_sacenc_close()
1573 if (hEnc->pFrameWindowAna__FDK[i] != NULL) { in FDK_sacenc_close()
1574 FDK_FREE_MEMORY_1D(hEnc->pFrameWindowAna__FDK[i]); in FDK_sacenc_close()
1577 if (hEnc->pnOutputBits != NULL) { in FDK_sacenc_close()
1578 FDK_FREE_MEMORY_1D(hEnc->pnOutputBits); in FDK_sacenc_close()
1580 if (hEnc->ppBitstreamDelayBuffer != NULL) { in FDK_sacenc_close()
1581 FDK_FREE_MEMORY_2D(hEnc->ppBitstreamDelayBuffer); in FDK_sacenc_close()
1583 if (hEnc->sscBuf.pSsc != NULL) { in FDK_sacenc_close()
1584 FDK_FREE_MEMORY_1D(hEnc->sscBuf.pSsc); in FDK_sacenc_close()
1722 const HANDLE_MP4SPACE_ENCODER hEnc, SPATIALSPECIFICCONFIG *const hSsc) { in FillSpatialSpecificConfig() argument
1725 if ((NULL == hEnc) || (NULL == hSsc)) { in FillSpatialSpecificConfig()
1733 hEnc->hSpaceTree, &spaceTreeDescription))) { in FillSpatialSpecificConfig()
1740 hSsc->numBands = hEnc->spaceTreeSetup.nParamBands; /* for bsFreqRes */ in FillSpatialSpecificConfig()
1751 switch (hEnc->encMode) { in FillSpatialSpecificConfig()
1762 hEnc->nSampleRate; /* for bsSamplingFrequencyIndex */ in FillSpatialSpecificConfig()
1763 hSsc->bsFrameLength = hEnc->nFrameTimeSlots - 1; in FillSpatialSpecificConfig()
1767 (hSsc->bsDecorrConfig = mp4SpaceEnc_GetDecorrConfig(hEnc->encMode))) { in FillSpatialSpecificConfig()
1774 (hSsc->bsQuantMode = __mapQuantMode(hEnc->quantMode))) { in FillSpatialSpecificConfig()
1780 hSsc->bsFixedGainDMX = fdk_sacenc_staticGain_GetDmxGain(hEnc->hStaticGain); in FillSpatialSpecificConfig()
1790 const HANDLE_MP4SPACE_ENCODER hEnc, in mp4SpaceEnc_FillSpaceTreeSetup() argument
1795 if (NULL == hEnc || NULL == hSpaceTreeSetup) { in mp4SpaceEnc_FillSpaceTreeSetup()
1801 if (QUANTMODE_INVALID == (tmpQuantmode = __mapQuantMode(hEnc->quantMode))) { in mp4SpaceEnc_FillSpaceTreeSetup()
1806 hSpaceTreeSetup->nParamBands = hEnc->nParamBands; in mp4SpaceEnc_FillSpaceTreeSetup()
1807 hSpaceTreeSetup->bUseCoarseQuantTtoCld = hEnc->useCoarseQuantCld; in mp4SpaceEnc_FillSpaceTreeSetup()
1808 hSpaceTreeSetup->bUseCoarseQuantTtoIcc = hEnc->useCoarseQuantIcc; in mp4SpaceEnc_FillSpaceTreeSetup()
1810 hSpaceTreeSetup->nHybridBandsMax = hEnc->nHybridBands; in mp4SpaceEnc_FillSpaceTreeSetup()
1812 switch (hEnc->encMode) { in mp4SpaceEnc_FillSpaceTreeSetup()
2027 HANDLE_MP4SPACE_ENCODER hEnc, const MP4SPACEENC_BANDS_CONFIG nParamBands) { in mp4SpaceEnc_InitNumParamBands() argument
2037 hEnc->nParamBands = SACENC_BANDS_INVALID; in mp4SpaceEnc_InitNumParamBands()
2039 hEnc->nParamBands = nParamBands; in mp4SpaceEnc_InitNumParamBands()