lossyWAV 1.1.0 released.
Reply #68 – 2008-07-26 20:19:36
I created four test samples containing white noise: 16-bit/48 kHz, 16-bit/96 kHz, 24-bit/48 kHz and 24-bit/96 kHz. Then I did a frequency analysis of the difference between the original and lossy conversions (default, shaping 0, shaping 0 + dither 1). I conclude three things:Dithering seems to have no benefit. It just adds noise on top of the existing quantization noise, thus increasing the noise floor. The bit-depth doesn't seem to matter. Noise shaping benefits from higher sample rates because the noise is moved even further into inaudible frequency ranges. Click here for a graphical comparison between 48 kHz and 96 kHz (portable preset). Thank you kind sir - it looks pretty good. So, are you more comfortable now having seen the results - I certainly am, thanks for the effort.So (2 ^ bits-to-remove) = 32 is the clipping error, which is 1/1024th of the target signal amplitude in this case, and represents a smaller error than 32 from the original signal (presumably between 16 and 31), where the target bits-to-remove would have generated a rounding error of 15 if it had 17 bits available to round upwards instead of having to round downwards. In this 5-bit case, this clipping error is equivalent to clipping caused by increasing gain by 0.0085 dB above full scale, which is very low-level, and might reassure other users (e.g. try amplifying a full-scale signal by 0.0085 dB and ABX the clipping distortion, which will exceed the distortion in lossyWAV [edit]when 5 bits are removed, that is[/edit]). The sample error adds energy at about -60dB relative to a full-scale sample in this case, which is only mildly indicative of what scale of event may happen in the frequency domain to which the ear responds. Things get more complicated with noise shaping in use, though presumably there's a feed-forward of accumulated error (like with error-diffusion dither in imaging) which enables the always-negative clipping adjustment to be offset by greater likelihood of positive shifts in following samples, and presumably the instantaneous clipping is likely to be incorporated into the high frequency end of the shaped noise unless there happen to be numerous successive clipped samples, which naturally means lower frequencies. As bits-to-remove increases, then the difference between what the sample should have been and the clipped sample increases accordingly. However if the bits-to-remove value is high then it is very likely that the audio in that codec-block channel is loud and the clipped sample may be obscured. It is worth saying again that at preset --standard, only one clip is allowed per channel per codec-block (22.7 micro-seconds.) and from testing, this does not seem to be audible.