diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-02-27 16:23:18 -0800 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-02-27 16:23:19 -0800 |
commit | f881fa517978adc7ea610a1982e0d071f1fd3425 (patch) | |
tree | 16e92dee7172382275214e91248ff8aa1d3ad898 /media/libstagefright/codecs | |
parent | 93df415c1e0b4c99f274adb3629ce19abf1d0f53 (diff) | |
parent | b08414134218f9013c2187bbee54d0816bffff05 (diff) | |
download | frameworks_base-f881fa517978adc7ea610a1982e0d071f1fd3425.zip frameworks_base-f881fa517978adc7ea610a1982e0d071f1fd3425.tar.gz frameworks_base-f881fa517978adc7ea610a1982e0d071f1fd3425.tar.bz2 |
Merge "stagefright amr: Avoid C++/C99 for loops with variable declaration"
Diffstat (limited to 'media/libstagefright/codecs')
3 files changed, 6 insertions, 4 deletions
diff --git a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp index 3c4494d..455a510 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/ton_stab.cpp @@ -791,7 +791,8 @@ void update_gp_clipping(tonStabState *st, /* i/o : State struct */ ) { OSCL_UNUSED_ARG(pOverflow); - for (int i = 0; i < N_FRAME - 1; i++) + int i; + for (i = 0; i < N_FRAME - 1; i++) { st->gp[i] = st->gp[i+1]; } diff --git a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp index d7287f3..b325e8f 100644 --- a/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp +++ b/media/libstagefright/codecs/amrwb/src/get_amr_wb_bits.cpp @@ -119,8 +119,9 @@ int16 Serial_parm( /* Return the parameter */ ) { int16 value = 0; + int16 i; - for (int16 i = no_of_bits >> 1; i != 0; i--) + for (i = no_of_bits >> 1; i != 0; i--) { value <<= 2; diff --git a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp index f2ad333..806851e 100644 --- a/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp +++ b/media/libstagefright/codecs/amrwb/src/oversamp_12k8_to_16k.cpp @@ -240,11 +240,11 @@ void AmrWbUp_samp( { int32 i; - int16 frac; + int16 frac, j; int16 * pt_sig_u = sig_u; frac = 1; - for (int16 j = 0; j < L_frame; j++) + for (j = 0; j < L_frame; j++) { i = ((int32)j * INV_FAC5) >> 13; /* integer part = pos * 1/5 */ |