aacenc: fix the side calculation in search_for_ms
authorYoung Han Lee <cpumaker@gmail.com>
Thu, 24 Mar 2011 01:49:36 +0000 (10:49 +0900)
committerAlex Converse <alex.converse@gmail.com>
Fri, 25 Mar 2011 04:12:23 +0000 (21:12 -0700)
libavcodec/aaccoder.c

index 1bb8c63..f3a08cf 100644 (file)
@@ -1057,7 +1057,7 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
                     for (i = 0; i < sce0->ics.swb_sizes[g]; i++) {
                         M[i] = (sce0->coeffs[start+w2*128+i]
                               + sce1->coeffs[start+w2*128+i]) * 0.5;
-                        S[i] =  sce0->coeffs[start+w2*128+i]
+                        S[i] =  M[i]
                               - sce1->coeffs[start+w2*128+i];
                     }
                     abs_pow34_v(L34, sce0->coeffs+start+w2*128, sce0->ics.swb_sizes[g]);