Opus issueshttps://gitlab.xiph.org/xiph/opus/-/issues2020-09-11T21:54:39Zhttps://gitlab.xiph.org/xiph/opus/-/issues/2340CMake - Improve compiler checks for intrinsics and prefix definitions with CO...2020-09-11T21:54:39ZMarcus AsteborgCMake - Improve compiler checks for intrinsics and prefix definitions with COMPILER_reference: https://github.com/xiph/opus/issues/198
set(SSE1_SUPPORTED 1 PARENT_SCOPE)
COMPILER_SSE1_SUPPORTED etcreference: https://github.com/xiph/opus/issues/198
set(SSE1_SUPPORTED 1 PARENT_SCOPE)
COMPILER_SSE1_SUPPORTED etchttps://gitlab.xiph.org/xiph/opus/-/issues/2334cmake - Build all tests and programs for Opus in CMake build2020-08-09T04:24:33ZMarcus Asteborgcmake - Build all tests and programs for Opus in CMake buildAC:
- Add minor unittest for dll and static build
- Add missing programs for dll and static buildAC:
- Add minor unittest for dll and static build
- Add missing programs for dll and static buildhttps://gitlab.xiph.org/xiph/opus/-/issues/2333cmake - Add Doxygen doc generation to CMakebuild2020-08-09T04:24:52ZMarcus Asteborgcmake - Add Doxygen doc generation to CMakebuildhttps://vicrucann.github.io/tutorials/quick-cmake-doxygen/https://vicrucann.github.io/tutorials/quick-cmake-doxygen/https://gitlab.xiph.org/xiph/opus/-/issues/2331Enable NEON optimizations for Windows ARM642020-08-09T04:09:13ZMarcus AsteborgEnable NEON optimizations for Windows ARM64Windows on ARM64 uses another header then the general neon one.
AC:
- Enable Neon for Windows ARM in CMake
- Fix includes
- Verify on ARM64 deviceWindows on ARM64 uses another header then the general neon one.
AC:
- Enable Neon for Windows ARM in CMake
- Fix includes
- Verify on ARM64 devicehttps://gitlab.xiph.org/xiph/opus/-/issues/2330Make decoder state completely relocatable by avoiding inline pointer to mode2020-08-06T12:42:35ZDan RavivMake decoder state completely relocatable by avoiding inline pointer to modeCurrently, Opus Decoder state can be freely moved in memory in the same process, but it can't e.g. be copied as bytes to be sent across the network and set as a state for another decoder. But it *almost* can! The only thing preventing th...Currently, Opus Decoder state can be freely moved in memory in the same process, but it can't e.g. be copied as bytes to be sent across the network and set as a state for another decoder. But it *almost* can! The only thing preventing this use case is the `mode` pointer at the start of `CELTDecoder`. A clean decoder state on one machine has identical bytes to those of a clean state on another machine with the same architecture, except for possibly the bytes of the `mode` pointer - even when the mode itself is the same.
I'm not sure how to fix this in a way compatible with any custom mode, but it would be nice to be able to do this for the default mode, at least.https://gitlab.xiph.org/xiph/opus/-/issues/2326undefined behavior in silk_NSQ_del_dec_neon2020-06-14T07:36:42ZRalph Gilesundefined behavior in silk_NSQ_del_dec_neonCompiling for aarch64 with gcc 9.3.0, I get an undefined behaviour warning:
```
silk/arm/NSQ_del_dec_neon_intr.c: In function ‘silk_NSQ_del_dec_neon’:
silk/arm/NSQ_del_dec_neon_intr.c:422:55: warning: iteration 80 invokes undefined behav...Compiling for aarch64 with gcc 9.3.0, I get an undefined behaviour warning:
```
silk/arm/NSQ_del_dec_neon_intr.c: In function ‘silk_NSQ_del_dec_neon’:
silk/arm/NSQ_del_dec_neon_intr.c:422:55: warning: iteration 80 invokes undefined behavior [-Waggressive-loop-optimizations]
422 | NSQ->sLPC_Q14[ i ] = psDelDec->sLPC_Q14[ i ][ Winner_ind ];
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
silk/arm/NSQ_del_dec_neon_intr.c:421:9: note: within this loop
421 | for( ; i < NSQ_LPC_BUF_LENGTH; i++ ) {
| ^~~
```https://gitlab.xiph.org/xiph/opus/-/issues/2325float to short improvements2020-06-16T14:23:47ZMarcus Asteborgfloat to short improvements[22:58.40] <+jmspeex> xnorpx: About rounding, I actually think the right solution is to write functions that convert whole vectors at a time and then we can just use the normal run-time intrinsics method
[22:59.09] <+jmspeex> BTW, does S...[22:58.40] <+jmspeex> xnorpx: About rounding, I actually think the right solution is to write functions that convert whole vectors at a time and then we can just use the normal run-time intrinsics method
[22:59.09] <+jmspeex> BTW, does SSE2 even have a proper way to round without messing with rounding modeshttps://gitlab.xiph.org/xiph/opus/-/issues/2322Autogen failed on Cygwin2020-05-25T17:30:32ZredmanmaleAutogen failed on Cygwin`./autogen.sh` failed on Cygwin when trying to build from cloned repo:
```bash
Updating build configuration files, please wait....
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
autoreconf-2.69: libtoo...`./autogen.sh` failed on Cygwin when trying to build from cloned repo:
```bash
Updating build configuration files, please wait....
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
autoreconf-2.69: libtoolize failed with exit status: 1
```
Maybe it's because `ltmain.sh` is a symlink.
Building from tarball (without autogen) works fine.
**Env**
windows 10 x64
autoreconf 2.69
libtoolize 2.4.6
opus 1.3.1https://gitlab.xiph.org/xiph/opus/-/issues/2320silk_LPC_inverse_pred_gain_neon methods reads memory outside of the intended ...2020-06-14T03:57:12ZRomansilk_LPC_inverse_pred_gain_neon methods reads memory outside of the intended bufferThe problem connected with attempt to read data outside of the intended buffer in method silk_LPC_inverse_pred_gain_neon.
Buffer of length MAX_LPC_ORDER (=16) is placed in silk_find_LPC_FIX stack:
```C
opus_int16 a_tmp_Q12[ MAX_LPC_OR...The problem connected with attempt to read data outside of the intended buffer in method silk_LPC_inverse_pred_gain_neon.
Buffer of length MAX_LPC_ORDER (=16) is placed in silk_find_LPC_FIX stack:
```C
opus_int16 a_tmp_Q12[ MAX_LPC_ORDER ];
```
Attempt to read the buffer outside boundaries in silk_LPC_inverse_pred_gain_neon
```C
t0_s16x8 = vld1q_s16( A_Q12 + 0 );
t1_s16x8 = vld1q_s16( A_Q12 + 8 );
t2_s16x8 = vld1q_s16( A_Q12 + 16 );
```
Backtrace of methods
silk_LPC_inverse_pred_gain_neon
silk_NLSF2A
silk_find_LPC_FIXhttps://gitlab.xiph.org/xiph/opus/-/issues/2318Problem with `SATURATE` and `SROUND16 ` macros?2020-06-16T04:19:34ZVikram DattuProblem with `SATURATE` and `SROUND16 ` macros?Please have a look at below macros from celt/fixed_generic.h:
```c
#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
#define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x)))
/** Shift by a and rou...Please have a look at below macros from celt/fixed_generic.h:
```c
#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
#define SATURATE16(x) (EXTRACT16((x)>32767 ? 32767 : (x)<-32768 ? -32768 : (x)))
/** Shift by a and round-to-neareast 32-bit value. Result is a saturated 16-bit value */
#define SROUND16(x,a) EXTRACT16(SATURATE(PSHR32(x,a), 32767));
```
1.
As one can see clearly that macros `SATURATE` and `SATURATE16` are not similar when `SATURATE` is used for value 32767 or 32768.
Shouldn't the macro SATURATE be like:
`#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a + 1) ? -(a + 1) : (x)))`
or is it good as it is?
2.
The macro `SROUND16` uses `SATURATE` with value 32767.
Shouldn't it use SATURATE16 instead as it considers lower bound for 16 bits; -32768 as well?
Please note that this will in turn also enable some platform optimised instructions which saturate the value in certain bits.https://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 Valin