Redundancy fixes
No longer encoding the redundancy flag for SILK since we can infer redundancy from the length of the frame. Also, we skip encoding the flag for hybrid mode when we know the decoder will not read it.
This commit is contained in:
parent
9fd13d6065
commit
591b74945d
2 changed files with 14 additions and 7 deletions
|
@ -321,10 +321,13 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
|
|||
}
|
||||
|
||||
start_band = 0;
|
||||
if (mode != MODE_CELT_ONLY && data != NULL && ec_tell(&dec)+29+8*(st->mode == MODE_HYBRID) < 8*len)
|
||||
if (mode != MODE_CELT_ONLY && data != NULL && ec_tell(&dec)+17+20*(st->mode == MODE_HYBRID) < 8*len)
|
||||
{
|
||||
/* Check if we have a redundant 0-8 kHz band */
|
||||
redundancy = ec_dec_bit_logp(&dec, 12);
|
||||
if (mode == MODE_HYBRID)
|
||||
redundancy = ec_dec_bit_logp(&dec, 12);
|
||||
else
|
||||
redundancy = 1;
|
||||
if (redundancy)
|
||||
{
|
||||
celt_to_silk = ec_dec_bit_logp(&dec, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue