Commit 387e146d authored by alexc's avatar alexc

When calculating AAC quantized band cost, don't leave garbage in the bit count

for the 0 codebook.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19444 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36ed9c73
...@@ -124,6 +124,8 @@ static float quantize_band_cost(struct AACEncContext *s, const float *in, ...@@ -124,6 +124,8 @@ static float quantize_band_cost(struct AACEncContext *s, const float *in,
if (!cb) { if (!cb) {
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
cost += in[i]*in[i]*lambda; cost += in[i]*in[i]*lambda;
if (bits)
*bits = 0;
return cost; return cost;
} }
#ifndef USE_REALLY_FULL_SEARCH #ifndef USE_REALLY_FULL_SEARCH
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment