[opus] Fix DTX is always unavailable when DISABLE_FLOAT_API is not defined

강인규 skkig1 at gmail.com
Tue Oct 17 02:23:16 UTC 2017


Hi.

I found that DTX is always unavailable when DISABLE_FLAOT_API is not
defined in OPUS_AUTO mode.

As you know analysis_info.valid is alway true except NaN case and
is_silence is alway true except digital zero signal case.

In general, following condition will be alway true except exceptional case.

(analysis_info.valid || is_silence)

But in a code, there is a NOT expression in front of above condition, so
st->silk_mode.useDTX will be always disable

Here is the code.

#ifndef DISABLE_FLOAT_API

       st->silk_mode.useDTX = st->use_dtx && !(analysis_info.valid ||
is_silence);

#else

       st->silk_mode.useDTX = st->use_dtx;

#endif

Is it a bug or are there any reason for this?

In my opinion, the NOT expression should to be removed.

I attached a fixed file.

Please review.


Thanks,

InGyu Kang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20171017/e6f4c1c9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opus_encoder.c
Type: text/x-csrc
Size: 93618 bytes
Desc: not available
URL: <http://lists.xiph.org/pipermail/opus/attachments/20171017/e6f4c1c9/attachment-0001.c>


More information about the opus mailing list