Commit graph

5193 commits

Author SHA1 Message Date
Jean-Marc Valin
c0cc80dcf4
s/master/main/ in gitlab script 2024-02-25 13:35:42 -05:00
Jean-Marc Valin
dcce2fd455
Move all DRED encoding/decoding files to dnn/ dir 2024-02-24 23:37:44 -05:00
Jean-Marc Valin
b589ab470a
Silence warning about uninitialized float_api 2024-02-24 23:29:12 -05:00
Jean-Marc Valin
522a290571
_mm_loadu_si23() needs immintrin.h on MSVC 2024-02-24 04:05:41 -05:00
Jean-Marc Valin
4c76029722
Fixing Neon when vmlaq_lane_f32() is a macro 2024-02-23 16:15:11 -05:00
Michael Klingbeil
a17c2948a0
add usage string for opus_demo dec_complexity
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-23 13:54:53 -05:00
Timothy B. Terriberry
59dc75fa97
Rework 32-bit SSE loads yet again.
The existing code in vec_avx.h produced
  warning: dereferencing type-punned pointer will break
   strict-aliasing rules
 with gcc 6.4.0.
We already had a macro to work around this within the rules of the
 C standard, but trying to use that here does not get optimized
 into a single MOVD like we were hoping.
Replacing it with memcpy() instead does get optimized correctly,
 but requires switching from a macro to an inline function in order
 to be able to declare a local variable and return a value.
We already have such an inline function in NSQ_del_dec_avx2.c, so
 hoist that out and use it everywhere, and then convert vec_avx.h
 to use it also.
2024-02-23 02:23:37 -05:00
Jean-Marc Valin
1186fb8ea4
Add Deep PLC/DRED/OSCE to random tests
Also, remove -march=native because of AVX512VNNI and valgrind
2024-02-23 01:53:48 -05:00
Jean-Marc Valin
6673e34b65
Fix build on ARMv7
Fixes regression in 83368e6.
vcgez_s16() is A64-only, but vcge_s16(..., vdup_n_s16(0)) works
everywhere.
2024-02-22 17:56:12 -05:00
Jean-Marc Valin
f1fc944b41
Fix AVX2 dection
broken in 9cf12e9
2024-02-22 17:27:46 -05:00
Jean-Marc Valin
cf4e3a15a3
Bump DRED experimental version for 3e2a6b6 2024-02-22 16:19:27 -05:00
Timothy B. Terriberry
3e2a6b6253
Add signaling for a maximum DRED quantizer.
Since any value of dQ > 0 will cause the initial quantizer to
 degrade to the format-implied maximum (15) with a sufficient
 number of DRED frames, allow signaling a maximum smaller than 15.
This allows encoders to improve the minimum quality of long DRED
 sequences (at the expense of bitrate) without requiring a constant
 quantizer for all frames (dQ == 0).
2024-02-22 14:30:40 -05:00
Timothy B. Terriberry
2fff643776
Fix Doxygen warnings. 2024-02-22 14:30:40 -05:00
Timothy B. Terriberry
950d8bf158
Remove some dead code. 2024-02-22 04:55:29 -08:00
Timothy B. Terriberry
9cf12e92bb
Improve AVX2 compiler support detection.
Commit 735c40706f added uses of intrinsics that require at least
 gcc 9.0 (cf. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78782>),
 even though AVX2 support may appear to be available in earlier gcc
 versions.
We were not testing for this.
Update the compiler test in configure.ac to use these intrinsics
 explicitly, so it will error out and disable AVX2 if they are not
 available.
2024-02-22 04:53:04 -08:00
Jan Buethe
833688e65d
bit-exact overflow fixes in silk/arm/NSQ_del_dec_neon_intr.c 2024-02-21 17:27:54 +01:00
Jean-Marc Valin
57901a6758
opus_dred_parse() sets dred_end to 0 when no DRED
Also, fix documentation about return value of zero.
2024-02-20 20:54:13 -05:00
Jean-Marc Valin
6ac0c87112
Update weight-shrinking script 2024-02-20 17:49:13 -05:00
Jean-Marc Valin
d9d0e7292f
Fixes an aliasing bug in opus_packet_pad()
Trying to add padding in-place breaks when we have extensions,
which causes a memcpy() with overlapping data. Just doing a
copy instead.
2024-02-20 14:23:59 -05:00
Jean-Marc Valin
ecc10d835d
Add missing RESTORE_STACK in tests
Silences NONTHREADSAFE_PSEUDOSTACK warnings
2024-02-20 14:18:41 -05:00
Jean-Marc Valin
001820bbde
Fix NONTHREADSAFE_PSEUDOSTACK 2024-02-20 14:13:17 -05:00
Jean-Marc Valin
512e6270ea
Silences gcc warning
warning: expression does not compute the number of elements in this array
Seems like gcc thinks we're trying to get the number of elements in our
array or something like that. It then suggests adding parentheses to
silence the warning.
2024-02-20 14:11:57 -05:00
Jean-Marc Valin
b75bd48d82
Remove training whitespace 2024-02-18 16:36:04 -05:00
Jean-Marc Valin
5eeb576671 Instructions for reusing loss simulator 2024-02-18 13:57:18 -05:00
Jean-Marc Valin
393d463fdd
Add lossgen_demo
Also skip the first loss values being generated since they're
biased towards "not lost" due to the initialization.
2024-02-17 14:20:44 -05:00
Xavier Claessens
a97151d390
meson: Increase slow tests timeout
They timeout on GitHub actions because those runners are slower.
2024-02-16 18:18:35 -05:00
Giovanni Bajo
8894546bed
dump_modes: add missing file to build
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-16 17:46:06 -05:00
Chris Hold
5e0bb53e09
Map 2 extra channels in 5th order HOA
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-16 16:16:08 -05:00
Chris Hold
965afac29b
Provide 4th order HOA map 3 mixing and demixing
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-16 16:14:54 -05:00
Jan Buethe
befc25fb76
fixed compiler warning when building without dred 2024-02-16 18:51:29 +01:00
Jean-Marc Valin
db78df8c01
Delaying new DRED data when just out of silence
We don't need redundancy for the first active frame
since we already have the main Opus payload.
2024-02-16 03:00:45 -05:00
Jean-Marc Valin
c5117c5ccd
Add dred_end return value to opus_dred_parse() 2024-02-16 03:00:45 -05:00
Jean-Marc Valin
1f53f1e0a9
Support for extra offset
Allows us to exclude the most recent silence from DRED
2024-02-16 03:00:45 -05:00
Jean-Marc Valin
183a820212
Refactoring: store all states 2024-02-16 03:00:29 -05:00
Jean-Marc Valin
9f36bfc962
Chopping the oldest silence in a DRED payload 2024-02-16 03:00:29 -05:00
Jean-Marc Valin
9b1da1fb1f
Fix missing dotprod optimization
Use the neon version of silk_noise_shape_quantizer_short_prediction()
2024-02-15 18:05:07 -05:00
Jan Buethe
367a487e7c
hangover fix in osce/utils/pitch.py 2024-02-15 15:39:30 +01:00
Jan Buethe
46f9c9c669
re-dumped osce models with sparse=False 2024-02-15 15:30:04 +01:00
Jan Buethe
735117b6d7
disabled sparse option in osce export script 2024-02-15 15:25:06 +01:00
Chris Hold
ffd1b0b137
Provide 5th order HOA map 3 mixing and demixing
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-14 22:18:53 -05:00
Jean-Marc Valin
6be3673c22
More #ifdef around the dnn code 2024-02-14 17:35:29 -05:00
Jean-Marc Valin
901c8548af
Conditional include
Thanks to Igor Palaguta for reporting the issue.
https://github.com/xiph/opus/issues/313
2024-02-14 11:56:15 -05:00
Jan Buethe
dd0e2dc339
updated model 2024-02-14 10:37:15 +01:00
Jean-Marc Valin
4b9d9b0030
Fix check-asm for celt_fir_sse4_1() 2024-02-11 14:04:43 -05:00
Timothy B. Terriberry
3e69410e29
Fix OOB read in fixed-point NEON intrinsics.
xcorr_kernel_neon_fixed() read one more sample from y[] in the
 main loop than it needed to allow use of vector loads, but unlike
 the native asm in celt_pitch_xcorr_arm.s, the loop condition did
 not exit early enough to prevent this from overrunning the end of
 the array.
Additionally, the tail loop _always_ read one value beyond what it
 needed.

This patch fixes the loop condition on the main loop.
Since this makes the tail section run even for lengths that are a
 multiple of 8 (e.g., on fully half the multiplies for usages like
 celt_fir() or celt_iir() with an order of 16, which is common),
 rather than try to fix the tail loop, we replace it with a
 non-looping adaptation of the native asm, which continues to use
 vector loads as much as possible for the remaining elements (and
 also does not read ahead past the end of the y[] array).

Overall slowdown of test_opus_encode on a Raspberry Pi 5 Model B
 Rev 1.0 is 0.12% vs. 0.13% for fixing the existing tail loop.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-09 20:39:58 -05:00
Timothy B. Terriberry
d503125101
Add check-asm for fixed-point xcorr_kernel().
Compare the output of xcorr_kernel() against the results of
 xcorr_kernel_c() when configured with --enable-check-asm.
Currently this is only checked in fixed point, as a float check
 requires more sophisticated error analysis and may need to be
 customized for each vector implementation.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-09 20:39:58 -05:00
Jean-Marc Valin
65b131ec09
Add basic testing for Deep PLC, DRED, and OSCE
Still need more targeted tests, DRED decoding
2024-02-06 20:52:21 -05:00
Jean-Marc Valin
7070dfec4f
Make opus_packet_unpad() discard extensions too
Same for opus_multistream_packet_unpad()
2024-02-06 19:48:29 -05:00
Jean-Marc Valin
17922c2a28
Fix internal error on DRED
Forgot to account for padding length bytes when DRED payload is large.
2024-02-06 15:48:21 -05:00
Jean-Marc Valin
562587e91b
Avoid size-zero OPUS_COPY() with NULL pointer
Fails ubsan because memcpy declares args as non-null
2024-02-06 15:38:50 -05:00