Lines Matching refs:drcComp

393 static void findPeakLevels(HDRC_COMP drcComp, const INT_PCM* const inSamples,  in findPeakLevels()  argument
404 for (i = 0; i < drcComp->blockLength; i++) { in findPeakLevels()
405 const INT_PCM* pSamples = &inSamples[i * drcComp->channels]; in findPeakLevels()
408 for (c = 0; c < (int)drcComp->channels; c++) { in findPeakLevels()
415 if (drcComp->fullChannels > 5) { in findPeakLevels()
416 for (i = 0; i < drcComp->blockLength; i++) { in findPeakLevels()
417 const INT_PCM* pSamples = &inSamples[i * drcComp->channels]; in findPeakLevels()
421 switch (drcComp->chanConfig) { in findPeakLevels()
424 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
427 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[6]]) >> in findPeakLevels()
433 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
436 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
441 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
444 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
449 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
452 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
462 switch (drcComp->chanConfig) { in findPeakLevels()
465 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
468 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[6]]) >> in findPeakLevels()
474 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
477 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
482 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
485 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
490 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
493 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
503 switch (drcComp->chanConfig) { in findPeakLevels()
506 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
509 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
512 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
528 if (drcComp->fullChannels > 2) { in findPeakLevels()
530 for (i = 0; i < drcComp->blockLength; i++) { in findPeakLevels()
531 const INT_PCM* pSamples = &inSamples[i * drcComp->channels]; in findPeakLevels()
535 if (drcComp->channelIdx[LS] >= 0) in findPeakLevels()
537 (FIXP_PCM)pSamples[drcComp->channelIdx[LS]]) >> in findPeakLevels()
539 if (drcComp->channelIdx[LS2] >= 0) in findPeakLevels()
541 (FIXP_PCM)pSamples[drcComp->channelIdx[LS2]]) >> in findPeakLevels()
543 if (drcComp->channelIdx[RS] >= 0) in findPeakLevels()
545 (FIXP_PCM)pSamples[drcComp->channelIdx[RS]]) >> in findPeakLevels()
547 if (drcComp->channelIdx[RS2] >= 0) in findPeakLevels()
549 (FIXP_PCM)pSamples[drcComp->channelIdx[RS2]]) >> in findPeakLevels()
551 if ((drcComp->channelIdx[LS] >= 0) && (drcComp->channelIdx[LS2] >= 0)) in findPeakLevels()
553 if (drcComp->channelIdx[S] >= 0) in findPeakLevels()
555 (FIXP_PCM)pSamples[drcComp->channelIdx[S]]) >> in findPeakLevels()
557 if (drcComp->channelIdx[C] >= 0) in findPeakLevels()
559 (FIXP_PCM)pSamples[drcComp->channelIdx[C]]) >> in findPeakLevels()
561 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[L]]) >> in findPeakLevels()
568 if (drcComp->fullChannels > 5) { in findPeakLevels()
577 if (drcComp->channelIdx[LS] >= 0) in findPeakLevels()
579 (FIXP_PCM)pSamples[drcComp->channelIdx[LS]]) >> in findPeakLevels()
581 if (drcComp->channelIdx[LS2] >= 0) in findPeakLevels()
583 (FIXP_PCM)pSamples[drcComp->channelIdx[LS2]]) >> in findPeakLevels()
585 if (drcComp->channelIdx[RS] >= 0) in findPeakLevels()
587 (FIXP_PCM)pSamples[drcComp->channelIdx[RS]]) >> in findPeakLevels()
589 if (drcComp->channelIdx[RS2] >= 0) in findPeakLevels()
591 (FIXP_PCM)pSamples[drcComp->channelIdx[RS2]]) >> in findPeakLevels()
593 if ((drcComp->channelIdx[RS] >= 0) && (drcComp->channelIdx[RS2] >= 0)) in findPeakLevels()
595 if (drcComp->channelIdx[S] >= 0) in findPeakLevels()
597 (FIXP_PCM)pSamples[drcComp->channelIdx[S]]) >> in findPeakLevels()
599 if (drcComp->channelIdx[C] >= 0) in findPeakLevels()
601 (FIXP_PCM)pSamples[drcComp->channelIdx[C]]) >> in findPeakLevels()
603 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[R]]) >> in findPeakLevels()
610 if (drcComp->fullChannels > 5) { in findPeakLevels()
619 for (i = 0; i < drcComp->blockLength; i++) { in findPeakLevels()
620 const INT_PCM* pSamples = &inSamples[i * drcComp->channels]; in findPeakLevels()
624 switch (drcComp->chanConfig) { in findPeakLevels()
627 (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
630 (FIXP_PCM)pSamples[drcComp->channelIdx[6]]) >> in findPeakLevels()
632 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
634 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
637 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
643 (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
646 (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
648 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
650 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
653 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
658 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
661 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
664 (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
666 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
668 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
671 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
676 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
679 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
681 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
683 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
686 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
690 if (drcComp->channelIdx[LS] >= 0) in findPeakLevels()
692 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[LS]]) >> in findPeakLevels()
694 if (drcComp->channelIdx[LS2] >= 0) in findPeakLevels()
696 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[LS2]]) >> in findPeakLevels()
698 if ((drcComp->channelIdx[LS] >= 0) && (drcComp->channelIdx[LS2] >= 0)) in findPeakLevels()
700 if (drcComp->channelIdx[S] >= 0) in findPeakLevels()
704 (FIXP_PCM)pSamples[drcComp->channelIdx[S]])) >> in findPeakLevels()
706 if (drcComp->channelIdx[C] >= 0) in findPeakLevels()
708 fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[C]]) >> in findPeakLevels()
710 if (drcComp->channelIdx[3] >= 0) in findPeakLevels()
712 (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
714 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[L]]) >> in findPeakLevels()
723 if (drcComp->fullChannels > 5) { in findPeakLevels()
732 switch (drcComp->chanConfig) { in findPeakLevels()
735 (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
738 (FIXP_PCM)pSamples[drcComp->channelIdx[6]]) >> in findPeakLevels()
740 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
742 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
745 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
751 (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
754 (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
756 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
758 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
761 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
766 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
769 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
772 (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
774 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
776 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
779 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
784 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
787 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
789 tmp += fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
791 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
794 fMultDiv2(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
798 if (drcComp->channelIdx[RS] >= 0) in findPeakLevels()
800 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[RS]]) >> in findPeakLevels()
802 if (drcComp->channelIdx[RS2] >= 0) in findPeakLevels()
804 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[RS2]]) >> in findPeakLevels()
806 if ((drcComp->channelIdx[RS] >= 0) && (drcComp->channelIdx[RS2] >= 0)) in findPeakLevels()
808 if (drcComp->channelIdx[S] >= 0) in findPeakLevels()
812 (FIXP_PCM)pSamples[drcComp->channelIdx[S]])) >> in findPeakLevels()
814 if (drcComp->channelIdx[C] >= 0) in findPeakLevels()
816 fMultDiv2(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[C]]) >> in findPeakLevels()
818 if (drcComp->channelIdx[3] >= 0) in findPeakLevels()
820 (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
822 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[R]]) >> in findPeakLevels()
830 if (drcComp->fullChannels > 5) { in findPeakLevels()
842 if (drcComp->fullChannels > 1) { in findPeakLevels()
843 for (i = 0; i < drcComp->blockLength; i++) { in findPeakLevels()
844 const INT_PCM* pSamples = &inSamples[i * drcComp->channels]; in findPeakLevels()
847 switch (drcComp->chanConfig) { in findPeakLevels()
850 (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
853 (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
856 (FIXP_PCM)pSamples[drcComp->channelIdx[6]]) >> in findPeakLevels()
858 tmp += fMult(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
860 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
862 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
864 tmp += fMult(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
870 (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
873 (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
876 (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
879 (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
881 tmp += fMult(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
883 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
885 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
887 tmp += fMult(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
892 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
894 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
897 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
900 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
903 (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
906 (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
908 tmp += fMult(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
910 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
912 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
914 tmp += fMult(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
919 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[0]]) >> in findPeakLevels()
922 fMultDiv2(ext_leva, (FIXP_PCM)pSamples[drcComp->channelIdx[1]]) >> in findPeakLevels()
925 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[7]]) >> in findPeakLevels()
928 fMultDiv2(ext_levb, (FIXP_PCM)pSamples[drcComp->channelIdx[8]]) >> in findPeakLevels()
930 tmp += fMult(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[2]]) >> in findPeakLevels()
932 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[4]]) >> in findPeakLevels()
934 tmp += fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[5]]) >> in findPeakLevels()
936 tmp += fMult(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
940 if (drcComp->channelIdx[LS] >= 0) in findPeakLevels()
942 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[LS]]) >> in findPeakLevels()
944 if (drcComp->channelIdx[LS2] >= 0) in findPeakLevels()
946 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[LS2]]) >> in findPeakLevels()
948 if (drcComp->channelIdx[RS] >= 0) in findPeakLevels()
950 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[RS]]) >> in findPeakLevels()
952 if (drcComp->channelIdx[RS2] >= 0) in findPeakLevels()
954 fMultDiv2(slev, (FIXP_PCM)pSamples[drcComp->channelIdx[RS2]]) >> in findPeakLevels()
956 if ((drcComp->channelIdx[LS] >= 0) && (drcComp->channelIdx[LS2] >= 0)) in findPeakLevels()
959 if (drcComp->channelIdx[S] >= 0) in findPeakLevels()
963 (FIXP_PCM)pSamples[drcComp->channelIdx[S]])) >> in findPeakLevels()
965 if (drcComp->channelIdx[C] >= 0) in findPeakLevels()
966 tmp += fMult(clev, (FIXP_PCM)pSamples[drcComp->channelIdx[C]]) >> in findPeakLevels()
968 if (drcComp->channelIdx[3] >= 0) in findPeakLevels()
969 tmp += fMult(lfe_lev, (FIXP_PCM)pSamples[drcComp->channelIdx[3]]) >> in findPeakLevels()
971 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[L]]) >> in findPeakLevels()
973 tmp += (FX_PCM2FX_DBL((FIXP_PCM)pSamples[drcComp->channelIdx[R]]) >> in findPeakLevels()
981 if (drcComp->fullChannels > 5) { in findPeakLevels()
1029 INT FDK_DRC_Generator_Initialize(HDRC_COMP drcComp, in FDK_DRC_Generator_Initialize() argument
1039 drcComp->limDecay = in FDK_DRC_Generator_Initialize()
1043 drcComp->blockLength = blockLength; in FDK_DRC_Generator_Initialize()
1044 drcComp->sampleRate = sampleRate; in FDK_DRC_Generator_Initialize()
1045 drcComp->chanConfig = channelMode; in FDK_DRC_Generator_Initialize()
1046 drcComp->useWeighting = useWeighting; in FDK_DRC_Generator_Initialize()
1048 if (FDK_DRC_Generator_setDrcProfile(drcComp, profileLine, profileRF) != in FDK_DRC_Generator_Initialize()
1059 for (i = 0; i < 9; i++) drcComp->channelIdx[i] = -1; in FDK_DRC_Generator_Initialize()
1063 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1066 drcComp->channelIdx[L] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1067 drcComp->channelIdx[R] = channelMapping.elInfo[0].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1070 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1071 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1072 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1075 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1076 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1077 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1078 drcComp->channelIdx[S] = channelMapping.elInfo[2].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1081 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1082 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1083 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1084 drcComp->channelIdx[LS] = channelMapping.elInfo[2].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1085 drcComp->channelIdx[RS] = channelMapping.elInfo[2].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1088 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1089 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1090 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1091 drcComp->channelIdx[LFE] = channelMapping.elInfo[3].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1092 drcComp->channelIdx[LS] = channelMapping.elInfo[2].ChannelIndex[0]; in FDK_DRC_Generator_Initialize()
1093 drcComp->channelIdx[RS] = channelMapping.elInfo[2].ChannelIndex[1]; in FDK_DRC_Generator_Initialize()
1097 drcComp->channelIdx[L] = channelMapping.elInfo[2].ChannelIndex[0]; /* l */ in FDK_DRC_Generator_Initialize()
1098 drcComp->channelIdx[R] = channelMapping.elInfo[2].ChannelIndex[1]; /* r */ in FDK_DRC_Generator_Initialize()
1099 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; /* c */ in FDK_DRC_Generator_Initialize()
1100 drcComp->channelIdx[LFE] = in FDK_DRC_Generator_Initialize()
1102 drcComp->channelIdx[LS] = in FDK_DRC_Generator_Initialize()
1104 drcComp->channelIdx[RS] = in FDK_DRC_Generator_Initialize()
1106 drcComp->channelIdx[LS2] = in FDK_DRC_Generator_Initialize()
1108 drcComp->channelIdx[RS2] = in FDK_DRC_Generator_Initialize()
1113 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; /* l */ in FDK_DRC_Generator_Initialize()
1114 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; /* r */ in FDK_DRC_Generator_Initialize()
1115 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; /* c */ in FDK_DRC_Generator_Initialize()
1116 drcComp->channelIdx[LFE] = in FDK_DRC_Generator_Initialize()
1118 drcComp->channelIdx[LS] = in FDK_DRC_Generator_Initialize()
1120 drcComp->channelIdx[RS] = in FDK_DRC_Generator_Initialize()
1122 drcComp->channelIdx[LS2] = in FDK_DRC_Generator_Initialize()
1124 drcComp->channelIdx[RS2] = in FDK_DRC_Generator_Initialize()
1128 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; /* l */ in FDK_DRC_Generator_Initialize()
1129 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; /* r */ in FDK_DRC_Generator_Initialize()
1130 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; /* c */ in FDK_DRC_Generator_Initialize()
1131 drcComp->channelIdx[LFE] = in FDK_DRC_Generator_Initialize()
1133 drcComp->channelIdx[LS] = in FDK_DRC_Generator_Initialize()
1135 drcComp->channelIdx[RS] = in FDK_DRC_Generator_Initialize()
1137 drcComp->channelIdx[S] = channelMapping.elInfo[3].ChannelIndex[0]; /* s */ in FDK_DRC_Generator_Initialize()
1140 drcComp->channelIdx[L] = channelMapping.elInfo[1].ChannelIndex[0]; /* l */ in FDK_DRC_Generator_Initialize()
1141 drcComp->channelIdx[R] = channelMapping.elInfo[1].ChannelIndex[1]; /* r */ in FDK_DRC_Generator_Initialize()
1142 drcComp->channelIdx[C] = channelMapping.elInfo[0].ChannelIndex[0]; /* c */ in FDK_DRC_Generator_Initialize()
1143 drcComp->channelIdx[LFE] = in FDK_DRC_Generator_Initialize()
1145 drcComp->channelIdx[LS] = in FDK_DRC_Generator_Initialize()
1147 drcComp->channelIdx[RS] = in FDK_DRC_Generator_Initialize()
1149 drcComp->channelIdx[LS2] = in FDK_DRC_Generator_Initialize()
1151 drcComp->channelIdx[RS2] = in FDK_DRC_Generator_Initialize()
1158 drcComp->fullChannels = channelMapping.nChannelsEff; in FDK_DRC_Generator_Initialize()
1159 drcComp->channels = channelMapping.nChannels; in FDK_DRC_Generator_Initialize()
1162 drcComp->smoothLevel[0] = drcComp->smoothLevel[1] = in FDK_DRC_Generator_Initialize()
1165 FDKmemclear(drcComp->smoothGain, sizeof(drcComp->smoothGain)); in FDK_DRC_Generator_Initialize()
1166 FDKmemclear(drcComp->holdCnt, sizeof(drcComp->holdCnt)); in FDK_DRC_Generator_Initialize()
1167 FDKmemclear(drcComp->limGain, sizeof(drcComp->limGain)); in FDK_DRC_Generator_Initialize()
1168 FDKmemclear(drcComp->prevPeak, sizeof(drcComp->prevPeak)); in FDK_DRC_Generator_Initialize()
1169 FDKmemclear(drcComp->filter, sizeof(drcComp->filter)); in FDK_DRC_Generator_Initialize()
1174 INT FDK_DRC_Generator_setDrcProfile(HDRC_COMP drcComp, in FDK_DRC_Generator_setDrcProfile() argument
1179 drcComp->profile[0] = profileLine; in FDK_DRC_Generator_setDrcProfile()
1180 drcComp->profile[1] = profileRF; in FDK_DRC_Generator_setDrcProfile()
1184 switch (drcComp->profile[i]) { in FDK_DRC_Generator_setDrcProfile()
1211 drcComp->maxBoostThr[i] = tabMaxBoostThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1212 drcComp->boostThr[i] = tabBoostThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1213 drcComp->earlyCutThr[i] = tabEarlyCutThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1214 drcComp->cutThr[i] = tabCutThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1215 drcComp->maxCutThr[i] = tabMaxCutThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1217 drcComp->boostFac[i] = tabBoostRatio[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1218 drcComp->earlyCutFac[i] = tabEarlyCutRatio[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1219 drcComp->cutFac[i] = tabCutRatio[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1221 drcComp->maxBoost[i] = tabMaxBoost[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1222 drcComp->maxCut[i] = tabMaxCut[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1223 drcComp->maxEarlyCut[i] = in FDK_DRC_Generator_setDrcProfile()
1224 -fMult((drcComp->cutThr[i] - drcComp->earlyCutThr[i]), in FDK_DRC_Generator_setDrcProfile()
1225 drcComp->earlyCutFac[i]); /* no scaling after mult needed, in FDK_DRC_Generator_setDrcProfile()
1228 drcComp->fastAttack[i] = tc2Coeff( in FDK_DRC_Generator_setDrcProfile()
1229 tabFastAttack[profileIdx], drcComp->sampleRate, drcComp->blockLength); in FDK_DRC_Generator_setDrcProfile()
1230 drcComp->fastDecay[i] = tc2Coeff( in FDK_DRC_Generator_setDrcProfile()
1231 tabFastDecay[profileIdx], drcComp->sampleRate, drcComp->blockLength); in FDK_DRC_Generator_setDrcProfile()
1232 drcComp->slowAttack[i] = tc2Coeff( in FDK_DRC_Generator_setDrcProfile()
1233 tabSlowAttack[profileIdx], drcComp->sampleRate, drcComp->blockLength); in FDK_DRC_Generator_setDrcProfile()
1234 drcComp->slowDecay[i] = tc2Coeff( in FDK_DRC_Generator_setDrcProfile()
1235 tabSlowDecay[profileIdx], drcComp->sampleRate, drcComp->blockLength); in FDK_DRC_Generator_setDrcProfile()
1236 drcComp->holdOff[i] = tabHoldOff[profileIdx] * 256 / drcComp->blockLength; in FDK_DRC_Generator_setDrcProfile()
1238 drcComp->attackThr[i] = tabAttackThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1239 drcComp->decayThr[i] = tabDecayThr[profileIdx]; in FDK_DRC_Generator_setDrcProfile()
1242 drcComp->smoothGain[i] = FL2FXCONST_DBL(0.f); in FDK_DRC_Generator_setDrcProfile()
1247 INT FDK_DRC_Generator_Calc(HDRC_COMP drcComp, const INT_PCM* const inSamples, in FDK_DRC_Generator_Calc() argument
1261 if ((drcComp->profile[0] != DRC_NONE) || (drcComp->profile[1] != DRC_NONE)) { in FDK_DRC_Generator_Calc()
1268 const int granuleLength = fixMin(16, drcComp->blockLength); in FDK_DRC_Generator_Calc()
1270 if (drcComp->useWeighting) { in FDK_DRC_Generator_Calc()
1278 for (c = 0; c < (int)drcComp->channels; c++) { in FDK_DRC_Generator_Calc()
1281 if (c == drcComp->channelIdx[LFE]) { in FDK_DRC_Generator_Calc()
1286 x1 = drcComp->filter[c].x1; in FDK_DRC_Generator_Calc()
1287 x2 = drcComp->filter[c].x2; in FDK_DRC_Generator_Calc()
1288 y1 = drcComp->filter[c].y1; in FDK_DRC_Generator_Calc()
1289 y2 = drcComp->filter[c].y2; in FDK_DRC_Generator_Calc()
1298 i < fixMin(offset + granuleLength, drcComp->blockLength); i++) { in FDK_DRC_Generator_Calc()
1317 } while (i < drcComp->blockLength); in FDK_DRC_Generator_Calc()
1320 drcComp->filter[c].x1 = x1; in FDK_DRC_Generator_Calc()
1321 drcComp->filter[c].x2 = x2; in FDK_DRC_Generator_Calc()
1322 drcComp->filter[c].y1 = y1; in FDK_DRC_Generator_Calc()
1323 drcComp->filter[c].y2 = y2; in FDK_DRC_Generator_Calc()
1329 for (c = 0; c < (int)drcComp->channels; c++) { in FDK_DRC_Generator_Calc()
1332 if ((int)c == drcComp->channelIdx[LFE]) { in FDK_DRC_Generator_Calc()
1343 i < fixMin(offset + granuleLength, drcComp->blockLength); i++) { in FDK_DRC_Generator_Calc()
1351 } while (i < drcComp->blockLength); in FDK_DRC_Generator_Calc()
1364 CalcLdData((FIXP_DBL)(drcComp->blockLength << (DFRACT_BITS - 1 - 12))); in FDK_DRC_Generator_Calc()
1396 if (drcComp->profile[i] == DRC_NONE) { in FDK_DRC_Generator_Calc()
1398 drcComp->smoothGain[i] = FL2FXCONST_DBL(0.f); in FDK_DRC_Generator_Calc()
1403 if (level <= drcComp->maxBoostThr[i]) { in FDK_DRC_Generator_Calc()
1405 gain = drcComp->maxBoost[i]; in FDK_DRC_Generator_Calc()
1406 } else if (level < drcComp->boostThr[i]) { in FDK_DRC_Generator_Calc()
1408 gain = fMult((level - drcComp->boostThr[i]), drcComp->boostFac[i]); in FDK_DRC_Generator_Calc()
1409 } else if (level <= drcComp->earlyCutThr[i]) { in FDK_DRC_Generator_Calc()
1412 } else if (level <= drcComp->cutThr[i]) { in FDK_DRC_Generator_Calc()
1415 fMult((level - drcComp->earlyCutThr[i]), drcComp->earlyCutFac[i]); in FDK_DRC_Generator_Calc()
1416 } else if (level < drcComp->maxCutThr[i]) { in FDK_DRC_Generator_Calc()
1418 gain = fMult((level - drcComp->cutThr[i]), drcComp->cutFac[i]) - in FDK_DRC_Generator_Calc()
1419 drcComp->maxEarlyCut[i]; in FDK_DRC_Generator_Calc()
1422 gain = -drcComp->maxCut[i]; in FDK_DRC_Generator_Calc()
1426 lvl2smthlvl = level - drcComp->smoothLevel[i]; in FDK_DRC_Generator_Calc()
1427 if (gain < drcComp->smoothGain[i]) { in FDK_DRC_Generator_Calc()
1429 if (lvl2smthlvl > drcComp->attackThr[i]) { in FDK_DRC_Generator_Calc()
1431 alpha = drcComp->fastAttack[i]; in FDK_DRC_Generator_Calc()
1434 alpha = drcComp->slowAttack[i]; in FDK_DRC_Generator_Calc()
1438 if (lvl2smthlvl < -drcComp->decayThr[i]) { in FDK_DRC_Generator_Calc()
1440 alpha = drcComp->fastDecay[i]; in FDK_DRC_Generator_Calc()
1443 alpha = drcComp->slowDecay[i]; in FDK_DRC_Generator_Calc()
1448 if ((gain < drcComp->smoothGain[i]) || in FDK_DRC_Generator_Calc()
1449 (drcComp->holdCnt[i] == in FDK_DRC_Generator_Calc()
1456 accu = fMult(((FIXP_DBL)MAXVAL_DBL - alpha), drcComp->smoothLevel[i]); in FDK_DRC_Generator_Calc()
1458 drcComp->smoothLevel[i] = accu; in FDK_DRC_Generator_Calc()
1462 accu = fMult(((FIXP_DBL)MAXVAL_DBL - alpha), drcComp->smoothGain[i]); in FDK_DRC_Generator_Calc()
1464 drcComp->smoothGain[i] = accu; in FDK_DRC_Generator_Calc()
1468 if (drcComp->holdCnt[i]) { in FDK_DRC_Generator_Calc()
1469 drcComp->holdCnt[i]--; in FDK_DRC_Generator_Calc()
1471 if (gain < drcComp->smoothGain[i]) { in FDK_DRC_Generator_Calc()
1472 drcComp->holdCnt[i] = drcComp->holdOff[i]; in FDK_DRC_Generator_Calc()
1478 drcComp->smoothGain[0] = FL2FXCONST_DBL(0.f); in FDK_DRC_Generator_Calc()
1479 drcComp->smoothGain[1] = FL2FXCONST_DBL(0.f); in FDK_DRC_Generator_Calc()
1486 findPeakLevels(drcComp, inSamples, clev, slev, ext_leva, ext_levb, lfe_lev, in FDK_DRC_Generator_Calc()
1492 FIXP_DBL tmp = drcComp->prevPeak[i]; in FDK_DRC_Generator_Calc()
1493 drcComp->prevPeak[i] = peak[i]; in FDK_DRC_Generator_Calc()
1528 peak[i] += drcComp->smoothGain[i]; in FDK_DRC_Generator_Calc()
1545 drcComp->limGain[0] += drcComp->limDecay; /* linear limiter release */ in FDK_DRC_Generator_Calc()
1546 drcComp->limGain[0] = fixMin(drcComp->limGain[0], -peak[0]); in FDK_DRC_Generator_Calc()
1548 drcComp->limGain[1] += 2 * drcComp->limDecay; /* linear limiter release */ in FDK_DRC_Generator_Calc()
1549 drcComp->limGain[1] = fixMin(drcComp->limGain[1], -peak[1]); in FDK_DRC_Generator_Calc()
1557 tmp = drcComp->smoothGain[0]; in FDK_DRC_Generator_Calc()
1558 if (drcComp->limGain[0] < FL2FXCONST_DBL(0.f)) { in FDK_DRC_Generator_Calc()
1559 tmp += drcComp->limGain[0]; in FDK_DRC_Generator_Calc()
1563 tmp = drcComp->smoothGain[1]; in FDK_DRC_Generator_Calc()
1564 if (drcComp->limGain[1] < FL2FXCONST_DBL(0.f)) { in FDK_DRC_Generator_Calc()
1565 tmp += drcComp->limGain[1]; in FDK_DRC_Generator_Calc()
1573 DRC_PROFILE FDK_DRC_Generator_getDrcProfile(const HDRC_COMP drcComp) { in FDK_DRC_Generator_getDrcProfile() argument
1574 return drcComp->profile[0]; in FDK_DRC_Generator_getDrcProfile()
1577 DRC_PROFILE FDK_DRC_Generator_getCompProfile(const HDRC_COMP drcComp) { in FDK_DRC_Generator_getCompProfile() argument
1578 return drcComp->profile[1]; in FDK_DRC_Generator_getCompProfile()