Xiph.Org issueshttps://gitlab.xiph.org/groups/xiph/-/issues2017-10-21T19:37:04Zhttps://gitlab.xiph.org/xiph/opus/-/issues/2294ec_enc_shrink() assertion failure2017-10-21T19:37:04ZMark Harrisec_enc_shrink() assertion failureWhen encoding an Opus hybrid frame with redundancy, no space is reserved for the 21 bits needed to signal redundancy, which can lead to SILK using too many bits and an assertion failure in ec_enc_shrink().
The issue can be reproduced wi...When encoding an Opus hybrid frame with redundancy, no space is reserved for the 21 bits needed to signal redundancy, which can lead to SILK using too many bits and an assertion failure in ec_enc_shrink().
The issue can be reproduced with libopus from git master (4667b69).
```
$ ./configure --enable-assertions --enable-fixed-point --disable-shared
$ make
$ gcc -g ec_enc_shrink_assert.c -Iinclude .libs/libopus.a -lm
$ ./a.out
data_len=10 toc=08
data_len=80 toc=6b 83
Fatal (internal) error in celt/entenc.c, line 238: assertion failed: _this->offs+_this->end_offs<=_size
```Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2291configure doesn't detect libNE10 properly2017-10-21T19:37:04ZAleksei Gavrilovconfigure doesn't detect libNE10 properly*It always returns "no"
lines 423-425:
AC_MSG_CHECKING(for NE10)
save_CFLAGS="$CFLAGS"; CFLAGS="$NE10_CFLAGS"
save_LIBS="$LIBS"; LIBS="$NE10_LIBS $LIBM"
should be
AC_MSG_CHECKING(for NE10)
save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $...*It always returns "no"
lines 423-425:
AC_MSG_CHECKING(for NE10)
save_CFLAGS="$CFLAGS"; CFLAGS="$NE10_CFLAGS"
save_LIBS="$LIBS"; LIBS="$NE10_LIBS $LIBM"
should be
AC_MSG_CHECKING(for NE10)
save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $NE10_CFLAGS"
save_LIBS="$LIBS"; LIBS="$LIBS $NE10_LIBS $LIBM"
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2285Building Opus with Visual Studio 2015 fails2017-10-21T19:37:04ZBoulderBuilding Opus with Visual Studio 2015 failsI cloned the latest sources (v1.1.3-140-g096b220) from Opus git and tried building Opus with Visual Studio 2015 in Windows 7.
At one point I get this error which causes a failure:
opus.lib(vq.obj) : error LNK2001: unresolved external sy...I cloned the latest sources (v1.1.3-140-g096b220) from Opus git and tried building Opus with Visual Studio 2015 in Windows 7.
At one point I get this error which causes a failure:
opus.lib(vq.obj) : error LNK2001: unresolved external symbol op_pvq_search_sse2Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2268Compiling with Xcode 7.3, it comes with an error.2017-10-21T19:37:04ZopenthreadCompiling with Xcode 7.3, it comes with an error.ld: LTO remark: silk/decode_core.c:174:13: loop not vectorized: cannot prove it is safe to reorder memory operations
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ emitted errors bu...ld: LTO remark: silk/decode_core.c:174:13: loop not vectorized: cannot prove it is safe to reorder memory operations
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ emitted errors but did not return a nonzero exit code to indicate failureJean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2253Add license header to autogen.sh2017-10-21T19:37:04ZGhost UserAdd license header to autogen.shI am updating Opus in Chromium and one of the checks highlighted that autogen.sh doesn't have a license header. Is it possible to add this? Thanks!I am updating Opus in Chromium and one of the checks highlighted that autogen.sh doesn't have a license header. Is it possible to add this? Thanks!Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2242a clear cut-off at around 12KHz with opus encoding setting (32KHz sampling ra...2017-10-21T19:37:04ZTim Denga clear cut-off at around 12KHz with opus encoding setting (32KHz sampling rate, @16kbps)Hi,
I am trying to encode speech samples with OPUS at 16kbps, a 32KHz sampling rate. It is observed from the decoded audio that there is clear cut-off at around 12KHz (expected to be 16KHz). I am not sure whether or not it is a bug or i...Hi,
I am trying to encode speech samples with OPUS at 16kbps, a 32KHz sampling rate. It is observed from the decoded audio that there is clear cut-off at around 12KHz (expected to be 16KHz). I am not sure whether or not it is a bug or it is simply the limitation due to the low bit-rate setting? Any one can help me on this? Thanks very much in advance.
Thanks
TimJean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2241Memory leaks in the test suite2017-10-21T19:37:04ZbugmenotMemory leaks in the test suiteI run make check on the latest libopus release and got it fail with
LeakSanitizer errors.
```
==================================
opus 1.1.1: ./test-suite.log
==================================
# TOTAL: 12
# PASS: 9
# SKIP: 0
# XFA...I run make check on the latest libopus release and got it fail with
LeakSanitizer errors.
```
==================================
opus 1.1.1: ./test-suite.log
==================================
# TOTAL: 12
# PASS: 9
# SKIP: 0
# XFAIL: 0
# FAIL: 3
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: celt/tests/test_unit_laplace
==================================
=================================================================
==4912==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 40000 byte(s) in 1 object(s) allocated from:
#0 0x4b8600 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_laplace+0x4b8600)
#1 0x4eade5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_laplace+0x4eade5)
#2 0x2adaf6f0ceac (/lib/x86_64-linux-gnu/libc.so.6+0x1eeac)
SUMMARY: AddressSanitizer: 40000 byte(s) leaked in 1 allocation(s).
FAIL celt/tests/test_unit_laplace (exit status: 23)
FAIL: celt/tests/test_unit_dft
==============================
=================================================================
==4943==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 22432 byte(s) in 18 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_dft+0x4b86d0)
#1 0x4e3e85 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_dft+0x4e3e85)
Direct leak of 5608 byte(s) in 18 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_dft+0x4b86d0)
#1 0x4e4dc7 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_dft+0x4e4dc7)
SUMMARY: AddressSanitizer: 28040 byte(s) leaked in 36 allocation(s).
FAIL celt/tests/test_unit_dft (exit status: 23)
FAIL: celt/tests/test_unit_mdct
===============================
=================================================================
==5024==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8192 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05fa (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05fa)
Direct leak of 8192 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f060b (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f060b)
Direct leak of 7680 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0703 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0703)
Direct leak of 7680 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06f2 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06f2)
Direct leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05db)
Direct leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05fa (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05fa)
Direct leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f060b (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f060b)
Direct leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05ec (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05ec)
Direct leak of 3840 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0703 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0703)
Direct leak of 3840 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06d3 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06d3)
Direct leak of 3840 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06e4 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06e4)
Direct leak of 3840 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06f2 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06f2)
Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05bc (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05bc)
Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05cd (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05cd)
Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05db)
Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05ec (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05ec)
Direct leak of 1920 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06c5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06c5)
Direct leak of 1920 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06b4 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06b4)
Direct leak of 1920 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06d3 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06d3)
Direct leak of 1920 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06e4 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06e4)
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f05ae (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05ae)
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05bc (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05bc)
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05cd (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05cd)
Direct leak of 1024 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f059d (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f059d)
Direct leak of 960 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06b4 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06b4)
Direct leak of 960 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06c5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06c5)
Direct leak of 960 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0695 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0695)
Direct leak of 960 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f06a6 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06a6)
Direct leak of 512 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f059d (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f059d)
Direct leak of 512 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f05ae (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f05ae)
Direct leak of 480 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0676 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0676)
Direct leak of 480 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0687 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0687)
Direct leak of 480 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0695 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0695)
Direct leak of 480 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f06a6 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f06a6)
Direct leak of 240 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0687 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0687)
Direct leak of 240 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0657 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0657)
Direct leak of 240 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0668 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0668)
Direct leak of 240 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0676 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0676)
Direct leak of 160 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0638 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0638)
Direct leak of 160 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0649 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0649)
Direct leak of 144 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f0619 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0619)
Direct leak of 144 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f062a (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f062a)
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f057e (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f057e)
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6b5 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6b5)
#2 0x4f058f (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f058f)
Direct leak of 120 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0668 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0668)
Direct leak of 120 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0657 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0657)
Direct leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0649 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0649)
Direct leak of 80 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0638 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0638)
Direct leak of 72 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f0619 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f0619)
Direct leak of 72 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f062a (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f062a)
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f057e (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f057e)
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x4b86d0 (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4b86d0)
#1 0x4ef6db (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4ef6db)
#2 0x4f058f (/home/madamczyk/afl-1.94b/opus-tools-0.1.9/opus-1.1.1/celt/tests/test_unit_mdct+0x4f058f)
SUMMARY: AddressSanitizer: 92736 byte(s) leaked in 52 allocation(s).
FAIL celt/tests/test_unit_mdct (exit status: 23)
```
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2240Division by zero in opus_demo2017-10-21T19:37:04ZbugmenotDivision by zero in opus_demoWhile fuzzing opus compression I get a lot of crashes like that:
```
katmacadapc% ~/afl-1.94b/opus-1.1.1/.libs-notrap/opus_demo -e voip 48000 2 8000 -cbr -bandwidth NB -complexity 0 -forcemono id:000000,sig:04,src:000020,op:havoc,rep:32...While fuzzing opus compression I get a lot of crashes like that:
```
katmacadapc% ~/afl-1.94b/opus-1.1.1/.libs-notrap/opus_demo -e voip 48000 2 8000 -cbr -bandwidth NB -complexity 0 -forcemono id:000000,sig:04,src:000020,op:havoc,rep:32 /tmp/1
libopus 0.9.14
Encoding 48000 Hz input at 8.000 kb/s in narrowband with 960-sample frames.
average bitrate: 8.000 kb/s
maximum bitrate: 8.000 kb/s
src/opus_demo.c:869:43: runtime error: division by zero
SUMMARY: AddressSanitizer: undefined-behavior src/opus_demo.c:869:43 in
active bitrate: -nan kb/s
bitrate standard deviation: 0.000 kb/s
```
I have found it on many files, the smallest one is a single byte 0x80.
BTW, notice the print:
libopus 0.9.14
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2224Encoding gives different result on x86(Mac) and Arm(iPhone)2017-10-21T19:37:05ZDaniel ArmyrEncoding gives different result on x86(Mac) and Arm(iPhone)For some reason, my standard test vector does not encode to the same data on my Mac(x86) as on my iPhone(Arm). Specifically, the results are almost the same except for a few bytes in the middle of the second frame.
I have (or rather wil...For some reason, my standard test vector does not encode to the same data on my Mac(x86) as on my iPhone(Arm). Specifically, the results are almost the same except for a few bytes in the middle of the second frame.
I have (or rather will) attach a self-contained C file that illustrates the issue and the script I used to build the opus lib.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2215Opus encoder blends both audio channels in each audio channel in low bitrates2017-10-21T19:37:05ZPavel ChrpaOpus encoder blends both audio channels in each audio channel in low bitratesIn low bitrate encoding of a stereo file (WAV), the Opus codec seems to blend both audio channel in each audio channel. From my initial testing it seems that the border is around ~38-40kbps and the lower the bitrate is, the more signific...In low bitrate encoding of a stereo file (WAV), the Opus codec seems to blend both audio channel in each audio channel. From my initial testing it seems that the border is around ~38-40kbps and the lower the bitrate is, the more significant this seems. This may be a problem in recording of two speakers, where each of the speaker represent one of the audio channel.
*Steps*:
1. Install opus-tools 0.1.9-1 (e.g. _sudo apt-get install opus-tools_)
2. Encode stereo file by running _opusenc --bitrate 24 --hard-cbr --framesize 60_
3. Play the file and listen to each of the channels separately
*Expected*:
- both channels will retain only their audio footage
*Environment*:
- Ubuntu MATE 15.04 running on Dell Latitude E5430
- WAV info (file available at: [https://drive.google.com/folderview?id=0B_W_T_CohbhsfnNaOGZkb0NzekhKeDZDV2FnbFJTeUV4QzdBaDFPalpGQUdIVkJoTUpIVEk&usp=sharing]):
```
$ mediainfo ~/Desktop/1352389720037_5516_5517_31870.wav
General
Complete name : /home/pavel/Desktop/1352389720037_5516_5517_31870.wav
Format : Wave
File size : 2.81 MiB
Duration : 1mn 32s
Overall bit rate mode : Constant
Overall bit rate : 256 Kbps
Audio
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 1mn 32s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 8 000 Hz
Bit depth : 16 bits
Stream size : 2.81 MiB (100%)
```
- Opus codec:
```
$ dpkg -l | grep opus
ii libopus0:amd64 1.1-0ubuntu2 amd64 Opus codec runtime library
ii opus-tools 0.1.9-1 amd64 Opus codec command line tools
```Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2186opus_demo.c encodes void data at end of file2017-10-21T19:37:05Zgrahamrsopus_demo.c encodes void data at end of fileWhen the input file of samples is entirely consumed, yet another loop iteration encodes a packet from all zero data.
Is there any reason for that?
I was inclined to stop when the data is found void.
At line 695:
if (curr_read...When the input file of samples is entirely consumed, yet another loop iteration encodes a packet from all zero data.
Is there any reason for that?
I was inclined to stop when the data is found void.
At line 695:
if (curr_read+remaining == 0) break; // 20150314 Why continue with void data
if (curr_read+remaining < frame_size)
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2163Memory Leak in Opus V 1.1 and 1.1.12017-10-21T19:37:05ZpipesifMemory Leak in Opus V 1.1 and 1.1.1Hello,
i have see who is present memory leak in the Opus library, in Codifing section, this problem not is present if i use the library to decoding an Opus steam.
RegardHello,
i have see who is present memory leak in the Opus library, in Codifing section, this problem not is present if i use the library to decoding an Opus steam.
RegardJean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2161The libopus 1.1.1-beta tarball is missing the new MIPS files2017-10-21T19:37:05ZWan-Teh ChangThe libopus 1.1.1-beta tarball is missing the new MIPS filesThe libopus 1.1.1-beta tarball at http://downloads.xiph.org/releases/opus/opus-1.1.1-beta.tar.gz is missing all the new files for MIPS optimizations.
Specifically, these files are missing:
celt/mips/celt_mipsr1.h
celt/mips/fixed_ge...The libopus 1.1.1-beta tarball at http://downloads.xiph.org/releases/opus/opus-1.1.1-beta.tar.gz is missing all the new files for MIPS optimizations.
Specifically, these files are missing:
celt/mips/celt_mipsr1.h
celt/mips/fixed_generic_mipsr1.h
celt/mips/kiss_fft_mipsr1.h
celt/mips/mdct_mipsr1.h
celt/mips/pitch_mipsr1.h
celt/mips/vq_mipsr1.h
Makefile.mips
silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h
silk/fixed/mips/prefilter_FIX_mipsr1.h
silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h
silk/mips/macros_mipsr1.h
silk/mips/NSQ_del_dec_mipsr1.h
silk/mips/sigproc_fix_mipsr1.hJean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2160Temporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.c2017-10-21T19:37:05ZWan-Teh ChangTemporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.cOne of the opus_decode() calls in test_opus_decode.c passes 0 as the fourth argument. But that argument is marked as nonnull. So if we compile opus using an alternative build system that enables both -Werror and -Wnonnull, the compilatio...One of the opus_decode() calls in test_opus_decode.c passes 0 as the fourth argument. But that argument is marked as nonnull. So if we compile opus using an alternative build system that enables both -Werror and -Wnonnull, the compilation will fail.
Here is an example of the compilation error in the Chromium build system on Mac:
wtc-macpro:src wtc$ ninja -C out/Default test_opus_decode
ninja: Entering directory `out/Default'
[1/2] CC obj/third_party/opus/src/tests/test_opus_decode.test_opus_decode.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/opus/src/tests/test_opus_decode.test_opus_decode.o.d -DCHROMIUM_BUILD -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_OPENSSL=1 -DNO_TCMALLOC -DDISABLE_NACL -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATION_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DENABLE_REMOTING=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_HIDPI=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DCR_CLANG_REVISION=223108 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../.. -Igen -I../../third_party/opus/src/celt -I../../third_party/opus/src/silk -I../../third_party/opus/src/include -fno-strict-aliasing -fstack-protector-all -arch x86_64 -fcolor-diagnostics -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wnewline-eof -Wno-c++11-narrowing -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-reserved-user-defined-literal -Wno-inconsistent-missing-override -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -O0 -g2 -Wno-absolute-value -std=c99 -c ../../third_party/opus/src/tests/test_opus_decode.c -o obj/third_party/opus/src/tests/test_opus_decode.test_opus_decode.o
../../third_party/opus/src/tests/test_opus_decode.c:138:64: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
out_samples = opus_decode(dec[t], packet, 0, 0, 0, fec);
~ ^
1 error generated.
ninja: build stopped: subcommand failed.
One way to fix this is to use a GCC pragma to ignore -Wnonnull for that opus_decode() call.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2048Compiling without optimization produces a warning2017-10-21T19:37:05ZDave MichaelCompiling without optimization produces a warningI work on Chromium, and in my debug build, I always get this warning:
src/src/opus_decoder.c:37:10: warning: You appear to be compiling without optimization, if so opus will be very slow. [-W#pragma-messages]
# pragma message "You appear...I work on Chromium, and in my debug build, I always get this warning:
src/src/opus_decoder.c:37:10: warning: You appear to be compiling without optimization, if so opus will be very slow. [-W#pragma-messages]
# pragma message "You appear to be compiling without optimization, if so opus will be very slow."
^
I personally want my build output to be clean, and I'm perfectly aware when doing a debug build that it's debug and might be slow. So I would prefer if this warning was not there.
If it's not acceptable to simply remove this warning, it seems like it ought to be possible to turn this off with a precompile define so that embedders like Chromium can turn it off. We have a large code base and noise in our build output can be very annoying.
I'm willing to do the patch if there's an acceptable solution to this.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2027multistream_encode(_float) fails on hard cbr encodes in libopus v1.12017-10-21T19:37:05Zthinktinkmultistream_encode(_float) fails on hard cbr encodes in libopus v1.1Using either an uncoupled stereo signal or any other singal type that lends itself to utilizing the multistream APIs, when setting the bitrate to Auto (-1000) or Max (-1) by the multistream_ctl function or by setting a very low bitrate, ...Using either an uncoupled stereo signal or any other singal type that lends itself to utilizing the multistream APIs, when setting the bitrate to Auto (-1000) or Max (-1) by the multistream_ctl function or by setting a very low bitrate, relative to the number of channels. This error only happens with libopus v1.1 but not any version before, including libopus v1.1-beta. This can be replicated with the opus tools 0.1.8-win32 encoder with the following example commands:
```
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=-1000 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=-1 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>opusenc --set-ctl-int 4002=1599 --hard-cbr Quadraphonic.wav Quadraphonic.opus
Encoding using libopus 1.1 (audio)
-----------------------------------------------------
Input: 48kHz 4 channels
Output: 4 channels (4 coupled)
20ms packets, 192kbit/sec CBR
Preskip: 312
Encoding failed: invalid argument. Aborting.
Encoding complete
-----------------------------------------------------
Encoded:
Runtime: 1e-006 seconds
(0x realtime)
Wrote: 847 bytes, 1 packets, 2 pages
Bitrate: -1.#INDkbit/s (without overhead)
Instant rates: 3065.6kbit/s to 0kbit/s
(7664 to 0 bytes per packet)
Overhead: 100% (container+metadata)
C:\opus-tools-0.1.8-win32>
```
The above commands do not show encoding errors with previous versions of the tools.
Attached quadraphonic sample audio file for testing.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2026Opus DTX issue report2017-10-21T19:37:03ZgmarianoOpus DTX issue reportHello:
We noticed that opus reconstructed noise is pulsing with a 400ms pattern when dtx is enabled in silk mode. This is independent of the background noise level and is found with speech + non-speech period test files, as well as vari...Hello:
We noticed that opus reconstructed noise is pulsing with a 400ms pattern when dtx is enabled in silk mode. This is independent of the background noise level and is found with speech + non-speech period test files, as well as variable level noise-only test files. This issue can be easirly reproduced with opus v1.1 using this command:
./opus_demo voip 16000 1 25000 –dtx input.bin output.bin
We have attached a .wav file with the first channel as the input reference noise signal and the second channel as the opus codec output using the opus_demo application. It does not look like this has been reported already. We would like your feedback.
Thank you,
Gonzalo Mariano and Pascal Huart
Cisco Systems
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2001Opus encoder produces 40/60ms CBR packets with excess padding2017-10-21T19:37:03ZMark HarrisOpus encoder produces 40/60ms CBR packets with excess paddingThe packets produced by `opus_multistream_encode()` when encoding 40ms or 60ms CELT or Hybrid packets for a single stream contain 4 to 6 bytes of padding, which could have been used to add 1 or 2 bytes to each frame.
For example:
```
$ ...The packets produced by `opus_multistream_encode()` when encoding 40ms or 60ms CELT or Hybrid packets for a single stream contain 4 to 6 bytes of padding, which could have been used to add 1 or 2 bytes to each frame.
For example:
```
$ opusenc --hard-cbr --bitrate 31.5 --framesize 60 comp48s.wav out.opus
Encoding using libopus 1.1-42-ge1f8462 (audio)
-----------------------------------------------------
Input: 48kHz 2 channels
Output: 2 channels (2 coupled)
60ms packets, 31.5kbit/sec CBR
Preskip: 312
Encoding complete
-----------------------------------------------------
Encoded: 1 minute and 30.84 seconds
Runtime: 2 seconds
(45.42x realtime)
Wrote: 362224 bytes, 1514 packets, 97 pages
Bitrate: 31.4667kbit/s (without overhead)
Instant rates: 31.4667kbit/s to 31.4667kbit/s
(236 to 236 bytes per packet)
Overhead: 1.36% (container+metadata)
$
```
The above command produces 236-byte packets (31.467 kb/s), each containing the 2 bytes required for a code 3 packet, three 76-byte frames, and 6 bytes of padding (including the padding length byte). Instead of the 6 bytes of padding, each frame could have contained 78 bytes of data.
If the multistream API is not used, `opus_encode()` does produce packets containing three 78-byte frames for this same bitrate and frame size. However, for some reason it also adds 1 byte of padding to each packet, which causes it to slightly exceed the target bitrate.
```
$ opus_demo audio 48000 2 31500 -cbr -framesize 60 comp48s.pcm out.pcm
libopus 1.1-42-ge1f8462
Encoding 48000 Hz input at 31.500 kb/s in auto mode with 2880-sample frames.
average bitrate: 31.613 kb/s
maximum bitrate: 31.600 kb/s
active bitrate: 31.600 kb/s
bitrate standard deviation: 0.000 kb/s
$
```Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2000Opus decoder produces signed arithmetic overflow undefined behavior2017-10-21T19:37:05ZMark HarrisOpus decoder produces signed arithmetic overflow undefined behaviorThe libopus Opus decoder can produce signed multiplication overflows and signed addition overflows decoding Opus packets. This is undefined behavior according to ISO C.
When this happens, it is usually accompanied by loud, exceptionall...The libopus Opus decoder can produce signed multiplication overflows and signed addition overflows decoding Opus packets. This is undefined behavior according to ISO C.
When this happens, it is usually accompanied by loud, exceptionally poor quality clipped audio output.
The libopus README file claims that the implementation does not rely on any undefined behavior.
Attached is an example PCM input file that can be used with `opus_demo` to reproduce the issue. The packets produced by the Opus encoder produce overflows when decoded. The issue can be reproduced with either the floating point or fixed point implementation using the command below:
```
$ opus_demo audio 48000 1 9000 -cbr ticket2000.pcm out.pcm
libopus 1.1-42-ge1f8462
Encoding 48000 Hz input at 9.000 kb/s in auto mode with 960-sample frames.
```
Numerous occurrences of the following operations are encountered (with varying values for the operands):
```
CLANG ARITHMETIC UNDEFINED at <silk/NSQ_del_dec.c, (234:64)> : Op: *, Reason : Signed Multiplication Overflow, BINARY OPERATION: left (int32): -284186 right (int32): 8512
CLANG ARITHMETIC UNDEFINED at <silk/decode_core.c, (224:36)> : Op: *, Reason : Signed Multiplication Overflow, BINARY OPERATION: left (int32): 47718480 right (int32): 52
CLANG ARITHMETIC UNDEFINED at <silk/decode_core.c, (224:36)> : Op: +, Reason : Signed Addition Overflow, BINARY OPERATION: left (int32): 44894665 right (int32): 2140023376
```
The output audio also sounds nothing like the input.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/1998Opus 1.1: 64 bit windows compilation generates conversion warnings2017-10-21T19:37:06ZJ. MarkiewiczOpus 1.1: 64 bit windows compilation generates conversion warningsUsing the 2010 projects to compile opus 1.1 and generate the following warnings compiling x64 Release.
opus_compare.c
..\..\src\opus_compare.c(78): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
..\..\src...Using the 2010 projects to compile opus 1.1 and generate the following warnings compiling x64 Release.
opus_compare.c
..\..\src\opus_compare.c(78): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
..\..\src\opus_compare.c(233): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
..\..\src\opus_compare.c(349): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
..\..\src\opus_compare.c(367): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
opus_decoder.c
opus_encoder.c
..\..\src\opus_encoder.c(588): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(589): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(608): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(615): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(620): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(623): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(625): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(714): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
repacketizer.c
..\..\src\repacketizer.c(222): warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
Maybe they are harmless, but they look scary especially when dealing we're talking about a codec. I didn't see a open issue filed on this so I thought I'd let you know.Jean-Marc ValinJean-Marc Valin