src/main/java/net/sourceforge/jaad/aac/sbr/HFGeneration.java
private static void calc_prediction_coef(SBR sbr, float[][][] Xlow,
		float[][] alpha_0, float[][] alpha_1, int k) {
		float tmp;
		acorr_coef ac = new acorr_coef();

		auto_correlation(sbr, ac, Xlow, k, sbr.numTimeSlotsRate+6);

		if(ac.det==0) {
			alpha_1[k][0] = 0;
			alpha_1[k][1] = 0;
		}
		else {
			tmp = 1.0f/ac.det;
			alpha_1[k][0] = ((ac.r01[0]*ac.r12[0])-(ac.r01[1]*ac.r12[1])-(ac.r02[0]*ac.r11[0]))*tmp;
			alpha_1[k][1] = ((ac.r01[1]*ac.r12[0])+(ac.r01[0]*ac.r12[1])-(ac.r02[1]*ac.r11[0]))*tmp;
		}

		if(ac.r11[0]==0) {
			alpha_0[k][0] = 0;
			alpha_0[k][1] = 0;
		}
		else {
			tmp = 1.0f/ac.r11[0];
			alpha_0[k][0] = -(ac.r01[0]+(alpha_1[k][0]*ac.r12[0])+(alpha_1[k][1]*ac.r12[1]))*tmp;
			alpha_0[k][1] = -(ac.r01[1]+(alpha_1[k][1]*ac.r12[0])-(alpha_1[k][0]*ac.r12[1]))*tmp;
		}

		if(((alpha_0[k][0]*alpha_0[k][0])+(alpha_0[k][1]*alpha_0[k][1])>=16.0f)
			||((alpha_1[k][0]*alpha_1[k][0])+(alpha_1[k][1]*alpha_1[k][1])>=16.0f)) {
			alpha_0[k][0] = 0;
			alpha_0[k][1] = 0;
			alpha_1[k][0] = 0;
			alpha_1[k][1] = 0;
		}
	}
private static void calc_prediction_coef(SBR sbr, float[][][] Xlow,
		float[][] alpha_0, float[][] alpha_1, int k) {
		float tmp;
		acorr_coef ac = new acorr_coef();

		auto_correlation(sbr, ac, Xlow, k, sbr.numTimeSlotsRate+6);

		if(ac.det==0) {
			alpha_1[k][0] = 0;
			alpha_1[k][1] = 0;
		}
		else {
			tmp = 1.0f/ac.det;
			alpha_1[k][0] = ((ac.r01[0]*ac.r12[0])-(ac.r01[1]*ac.r12[1])-(ac.r02[0]*ac.r11[0]))*tmp;
			alpha_1[k][1] = ((ac.r01[1]*ac.r12[0])+(ac.r01[0]*ac.r12[1])-(ac.r02[1]*ac.r11[0]))*tmp;
		}

		if(ac.r11[0]==0) {
			alpha_0[k][0] = 0;
			alpha_0[k][1] = 0;
		}
		else {
			tmp = 1.0f/ac.r11[0];
			alpha_0[k][0] = -(ac.r01[0]+(alpha_1[k][0]*ac.r12[0])+(alpha_1[k][1]*ac.r12[1]))*tmp;
			alpha_0[k][1] = -(ac.r01[1]+(alpha_1[k][1]*ac.r12[0])-(alpha_1[k][0]*ac.r12[1]))*tmp;
		}

		if(((alpha_0[k][0]*alpha_0[k][0])+(alpha_0[k][1]*alpha_0[k][1])>=16.0f)
			||((alpha_1[k][0]*alpha_1[k][0])+(alpha_1[k][1]*alpha_1[k][1])>=16.0f)) {
			alpha_0[k][0] = 0;
			alpha_0[k][1] = 0;
			alpha_1[k][0] = 0;
			alpha_1[k][1] = 0;
		}
	}
private static void calc_prediction_coef ( SBR sbr , float [ ] [ ] [ ] Xlow , float [ ] [ ] alpha_0 , float [ ] [ ] alpha_1 , int k ) { float tmp ; acorr_coef ac = new acorr_coef ( ) ; auto_correlation ( sbr , ac , Xlow , k , sbr . numTimeSlotsRate + 6 ) ; if ( ac . det == 0 ) { alpha_1 [ k ] [ 0 ] = 0 ; alpha_1 [ k ] [ 1 ] = 0 ; } else { tmp = 1.0f / ac . det ; alpha_1 [ k ] [ 0 ] = ( ( ac . r01 [ 0 ] * ac . r12 [ 0 ] ) - ( ac . r01 [ 1 ] * ac . r12 [ 1 ] ) - ( ac . r02 [ 0 ] * ac . r11 [ 0 ] ) ) * tmp ; alpha_1 [ k ] [ 1 ] = ( ( ac . r01 [ 1 ] * ac . r12 [ 0 ] ) + ( ac . r01 [ 0 ] * ac . r12 [ 1 ] ) - ( ac . r02 [ 1 ] * ac . r11 [ 0 ] ) ) * tmp ; } if ( ac . r11 [ 0 ] == 0 ) { alpha_0 [ k ] [ 0 ] = 0 ; alpha_0 [ k ] [ 1 ] = 0 ; } else { tmp = 1.0f / ac . r11 [ 0 ] ; alpha_0 [ k ] [ 0 ] = - ( ac . r01 [ 0 ] + ( alpha_1 [ k ] [ 0 ] * ac . r12 [ 0 ] ) + ( alpha_1 [ k ] [ 1 ] * ac . r12 [ 1 ] ) ) * tmp ; alpha_0 [ k ] [ 1 ] = - ( ac . r01 [ 1 ] + ( alpha_1 [ k ] [ 1 ] * ac . r12 [ 0 ] ) - ( alpha_1 [ k ] [ 0 ] * ac . r12 [ 1 ] ) ) * tmp ; } if ( ( ( alpha_0 [ k ] [ 0 ] * alpha_0 [ k ] [ 0 ] ) + ( alpha_0 [ k ] [ 1 ] * alpha_0 [ k ] [ 1 ] ) >= 16.0f ) || ( ( alpha_1 [ k ] [ 0 ] * alpha_1 [ k ] [ 0 ] ) + ( alpha_1 [ k ] [ 1 ] * alpha_1 [ k ] [ 1 ] ) >= 16.0f ) ) { alpha_0 [ k ] [ 0 ] = 0 ; alpha_0 [ k ] [ 1 ] = 0 ; alpha_1 [ k ] [ 0 ] = 0 ; alpha_1 [ k ] [ 1 ] = 0 ; } }
/* calculate linear prediction coefficients using the covariance method
/ * calculate linear prediction coefficients using the covariance method