Support randomizing phase as well as magnitude#33
Open
dpw13 wants to merge 3 commits into
Open
Conversation
* Properly normalize FFT results using sqrt(1/N) to match IDCT behavior * Remove multi-threading * Remove LargeArray functionality
Owner
|
Do you have evidence that this results in a measurable improvement? I think IDCT() and IFFT() are equivalently able to produce real-valued noise, so you'll have to convince me why adding complex numbers is better. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the option to use an IFFT with randomized phase and magnitude instead of the IDCT with only randomized magnitude. This is important for a number of signal processing reasons, but perceptually this helps reduce the tonal resonance caused by the consistently aligned phase of each component sinusoid generated by the IDCT. From a technical perspective, randomizing the phase of each frequency component between blocks results in more uniform noise in the output.
This change also increases the resolution in the randomized magnitude for the IDCT, using 16 bits of entropy for the magnitude for both the IDCT and IFFT and using 16 bits of entropy for the phase of the IFFT. This more closely matches the dynamic range capacity of the output, ensuring minimal similarity between neighboring blocks which should also reduce the tonal resonance perceptible in the output.