23 Commits

Author SHA1 Message Date
Chris Robinson
4f32de7daf Pass small trivially-copyable types by value 2024-05-12 05:18:36 -07:00
Chris Robinson
1b03e21ca1 Avoid declaring some "C-style arrays" 2024-05-07 20:26:13 -07:00
Chris Robinson
5979f18f6e Process 4 samples at a time in PhaseShifterT::process
For SSE only for now. I'm not sure yet how to do it efficiently for NEON.
2024-03-27 21:58:17 -07:00
Chris Robinson
d000c0b1e9 Use the proper size for the spans in uhjencoder 2024-03-27 21:22:32 -07:00
Chris Robinson
3d4f537559 Support mono input files in uhjencoder 2024-03-27 20:36:26 -07:00
Chris Robinson
ed33eb1bbf Fix uhjencoder's fallback channel IDs 2024-03-24 00:46:13 -07:00
Chris Robinson
a8ead85ad9 Avoid raw pointers in uhjdecoder/uhjencoder 2024-03-20 23:05:01 -07:00
Chris Robinson
8e2d9bc1d0 Replace some loops with any_of/all_of 2024-01-29 21:29:10 -08:00
Chris Robinson
4720b2c64d Fix implicit widening after multiplication 2023-12-23 03:07:57 -08:00
Chris Robinson
bc83c874ff Remove DEF_NEWDEL
C++17 provides alignment-aware allocators for us, so we don't need to use our
own to make sure classes/structs are properly aligned.
2023-12-16 17:48:33 -08:00
Chris Robinson
bb3387b0fc Much more clang-tidy cleanup 2023-12-10 22:15:17 -08:00
Chris Robinson
ddba302bb0 Fix WFX channel matching in uhjencoder 2023-10-16 13:05:29 -07:00
Chris Robinson
6752d5516c Use cinttypes instead of inttypes.h in C++ 2023-06-01 19:05:57 -07:00
Chris Robinson
bfe766cd57 Use some more standard functions 2023-05-05 13:50:16 -07:00
Rosen Penev
0526ecd2f9 clang-tidy cleanups (#800)
* clang-tidy: use bool literals

Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: replace std::bind with lambdas

Found with modernize-avoid-bind

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: use data() instead of pointer stuff

Found with readability-container-data-pointe

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: use empty()

Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove static in anon namespace

Found with readability-static-definition-in-anonymous-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: remove const return

Found with readability-const-return-type

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-15 13:43:27 -08:00
Chris Robinson
a96d9c9c1d Support different input channel orders in uhjencoder 2022-11-04 20:22:13 -07:00
Chris Robinson
2c5476ea24 Use the correct input for the IIR UHJ encoder
Also better detail the IIR implementation.
2022-10-26 17:15:09 -07:00
Chris Robinson
18d1c73a86 Avoid a duplicate all-pass function that accumulates 2022-10-22 06:28:18 -07:00
Chris Robinson
9ba489360c Add options to encode 3- and 4-channel UHJ to uhjencoder
The generated files won't play correctly if the player doesn't know they're 3-
and 4-channel UHJ (the third and fourth channels must be ignored, or decoded,
for playback). This is largely just for completion's sake, just in case someone
has a use for it.
2022-02-04 18:05:25 -08:00
Chris Robinson
619249371a Remove math_defs.h 2022-01-27 04:04:41 -08:00
Chris Robinson
a73b64ce3c Slight update to the UHJ coefficients
The extended precision of the encoder's 0.6512*X term was guesswork, with no
real basis for it. Switch back to the original value until something better
actually comes up. Also updates the decoder to account for the change in the
encoder.
2021-11-28 05:39:35 -08:00
Chris Robinson
47c20b283e Use a higher quality all-pass for the UHJ utils 2021-07-30 08:08:16 -07:00
Chris Robinson
955fdebcad Add a utility to encode audio files to UHJ 2021-07-09 09:04:07 -07:00