Correct allocation tilt estimation in the CELT encoder for stereo.
authorGregory Maxwell <greg@xiph.org>
Sun, 7 Aug 2011 04:57:31 +0000 (00:57 -0400)
committerGregory Maxwell <greg@xiph.org>
Sun, 7 Aug 2011 19:56:59 +0000 (15:56 -0400)
Remove a redundant negative length check in celt_decode.

libcelt/celt.c

index a0c83f2..ad4ef60 100644 (file)
@@ -839,7 +839,7 @@ static int alloc_trim_analysis(const CELTMode *m, const celt_norm *X,
       {
          diff += bandLogE[i+c*m->nbEBands]*(opus_int32)(2+2*i-m->nbEBands);
       }
-   } while (++c<0);
+   } while (++c<C);
    diff /= C*(end-1);
    /*printf("%f\n", diff);*/
    if (diff > QCONST16(2.f, DB_SHIFT))
@@ -2364,10 +2364,6 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
       RESTORE_STACK;
       return frame_size/st->downsample;
    }
-   if (len<0) {
-     RESTORE_STACK;
-     return CELT_BAD_ARG;
-   }
 
    if (dec == NULL)
    {