diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:24:55 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-05 02:31:56 +0200 |
commit | 434f248723d4d3e22545c3542ef9fc7c00b2379b (patch) | |
tree | 4c399c1fa89215676e14f57c84a3244af806c39e /libavcodec/aaccoder.c | |
parent | 6114bffa91714c83a533ae7e5a597ee605d35c3d (diff) | |
parent | 2310ee4b1cca48609d06774b7c3c70a5f38f3473 (diff) | |
download | ffmpeg-434f248723d4d3e22545c3542ef9fc7c00b2379b.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master: (22 commits)
ac3enc: move extract_exponents inner loop to ac3dsp
avio: deprecate url_get_filename().
avio: deprecate url_max_packet_size().
avio: make url_get_file_handle() internal.
avio: make url_filesize() internal.
avio: make url_close() internal.
avio: make url_seek() internal.
avio: cosmetics, move AVSEEK_SIZE/FORCE declarations together
avio: make url_write() internal.
avio: make url_read_complete() internal.
avio: make url_read() internal.
avio: make url_open() internal.
avio: make url_connect internal.
avio: make url_alloc internal.
applehttp: Merge two for loops
applehttp: Restructure the demuxer to use a custom AVIOContext
applehttp: Move finished and target_duration to the variant struct
aacenc: reduce the number of loop index variables
avio: deprecate url_open_protocol
avio: deprecate url_poll and URLPollEntry
...
Conflicts:
libavformat/applehttp.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index f08b34b823..60be5ef47d 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -110,7 +110,7 @@ static av_always_inline float quantize_and_encode_band_cost_template( const float IQ = ff_aac_pow2sf_tab[200 + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; const float Q = ff_aac_pow2sf_tab[200 - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]; const float CLIPPED_ESCAPE = 165140.0f*IQ; - int i, j, k; + int i, j; float cost = 0; const int dim = BT_PAIR ? 2 : 4; int resbits = 0; @@ -149,10 +149,10 @@ static av_always_inline float quantize_and_encode_band_cost_template( curbits = ff_aac_spectral_bits[cb-1][curidx]; vec = &ff_aac_codebook_vectors[cb-1][curidx*dim]; if (BT_UNSIGNED) { - for (k = 0; k < dim; k++) { - float t = fabsf(in[i+k]); + for (j = 0; j < dim; j++) { + float t = fabsf(in[i+j]); float di; - if (BT_ESC && vec[k] == 64.0f) { //FIXME: slow + if (BT_ESC && vec[j] == 64.0f) { //FIXME: slow if (t >= CLIPPED_ESCAPE) { di = t - CLIPPED_ESCAPE; curbits += 21; @@ -162,15 +162,15 @@ static av_always_inline float quantize_and_encode_band_cost_template( curbits += av_log2(c)*2 - 4 + 1; } } else { - di = t - vec[k]*IQ; + di = t - vec[j]*IQ; } - if (vec[k] != 0.0f) + if (vec[j] != 0.0f) curbits++; rd += di*di; } } else { - for (k = 0; k < dim; k++) { - float di = in[i+k] - vec[k]*IQ; + for (j = 0; j < dim; j++) { + float di = in[i+j] - vec[j]*IQ; rd += di*di; } } |