public void process(FilterBank filterBank) throws AACException { final Profile profile = config.getProfile(); final SampleFrequency sf = config.getSampleFrequency(); // final ChannelConfiguration channels = config.getChannelConfiguration(); int chs = config.getChannelConfiguration().getChannelCount(); if (chs == 1 && psPresent) chs++; final int mult = sbrPresent ? 2 : 1; // only reallocate if needed if (data == null || chs != data.length || (mult * config.getFrameLength()) != data[0].length) data = new float[chs][mult * config.getFrameLength()]; int channel = 0; Element e; SCE_LFE scelfe; CPE cpe; for (int i = 0; i < elements.length && channel < chs; i++) { e = elements[i]; if (e == null) continue; if (e instanceof SCE_LFE) { scelfe = (SCE_LFE) e; channel += processSingle(scelfe, filterBank, channel, profile, sf); } else if (e instanceof CPE) { cpe = (CPE) e; processPair(cpe, filterBank, channel, profile, sf); channel += 2; } else if (e instanceof CCE) { // applies invquant and save the result in the CCE ((CCE) e).process(); channel++; } } }
private void processDependentCoupling( boolean channelPair, int elementID, int couplingPoint, float[] data1, float[] data2) { int index, c, chSelect; CCE cce; for (int i = 0; i < cces.length; i++) { cce = cces[i]; index = 0; if (cce != null && cce.getCouplingPoint() == couplingPoint) { for (c = 0; c <= cce.getCoupledCount(); c++) { chSelect = cce.getCHSelect(c); if (cce.isChannelPair(c) == channelPair && cce.getIDSelect(c) == elementID) { if (chSelect != 1) { cce.applyDependentCoupling(index, data1); if (chSelect != 0) index++; } if (chSelect != 2) { cce.applyDependentCoupling(index, data2); index++; } } else index += 1 + ((chSelect == 3) ? 1 : 0); } } } }