Commit c871c8de authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

The 010101 end of stream pattern is no longer needed now that we use the

remaining bits for fine energy
parent 39710536
......@@ -902,28 +902,8 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig_t * pcm, celt_si
}
}
/* Finishing the stream with a 0101... pattern so that the
decoder can check is everything's right */
{
int val = 0;
while (ec_enc_tell(&enc, 0) < nbCompressedBytes*8)
{
ec_enc_uint(&enc, val, 2);
val = 1-val;
}
}
ec_enc_done(&enc);
{
/*unsigned char *data;*/
int nbBytes = ec_byte_bytes(&buf);
if (nbBytes > nbCompressedBytes)
{
celt_warning_int ("got too many bytes:", nbBytes);
RESTORE_STACK;
return CELT_INTERNAL_ERROR;
}
}
RESTORE_STACK;
return nbCompressedBytes;
}
......@@ -1441,20 +1421,6 @@ int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int
}
}
{
unsigned int val = 0;
while (ec_dec_tell(&dec, 0) < len*8)
{
if (ec_dec_uint(&dec, 2) != val)
{
celt_warning("decode error");
RESTORE_STACK;
return CELT_CORRUPTED_DATA;
}
val = 1-val;
}
}
RESTORE_STACK;
return 0;
/*printf ("\n");*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment