diff options
author | Mans Rullgard <mans@mansr.com> | 2011-04-05 17:40:06 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2012-01-12 11:14:04 +0200 |
commit | b676a05348e4c516fa8b57e33b10548e6142c3f8 (patch) | |
tree | 79cbd20823076300dffa09f7afdb3cfa8d5d4231 /media/libstagefright/codecs/amrwbenc/src/c2t64fx.c | |
parent | a9798d3c1f1c9787975dc0f16e2191da95f2f0da (diff) | |
download | frameworks_av-b676a05348e4c516fa8b57e33b10548e6142c3f8.zip frameworks_av-b676a05348e4c516fa8b57e33b10548e6142c3f8.tar.gz frameworks_av-b676a05348e4c516fa8b57e33b10548e6142c3f8.tar.bz2 |
stagefright aacenc/amrwbenc: Remove trailing whitespace
This was applied in AOSP master earlier, in commit
b21611e5b0f1797e39e781d91ade023bac87637f, but when merged
into the Google internal tree in
88c2d4d26d79384f32a25bd775cf873cb678b12a, none of these
changes have been brought in. (The diff of this merge commit
and its first parent, d94b71d, is empty.)
Therefore, reapply the rest of these changes on the files
that still are present in the current version.
Change-Id: I645a9b9134769958a11808a06163123d28d83e46
Diffstat (limited to 'media/libstagefright/codecs/amrwbenc/src/c2t64fx.c')
-rw-r--r-- | media/libstagefright/codecs/amrwbenc/src/c2t64fx.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c b/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c index 80990d9..18698e2 100644 --- a/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c +++ b/media/libstagefright/codecs/amrwbenc/src/c2t64fx.c @@ -79,7 +79,7 @@ void ACELP_2t64_fx( #endif Isqrt_n(&s, &exp); - s = L_shl(s, add1(exp, 5)); + s = L_shl(s, add1(exp, 5)); k_cn = vo_round(s); /* set k_dn = 32..512 (ener_dn = 2^30..2^22) */ @@ -107,22 +107,22 @@ void ACELP_2t64_fx( s = (k_cn* (*p0++))+(k_dn * (*p1++)); *p2++ = s >> 7; s = (k_cn* (*p0++))+(k_dn * (*p1++)); - *p2++ = s >> 7; + *p2++ = s >> 7; } /* set sign according to dn2[] = k_cn*cn[] + k_dn*dn[] */ for (i = 0; i < L_SUBFR; i ++) { - val = dn[i]; - ps = dn2[i]; + val = dn[i]; + ps = dn2[i]; if (ps >= 0) { sign[i] = 32767; /* sign = +1 (Q12) */ - vec[i] = -32768; + vec[i] = -32768; } else { sign[i] = -32768; /* sign = -1 (Q12) */ - vec[i] = 32767; + vec[i] = 32767; dn[i] = -val; } } @@ -130,13 +130,13 @@ void ACELP_2t64_fx( * Compute h_inv[i]. * *------------------------------------------------------------*/ /* impulse response buffer for fast computation */ - h = h_buf + L_SUBFR; - h_inv = h + (L_SUBFR<<1); + h = h_buf + L_SUBFR; + h_inv = h + (L_SUBFR<<1); for (i = 0; i < L_SUBFR; i++) { - h[i] = H[i]; - h_inv[i] = vo_negate(h[i]); + h[i] = H[i]; + h_inv[i] = vo_negate(h[i]); } /*------------------------------------------------------------* @@ -144,46 +144,46 @@ void ACELP_2t64_fx( * Result is multiplied by 0.5 * *------------------------------------------------------------*/ /* Init pointers to last position of rrixix[] */ - p0 = &rrixix[0][NB_POS - 1]; - p1 = &rrixix[1][NB_POS - 1]; + p0 = &rrixix[0][NB_POS - 1]; + p1 = &rrixix[1][NB_POS - 1]; - ptr_h1 = h; + ptr_h1 = h; cor = 0x00010000L; /* for rounding */ for (i = 0; i < NB_POS; i++) { cor += ((*ptr_h1) * (*ptr_h1) << 1); ptr_h1++; - *p1-- = (extract_h(cor) >> 1); + *p1-- = (extract_h(cor) >> 1); cor += ((*ptr_h1) * (*ptr_h1) << 1); ptr_h1++; - *p0-- = (extract_h(cor) >> 1); + *p0-- = (extract_h(cor) >> 1); } /*------------------------------------------------------------* * Compute rrixiy[][] needed for the codebook search. * *------------------------------------------------------------*/ - pos = MSIZE - 1; - pos2 = MSIZE - 2; - ptr_hf = h + 1; + pos = MSIZE - 1; + pos2 = MSIZE - 2; + ptr_hf = h + 1; for (k = 0; k < NB_POS; k++) { - p1 = &rrixiy[pos]; - p0 = &rrixiy[pos2]; + p1 = &rrixiy[pos]; + p0 = &rrixiy[pos2]; cor = 0x00008000L; /* for rounding */ - ptr_h1 = h; - ptr_h2 = ptr_hf; + ptr_h1 = h; + ptr_h2 = ptr_hf; for (i = (k + 1); i < NB_POS; i++) { cor += ((*ptr_h1) * (*ptr_h2))<<1; ptr_h1++; ptr_h2++; - *p1 = extract_h(cor); + *p1 = extract_h(cor); cor += ((*ptr_h1) * (*ptr_h2))<<1; ptr_h1++; ptr_h2++; - *p0 = extract_h(cor); + *p0 = extract_h(cor); p1 -= (NB_POS + 1); p0 -= (NB_POS + 1); @@ -191,7 +191,7 @@ void ACELP_2t64_fx( cor += ((*ptr_h1) * (*ptr_h2))<<1; ptr_h1++; ptr_h2++; - *p1 = extract_h(cor); + *p1 = extract_h(cor); pos -= NB_POS; pos2--; @@ -201,17 +201,17 @@ void ACELP_2t64_fx( /*------------------------------------------------------------* * Modification of rrixiy[][] to take signs into account. * *------------------------------------------------------------*/ - p0 = rrixiy; + p0 = rrixiy; for (i = 0; i < L_SUBFR; i += STEP) { - psign = sign; + psign = sign; if (psign[i] < 0) { - psign = vec; + psign = vec; } for (j = 1; j < L_SUBFR; j += STEP) { - *p0 = vo_mult(*p0, psign[j]); + *p0 = vo_mult(*p0, psign[j]); p0++; } } @@ -220,20 +220,20 @@ void ACELP_2t64_fx( * ~@~~~~~~~~~~~~~~ * * 32 pos x 32 pos = 1024 tests (all combinaisons is tested) * *-------------------------------------------------------------------*/ - p0 = rrixix[0]; - p1 = rrixix[1]; - p2 = rrixiy; + p0 = rrixix[0]; + p1 = rrixix[1]; + p2 = rrixiy; - psk = -1; - alpk = 1; - ix = 0; - iy = 1; + psk = -1; + alpk = 1; + ix = 0; + iy = 1; for (i0 = 0; i0 < L_SUBFR; i0 += STEP) { - ps1 = dn[i0]; - alp1 = (*p0++); - pos = -1; + ps1 = dn[i0]; + alp1 = (*p0++); + pos = -1; for (i1 = 1; i1 < L_SUBFR; i1 += STEP) { ps2 = add1(ps1, dn[i1]); @@ -242,16 +242,16 @@ void ACELP_2t64_fx( s = vo_L_mult(alpk, sq) - ((psk * alp2)<<1); if (s > 0) { - psk = sq; - alpk = alp2; - pos = i1; + psk = sq; + alpk = alp2; + pos = i1; } } p1 -= NB_POS; if (pos >= 0) { - ix = i0; - iy = pos; + ix = i0; + iy = pos; } } /*-------------------------------------------------------------------* @@ -260,7 +260,7 @@ void ACELP_2t64_fx( for (i = 0; i < L_SUBFR; i++) { - code[i] = 0; + code[i] = 0; } i0 = (ix >> 1); /* pos of pulse 1 (0..31) */ @@ -268,24 +268,24 @@ void ACELP_2t64_fx( if (sign[ix] > 0) { code[ix] = 512; /* codeword in Q9 format */ - p0 = h - ix; + p0 = h - ix; } else { - code[ix] = -512; - i0 += NB_POS; - p0 = h_inv - ix; + code[ix] = -512; + i0 += NB_POS; + p0 = h_inv - ix; } if (sign[iy] > 0) { - code[iy] = 512; - p1 = h - iy; + code[iy] = 512; + p1 = h - iy; } else { - code[iy] = -512; - i1 += NB_POS; - p1 = h_inv - iy; + code[iy] = -512; + i1 += NB_POS; + p1 = h_inv - iy; } - *index = add1((i0 << 6), i1); + *index = add1((i0 << 6), i1); for (i = 0; i < L_SUBFR; i++) { y[i] = vo_shr_r(add1((*p0++), (*p1++)), 3); |