[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


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.


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


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


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.


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