강인규
2017-Oct-17 02:23 UTC
[opus] Fix DTX is always unavailable when DISABLE_FLOAT_API is not defined
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>
Jean-Marc Valin
2017-Oct-17 02:28 UTC
[opus] Fix DTX is always unavailable when DISABLE_FLOAT_API is not defined
The reason we disable the SILK DTX in that case is because we have a "global" DTX in the analysis code that works for CELT too. Jean-Marc On 16/10/17 10:23 PM, 강인규 wrote:> 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 > > > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >