changeset 12441:a3aca8bcbaf4 libavcodec

aacenc: Only apply M/S if common_window is set.
author alexc
date Mon, 30 Aug 2010 23:43:03 +0000
parents 4c8aac222d19
children 94b578d0af10
files aacenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aacenc.c	Mon Aug 30 22:34:09 2010 +0000
+++ b/aacenc.c	Mon Aug 30 23:43:03 2010 +0000
@@ -313,7 +313,7 @@
             for (g = 0; g < ics->num_swb; g++) {
                 sum = 0;
                 //apply M/S
-                if (!ch && cpe->ms_mask[w + g]) {
+                if (cpe->common_window && !ch && cpe->ms_mask[w + g]) {
                     for (i = 0; i < ics->swb_sizes[g]; i++) {
                         cpe->ch[0].coeffs[start+i] = (cpe->ch[0].coeffs[start+i] + cpe->ch[1].coeffs[start+i]) / 2.0;
                         cpe->ch[1].coeffs[start+i] =  cpe->ch[0].coeffs[start+i] - cpe->ch[1].coeffs[start+i];