private void applyDependentCoupling(SingleChannelElement target,ChannelElement cce,int index){
  IndividualChannelStream ics=cce.ch[0].ics;
  int offsets[]=ics.swbOffset;
  float dest[]=target.coeffs;
  float src[]=cce.ch[0].coeffs;
  int idx=0;
  if (ac.oc[1].m4ac.objectType == AOT_AAC_LTP) {
    log.error(String.format("Dependent coupling is not supported together with LTP"));
    return;
  }
  int destOffset=0;
  int srcOffset=0;
  for (int g=0; g < ics.numWindowGroups; g++) {
    for (int i=0; i < ics.maxSfb; i++, idx++) {
      if (cce.ch[0].bandType[idx] != ZERO_BT) {
        final float gain=cce.coup.gain[index][idx];
        for (int group=0; group < ics.groupLen[g]; group++) {
          for (int k=offsets[i]; k < offsets[i + 1]; k++) {
            dest[destOffset + group * 128 + k]+=gain * src[srcOffset + group * 128 + k];
          }
        }
      }
    }
    destOffset+=ics.groupLen[g] * 128;
    srcOffset+=ics.groupLen[g] * 128;
  }
}

private void applyDependentCoupling ( SingleChannelElement target , ChannelElement cce , int index ) { IndividualChannelStream ics = cce . ch [ 0 ] . ics ; int offsets [ ] = ics . swbOffset ; float dest [ ] = target . coeffs ; float src [ ] = cce . ch [ 0 ] . coeffs ; int idx = 0 ; if ( ac . oc [ 1 ] . m4ac . objectType == AOT_AAC_LTP ) { log . error ( String . format ( "Dependent coupling is not supported together with LTP" ) ) ; return ; } int destOffset = 0 ; int srcOffset = 0 ; for ( int g = 0 ; g < ics . numWindowGroups ; g ++ ) { for ( int i = 0 ; i < ics . maxSfb ; i ++ , idx ++ ) { if ( cce . ch [ 0 ] . bandType [ idx ] != ZERO_BT ) { final float gain = cce . coup . gain [ index ] [ idx ] ; for ( int group = 0 ; group < ics . groupLen [ g ] ; group ++ ) { for ( int k = offsets [ i ] ; k < offsets [ i + 1 ] ; k ++ ) { dest [ destOffset + group * 128 + k ] += gain * src [ srcOffset + group * 128 + k ] ; } } } } destOffset += ics . groupLen [ g ] * 128 ; srcOffset += ics . groupLen [ g ] * 128 ; } }
apply dependent channel coupling ( applied before imdct ) .
