shithub: opus

Download patch

ref: a350bf5262a399aad7500e62cf69b2d9d1f3f2cd
parent: 682b6cf1ad9a8410c19c7c3864344d94abad93fc
author: Jean-Marc Valin <[email protected]>
date: Mon Jan 31 12:30:15 EST 2011

Stop collapsing the background noise channels when switching to mono

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -2195,17 +2195,14 @@
       dec = &_dec;
    }
 
-   if (CC==1&&C==2)
+   if (C>CC)
    {
       RESTORE_STACK;
       return CELT_CORRUPTED_DATA;
-   } else if (CC==2&&C==1)
+   } else if (C<CC)
    {
       for (i=0;i<st->mode->nbEBands;i++)
-      {
          oldBandE[i]=MAX16(oldBandE[i],oldBandE[st->mode->nbEBands+i]);
-         backgroundLogE[i]=MAX16(backgroundLogE[i],backgroundLogE[st->mode->nbEBands+i]);
-      }
    }
 
    total_bits = len*8;