[opus] API for checking whether the encoder is in DTX (PR #107)
Gustaf Ullberg
gustaf at google.com
Wed Apr 10 10:27:46 UTC 2019
Yes, good point. I added the checking of prev_mode for Silk DTX to avoid
using stale data from the Silk state.
The PR is updated, and I'm attaching an updated patch.
/Gustaf
On Tue, 9 Apr 2019 at 12:42, Mark Harris <mark.hsj at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20190410/cb01eda1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-API-for-checking-whether-the-encoder-is-in-DTX.patch
Type: text/x-patch
Size: 2938 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20190410/cb01eda1/attachment.bin>
More information about the opus
mailing list