Fix effectiveBytes computation for VBR
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 1 Mar 2011 23:08:15 +0000 (18:08 -0500)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 1 Mar 2011 23:08:15 +0000 (18:08 -0500)
libcelt/celt.c

index 23d2e30..1fcda8c 100644 (file)
@@ -952,7 +952,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
    {
       celt_int32 den=st->mode->Fs>>BITRES;
       vbr_rate=(st->bitrate*frame_size+(den>>1))/den;
-      effectiveBytes = vbr_rate>>3;
+      effectiveBytes = vbr_rate>>(3+BITRES);
    } else {
       celt_int32 tmp;
       vbr_rate = 0;