ref: 231caa372034aaa51c40f643b571635fecc2645e
parent: b63e22cff9601ab2249ce5b6371a5ca9e663ce09
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Tue Dec 19 17:12:03 EST 2023
Fix Hybrid CBR with DRED and CELT->SILK redundancy Need to move the redundant frame even in CBR because the hybrid frame now gets encoded as VBR, with DRED picking up the rest. Fixes an issue introduced in 4600e77.
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -2232,7 +2232,7 @@
return OPUS_INTERNAL_ERROR;
}
/* Put CELT->SILK redundancy data in the right place. */
- if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && st->use_vbr)
+ if (redundancy && celt_to_silk && st->mode==MODE_HYBRID && nb_compr_bytes != ret)
{
OPUS_MOVE(data+ret, data+nb_compr_bytes, redundancy_bytes);
nb_compr_bytes = ret+redundancy_bytes;
--
⑨