src/main/java/net/sourceforge/jaad/aac/ps/PS.java
private void delta_decode(boolean enable, int[] index, int[] index_prev,
		boolean dt_flag, int nr_par, int stride,
		int min_index, int max_index) {
		int i;

		if(enable) {
			if(!dt_flag) {
				/* delta coded in frequency direction */
				index[0] = 0+index[0];
				index[0] = delta_clip(index[0], min_index, max_index);

				for(i = 1; i<nr_par; i++) {
					index[i] = index[i-1]+index[i];
					index[i] = delta_clip(index[i], min_index, max_index);
				}
			}
			else {
				/* delta coded in time direction */
				for(i = 0; i<nr_par; i++) {
                //int8_t tmp2;
					//int8_t tmp = index[i];

					//printf("%d %d\n", index_prev[i*stride], index[i]);
					//printf("%d\n", index[i]);
					index[i] = index_prev[i*stride]+index[i];
					//tmp2 = index[i];
					index[i] = delta_clip(index[i], min_index, max_index);

					//if (iid)
					//{
					//    if (index[i] == 7)
					//    {
					//        printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2);
					//    }
					//}
				}
			}
		}
		else {
			/* set indices to zero */
			for(i = 0; i<nr_par; i++) {
				index[i] = 0;
			}
		}

		/* coarse */
		if(stride==2) {
			for(i = (nr_par<<1)-1; i>0; i--) {
				index[i] = index[i>>1];
			}
		}
	}
private void delta_decode(boolean enable, int[] index, int[] index_prev,
		boolean dt_flag, int nr_par, int stride,
		int min_index, int max_index) {
		int i;

		if(enable) {
			if(!dt_flag) {
				/* delta coded in frequency direction */
				index[0] = 0+index[0];
				index[0] = delta_clip(index[0], min_index, max_index);

				for(i = 1; i<nr_par; i++) {
					index[i] = index[i-1]+index[i];
					index[i] = delta_clip(index[i], min_index, max_index);
				}
			}
			else {
				/* delta coded in time direction */
				for(i = 0; i<nr_par; i++) {
                //int8_t tmp2;
					//int8_t tmp = index[i];

					//printf("%d %d\n", index_prev[i*stride], index[i]);
					//printf("%d\n", index[i]);
					index[i] = index_prev[i*stride]+index[i];
					//tmp2 = index[i];
					index[i] = delta_clip(index[i], min_index, max_index);

					//if (iid)
					//{
					//    if (index[i] == 7)
					//    {
					//        printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2);
					//    }
					//}
				}
			}
		}
		else {
			/* set indices to zero */
			for(i = 0; i<nr_par; i++) {
				index[i] = 0;
			}
		}

		/* coarse */
		if(stride==2) {
			for(i = (nr_par<<1)-1; i>0; i--) {
				index[i] = index[i>>1];
			}
		}
	}
private void delta_decode ( boolean enable , int [ ] index , int [ ] index_prev , boolean dt_flag , int nr_par , int stride , int min_index , int max_index ) { int i ; if ( enable ) { if ( ! dt_flag ) { /* delta coded in frequency direction */ index [ 0 ] = 0 + index [ 0 ] ; index [ 0 ] = delta_clip ( index [ 0 ] , min_index , max_index ) ; for ( i = 1 ; i < nr_par ; i ++ ) { index [ i ] = index [ i - 1 ] + index [ i ] ; index [ i ] = delta_clip ( index [ i ] , min_index , max_index ) ; } } else { /* delta coded in time direction */ for ( i = 0 ; i < nr_par ; i ++ ) { //int8_t tmp2; //int8_t tmp = index[i]; //printf("%d %d\n", index_prev[i*stride], index[i]); //printf("%d\n", index[i]); index [ i ] = index_prev [ i * stride ] + index [ i ] ; //tmp2 = index[i]; index [ i ] = delta_clip ( index [ i ] , min_index , max_index ) ; //if (iid) //{ //    if (index[i] == 7) //    { //        printf("%d %d %d\n", index_prev[i*stride], tmp, tmp2); //    } //} } } } else { /* set indices to zero */ for ( i = 0 ; i < nr_par ; i ++ ) { index [ i ] = 0 ; } } /* coarse */ if ( stride == 2 ) { for ( i = ( nr_par << 1 ) - 1 ; i > 0 ; i -- ) { index [ i ] = index [ i >> 1 ] ; } } }
/* delta decode array
/ * delta decode array