src/main/java/net/sourceforge/jaad/aac/sbr/NoiseEnvelope.java
public static float calc_Q_div(SBR sbr, int ch, int m, int l) {
		if(sbr.bs_coupling) {
			/* left channel */
			if((sbr.Q[0][m][l]<0||sbr.Q[0][m][l]>30)
				||(sbr.Q[1][m][l]<0||sbr.Q[1][m][l]>24 /* 2*panOffset(1) */)) {
				return 0;
			}
			else {
				/* the pan parameter is always even */
				if(ch==0) {
					return Q_div_tab_left[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1];
				}
				else {
					return Q_div_tab_right[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1];
				}
			}
		}
		else {
			/* no coupling */
			if(sbr.Q[ch][m][l]<0||sbr.Q[ch][m][l]>30) {
				return 0;
			}
			else {
				return Q_div_tab[sbr.Q[ch][m][l]];
			}
		}
	}
public static float calc_Q_div(SBR sbr, int ch, int m, int l) {
		if(sbr.bs_coupling) {
			/* left channel */
			if((sbr.Q[0][m][l]<0||sbr.Q[0][m][l]>30)
				||(sbr.Q[1][m][l]<0||sbr.Q[1][m][l]>24 /* 2*panOffset(1) */)) {
				return 0;
			}
			else {
				/* the pan parameter is always even */
				if(ch==0) {
					return Q_div_tab_left[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1];
				}
				else {
					return Q_div_tab_right[sbr.Q[0][m][l]][sbr.Q[1][m][l]>>1];
				}
			}
		}
		else {
			/* no coupling */
			if(sbr.Q[ch][m][l]<0||sbr.Q[ch][m][l]>30) {
				return 0;
			}
			else {
				return Q_div_tab[sbr.Q[ch][m][l]];
			}
		}
	}
public static float calc_Q_div ( SBR sbr , int ch , int m , int l ) { if ( sbr . bs_coupling ) { /* left channel */ if ( ( sbr . Q [ 0 ] [ m ] [ l ] < 0 || sbr . Q [ 0 ] [ m ] [ l ] > 30 ) || ( sbr . Q [ 1 ] [ m ] [ l ] < 0 || sbr . Q [ 1 ] [ m ] [ l ] > 24 /* 2*panOffset(1) */ ) ) { return 0 ; } else { /* the pan parameter is always even */ if ( ch == 0 ) { return Q_div_tab_left [ sbr . Q [ 0 ] [ m ] [ l ] ] [ sbr . Q [ 1 ] [ m ] [ l ] >> 1 ] ; } else { return Q_div_tab_right [ sbr . Q [ 0 ] [ m ] [ l ] ] [ sbr . Q [ 1 ] [ m ] [ l ] >> 1 ] ; } } } else { /* no coupling */ if ( sbr . Q [ ch ] [ m ] [ l ] < 0 || sbr . Q [ ch ] [ m ] [ l ] > 30 ) { return 0 ; } else { return Q_div_tab [ sbr . Q [ ch ] [ m ] [ l ] ] ; } } }
/* [0..1]
/ * [ 0 .. 1 ]