Adds OPUS_SET_PREDICTION_DISABLED() ctl to force "independent" frames

Works by turning off pitch and energy prediction in CELT, while
setting first_frame_after_reset in SILK to disable pitch and LSF interpolation
and reduce LPC gain.
This commit is contained in:
Jean-Marc Valin 2013-11-15 13:50:38 -05:00
parent aad4117d78
commit cbe93e23be
5 changed files with 42 additions and 2 deletions

View file

@ -156,6 +156,11 @@ opus_int silk_Encode( /* O Returns error co
opus_int transition, curr_block, tot_blocks;
SAVE_STACK;
if (encControl->reducedDependency)
{
psEnc->state_Fxx[0].sCmn.first_frame_after_reset = 1;
psEnc->state_Fxx[1].sCmn.first_frame_after_reset = 1;
}
psEnc->state_Fxx[ 0 ].sCmn.nFramesEncoded = psEnc->state_Fxx[ 1 ].sCmn.nFramesEncoded = 0;
/* Check values in encoder control structure */