aboutsummaryrefslogtreecommitdiffstats
path: root/utils/uhjdecoder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Handle pointer ownership a bit betterChris Robinson2023-12-291-1/+2
|
* Fix implicit widening after multiplicationChris Robinson2023-12-231-3/+3
|
* Remove DEF_NEWDELChris Robinson2023-12-161-3/+0
| | | | | 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.
* Much more clang-tidy cleanupChris Robinson2023-12-101-16/+16
|
* Use std::byte instead of a custom al::byteChris Robinson2023-05-041-27/+26
|
* Better handle span sources from iteratorsChris Robinson2022-12-141-2/+2
|
* Fix the UHJ decoder parameters in uhjdecoderChris Robinson2022-03-021-5/+5
|
* Rename Sqrt1_2 for consistencyChris Robinson2022-02-011-2/+2
|
* Get rid of MathDefsChris Robinson2022-01-271-1/+2
|
* Slight update to the UHJ coefficientsChris Robinson2021-11-281-33/+33
| | | | | | | 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.
* Use a higher quality all-pass for the UHJ utilsChris Robinson2021-07-301-7/+16
|
* Fix UHJ encoding/decoding factorsChris Robinson2021-04-111-1/+3
| | | | | | | | | | | Classic B-Format uses scaling factors W=1, X=sqrt(2), Y=sqrt(2), and Z=sqrt(2), which is +3dB louder than FuMa. The base factors are designed assuming classic scaling, so encoding a 0dBFS FuMa signal without accounting for this would result in the UHJ signal peaking at about -3dBFS. Similarly, decoding UHJ to FuMa B-Format would be +3dB louder than intended. So encoding needs to implicitly boost the signal by +3dB, and decoding needs to attenuate by -3dB.
* Remove some unnecessary includesChris Robinson2021-03-281-6/+0
|
* Move the UHJ phase shifter to a common headerChris Robinson2021-03-281-196/+31
|
* Add an option to change the UHJ decoder methodChris Robinson2021-03-261-27/+50
| | | | | | | | | | | | For 2-channel UHJ, two decoding equations are provided in the original paper. The alternative one is most often referenced for 2-channel UHJ decoding, but the original/general one can also be used by assuming T is fully attenuated (which the format allows for, as T can be variably attenuated by a factor between 0 and 1 to deal with an imperfect transmission medium). Neither method can be perfect for 2-channel UHJ, it's irrevocably lossy to the original source, but my subjective testing indicates the general equation produces less audibly errant results.
* Fix a comment typoChris Robinson2021-03-241-2/+2
|
* Update the UHJ decoding coefficientsChris Robinson2021-03-241-60/+66
|
* Add support for decoding 3- and 4-channel UHJ audioChris Robinson2021-03-211-32/+185
| | | | | | | There are no known file formats intended to support 3- and 4-channel UHJ, but it is possible to store them in various audio files when a player/decoder is aware of what it's dealing with. So there's no reason not to have it as an option.
* Don't assume two input channels in uhjdecoderChris Robinson2021-03-211-1/+1
|
* Add a utility to decode UHJ sound files to AMBChris Robinson2021-03-211-0/+515
Currently only supports 2-channel UHJ, and the produced .amb files shouldn't be played as normal B-Format (decoded 2-channel UHJ needs to use different shelf filters).