Browse code

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

Originally committed as revision 19444 to svn://svn.ffmpeg.org/ffmpeg/trunk

Alex Converse authored on 2009/07/17 07:20:17
Showing 1 changed files
... ...
@@ -124,6 +124,8 @@ static float quantize_band_cost(struct AACEncContext *s, const float *in,
124 124
     if (!cb) {
125 125
         for (i = 0; i < size; i++)
126 126
             cost += in[i]*in[i]*lambda;
127
+        if (bits)
128
+            *bits = 0;
127 129
         return cost;
128 130
     }
129 131
 #ifndef USE_REALLY_FULL_SEARCH