Loading lib_enc/ivas_stereo_dmx_evs.c +5 −5 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ static void calc_poc( cos_step = 4; cos_max = input_frame; } else // for 32 kHz & 48 kHz else /* for 32 kHz & 48 kHz */ { cos_step = 2; cos_max = n0; Loading Loading @@ -376,7 +376,7 @@ static float find_poc_peak( itd_cand[0] = itd_cand[1] = 0; P = hPOC->P; for ( i = 1; i < hPOC->shift_limit; i++ ) for ( i = 1; i < hPOC->shift_limit; i++ ) /*find peaks of POC P[] with positive and negative ITD */ { if ( P[Lh - i] > Q[0] ) { Loading Loading @@ -411,7 +411,7 @@ static float find_poc_peak( Q[n] = ( 1.0f - ( cQ[n] / ( peak_range * 2 + 1 ) + eps2 ) / ( Q[n] + eps2 ) ); Q[n] = max( Q[n], 0.0f ); if ( on[n] ) if ( on[n] ) /*if channel n was active (likely to be preceding) in the previous frame*/ { tmpf = ( 0.3f - 0.2f * (float) abs( itd_cand[n] ) / (float) hPOC->shift_limit ) * peakQ[n]; if ( Q[n] < tmpf ) Loading @@ -428,7 +428,7 @@ static float find_poc_peak( peakQ[n] = max( peakQ[n], Q[n] ); } else else /*if channel n was not active (not likely to be preceding) in the previous frame*/ { tmpf = ( 0.75f - 0.2f * (float) abs( itd_cand[n] ) / (float) hPOC->shift_limit ); Loading Loading @@ -489,7 +489,7 @@ static float find_poc_peak( } #endif cconfidence = sqrtf( fabsf( Q[0] - Q[1] ) ); cconfidence = sqrtf( fabsf( Q[0] - Q[1] ) ); /*higher value indicates higher confidence for one preceding channel*/ return hPOC->confidence = hPOC->confidence * STEREO_DMX_EVS_CORR_FORGETTING + cconfidence * ( 1.0f - STEREO_DMX_EVS_CORR_FORGETTING ); } Loading Loading
lib_enc/ivas_stereo_dmx_evs.c +5 −5 Original line number Diff line number Diff line Loading @@ -203,7 +203,7 @@ static void calc_poc( cos_step = 4; cos_max = input_frame; } else // for 32 kHz & 48 kHz else /* for 32 kHz & 48 kHz */ { cos_step = 2; cos_max = n0; Loading Loading @@ -376,7 +376,7 @@ static float find_poc_peak( itd_cand[0] = itd_cand[1] = 0; P = hPOC->P; for ( i = 1; i < hPOC->shift_limit; i++ ) for ( i = 1; i < hPOC->shift_limit; i++ ) /*find peaks of POC P[] with positive and negative ITD */ { if ( P[Lh - i] > Q[0] ) { Loading Loading @@ -411,7 +411,7 @@ static float find_poc_peak( Q[n] = ( 1.0f - ( cQ[n] / ( peak_range * 2 + 1 ) + eps2 ) / ( Q[n] + eps2 ) ); Q[n] = max( Q[n], 0.0f ); if ( on[n] ) if ( on[n] ) /*if channel n was active (likely to be preceding) in the previous frame*/ { tmpf = ( 0.3f - 0.2f * (float) abs( itd_cand[n] ) / (float) hPOC->shift_limit ) * peakQ[n]; if ( Q[n] < tmpf ) Loading @@ -428,7 +428,7 @@ static float find_poc_peak( peakQ[n] = max( peakQ[n], Q[n] ); } else else /*if channel n was not active (not likely to be preceding) in the previous frame*/ { tmpf = ( 0.75f - 0.2f * (float) abs( itd_cand[n] ) / (float) hPOC->shift_limit ); Loading Loading @@ -489,7 +489,7 @@ static float find_poc_peak( } #endif cconfidence = sqrtf( fabsf( Q[0] - Q[1] ) ); cconfidence = sqrtf( fabsf( Q[0] - Q[1] ) ); /*higher value indicates higher confidence for one preceding channel*/ return hPOC->confidence = hPOC->confidence * STEREO_DMX_EVS_CORR_FORGETTING + cconfidence * ( 1.0f - STEREO_DMX_EVS_CORR_FORGETTING ); } Loading