MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / transform_subband

Function transform_subband

AudioEncode/aencode.cpp:716–742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714}
715
716void transform_subband(Encoder &enc, float *pD0, float *pD1, int32_t subBandCount, int32_t sampleCount) {
717 if (sampleCount <= 0)
718 return;
719
720 const int32_t var_8 = (enc.m_someVal - 1) >> 1;
721 const int32_t edx = var_8 * subBandCount;
722 pD0 -= edx;
723
724 for (int i = 0; i < sampleCount; ++i) {
725 float *pFilter = (i & 1) ? enc.m_hi_filter : enc.m_lo_filter;
726 float *ebx = pD0 - edx;
727 float *eax = pD0 + edx;
728
729 float var_4 = 0.0f;
730 if (var_8 > 0) {
731 for (int32_t ebp = var_8; ebp != 0; --ebp) {
732 var_4 += (*eax + *ebx) * *pFilter++;
733 ebx += subBandCount;
734 eax -= subBandCount;
735 }
736 }
737
738 *pD1 = (*ebx * *pFilter) + var_4;
739 pD1 += subBandCount;
740 pD0 += subBandCount;
741 }
742}
743
744void transform_all(Encoder &enc) {
745 if (enc.m_levels <= 0)

Callers 1

transform_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected