aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorAlex Converse2010-05-28 20:42:01 +0000
committerAlex Converse2010-05-28 20:42:01 +0000
commit04d6a54e13e2ac75cd0fca365c72c548d519fc0b (patch)
tree5e2b42d2ef68894a213a11d3412f5bb5a18b234c /libavcodec/aaccoder.c
parent82f1ffc7ba5efc6a99570fa4936b9453e838ca03 (diff)
aacenc: Remove unnecessary variables and scopes in the TLS.
Originally committed as revision 23366 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 0f4fc54a39..ebbfb1ea31 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -696,17 +696,13 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
const float *scaled = s->scoefs + start;
int bits = 0;
int cb;
- float mindist = INFINITY;
- int minbits = 0;
+ float dist = 0.0f;
if (sce->zeroes[w*16+g] || sce->sf_idx[w*16+g] >= 218) {
start += sce->ics.swb_sizes[g];
continue;
}
minscaler = FFMIN(minscaler, sce->sf_idx[w*16+g]);
- {
- float dist = 0.0f;
- int bb = 0;
cb = find_min_book(find_max_val(sce->ics.group_len[w], sce->ics.swb_sizes[g], scaled), sce->sf_idx[w*16+g]);
sce->band_type[w*16+g] = cb;
for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) {
@@ -719,13 +715,9 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
lambda,
INFINITY,
&b);
- bb += b;
+ bits += b;
}
- mindist = dist;
- minbits = bb;
- }
- dists[w*16+g] = (mindist - minbits) / lambda;
- bits = minbits;
+ dists[w*16+g] = (dist - bits) / lambda;
if (prev != -1) {
bits += ff_aac_scalefactor_bits[sce->sf_idx[w*16+g] - prev + SCALE_DIFF_ZERO];
}