diff options
Diffstat (limited to 'media/libstagefright/codecs/amrwbenc/src/p_med_ol.c')
-rw-r--r-- | media/libstagefright/codecs/amrwbenc/src/p_med_ol.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c b/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c index 08f430f..b8174b9 100644 --- a/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c +++ b/media/libstagefright/codecs/amrwbenc/src/p_med_ol.c @@ -18,7 +18,7 @@ * File: p_med_ol.c * * * * Description: Compute the open loop pitch lag * -* output: open loop pitch lag * +* output: open loop pitch lag * ************************************************************************/ #include "typedef.h" @@ -29,7 +29,7 @@ #include "p_med_ol.tab" Word16 Pitch_med_ol( - Word16 wsp[], /* i: signal used to compute the open loop pitch*/ + Word16 wsp[], /* i: signal used to compute the open loop pitch*/ /* wsp[-pit_max] to wsp[-1] should be known */ Coder_State *st, /* i/o: codec global structure */ Word16 L_frame /* i: length of frame to compute pitch */ @@ -52,8 +52,8 @@ Word16 Pitch_med_ol( ww = &corrweight[198]; we = &corrweight[98 + L_max - L_0]; - max = MIN_32; - Tm = 0; + max = MIN_32; + Tm = 0; for (i = L_max; i > L_min; i--) { /* Compute the correlation */ @@ -65,7 +65,7 @@ Word16 Pitch_med_ol( R0 += vo_L_mult((*p1++), (*p2++)); R0 += vo_L_mult((*p1++), (*p2++)); R0 += vo_L_mult((*p1++), (*p2++)); - R0 += vo_L_mult((*p1++), (*p2++)); + R0 += vo_L_mult((*p1++), (*p2++)); } /* Weighting of the correlation function. */ hi = R0>>16; @@ -90,13 +90,13 @@ Word16 Pitch_med_ol( } /* Hypass the wsp[] vector */ - hp_wsp = old_hp_wsp + L_max; + hp_wsp = old_hp_wsp + L_max; Hp_wsp(wsp, hp_wsp, L_frame, hp_wsp_mem); /* Compute normalize correlation at delay Tm */ - R0 = 0; - R1 = 0; - R2 = 0; + R0 = 0; + R1 = 0; + R2 = 0; p1 = hp_wsp; p2 = hp_wsp - Tm; for (j = 0; j < L_frame; j+=4) @@ -174,57 +174,57 @@ Word16 median5(Word16 x[]) Word16 x1, x2, x3, x4, x5; Word16 tmp; - x1 = x[-2]; - x2 = x[-1]; - x3 = x[0]; - x4 = x[1]; - x5 = x[2]; + x1 = x[-2]; + x2 = x[-1]; + x3 = x[0]; + x4 = x[1]; + x5 = x[2]; if (x2 < x1) { tmp = x1; x1 = x2; - x2 = tmp; + x2 = tmp; } if (x3 < x1) { tmp = x1; x1 = x3; - x3 = tmp; + x3 = tmp; } if (x4 < x1) { tmp = x1; x1 = x4; - x4 = tmp; + x4 = tmp; } if (x5 < x1) { - x5 = x1; + x5 = x1; } if (x3 < x2) { tmp = x2; x2 = x3; - x3 = tmp; + x3 = tmp; } if (x4 < x2) { tmp = x2; x2 = x4; - x4 = tmp; + x4 = tmp; } if (x5 < x2) { - x5 = x2; + x5 = x2; } if (x4 < x3) { - x3 = x4; + x3 = x4; } if (x5 < x3) { - x3 = x5; + x3 = x5; } return (x3); } @@ -241,10 +241,10 @@ Word16 Med_olag( /* output : median of 5 previous ope for (i = 4; i > 0; i--) { - old_ol_lag[i] = old_ol_lag[i - 1]; + old_ol_lag[i] = old_ol_lag[i - 1]; } - old_ol_lag[0] = prev_ol_lag; + old_ol_lag[0] = prev_ol_lag; i = median5(&old_ol_lag[2]); |