[opus] API for checking whether the encoder is in DTX (PR #107)
Mark Harris
mark.hsj at gmail.com
Tue Apr 9 10:42:48 UTC 2019
On 2019-04-08 4:55, Gustaf Ullberg wrote:
> Thank you Mark.
>
> I agree and have now updated the pull request with a new commit,
> addressing your comments.
> Please take a look.
>
> /Gustaf
I think you will also need to check the mode of the previous frame
(st->prev_mode) before using internal SILK encoder state. It could have
been in SILK DTX some time ago, but then switched to CELT. Normally
there would be at least one non-DTX SILK/Hybrid frame before it switches
to CELT only, but it is possible to switch directly from SILK DTX to
CELT only mode (for example, if the frame size is reduced to less than
10 ms then it will have no choice but to switch to CELT immediately).
If it ever switches back to SILK or Hybrid it will reset the SILK
encoder state at that time, but until then the SILK encoder state may
contain stale information. Checking that st->prev_mode is
MODE_SILK_ONLY or MODE_HYBRID will verify that the SILK encoder state
corresponds to the previous frame.
- Mark
More information about the opus
mailing list