Is it possible to exchange Speex SRC with SoX SRC in Opus 1.2?
... because Xiph's devs decided to use not fully accurate resampler
Why is opusenc using Speex resampler? Why not SoX?
because Xiph's devs decided to use not fully accurate resampler
I know that SoX is quite fast, but Speex should be even faster
Speex resampler is transparent. https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Faudiophilesoft.ru%2Fpubl%2Fmy%2Ffoo_resamplers%2F11-1-0-34&edit-text=
Quote from: ziemek.z on 15 February, 2017, 12:19:01 PMI know that SoX is quite fast, but Speex should be even fasterActually no, speex resampler is slower.
Some comparisons of resamplers http://src.infinitewave.ca/
Quote from: IgorC on 15 February, 2017, 03:10:17 PMSome comparisons of resamplers http://src.infinitewave.ca/I've seen that page before and I found out RIGHT THERE that Speex resampled isn't as perfect as SoX. Attached screenshot as proof.
So why not include resampler which is both accurate and fast? Why include something slower and not perfect?
Question for Opus devs: is it possible to exchange Speex Resampler's sources with SoX Resampler's ones before compiling the code?
If you look at the legend, you'll see that the absolutely horrible artefacts caused by the Speex resampler have an amplitude of around -140 dB.
If you look at the legend, you'll see that the absolutely horrible artefacts caused by the Speex resampler have an amplitude of around -140 dB. Rather than involve TOS 8, I will just make the following recommendation: If you can hear the artefacts caused by the Speex resampler, then you really should not be using a lossy codec. I will actually add that you *also* shouldn't be using 16-bit audio (hence CDs) because the -96 dB noise floor it causes is about 40 dB worse than the awful resampling artefacts you're pointing out.
This.Here are some screenshots based on 24-bit flac input, and the audio files.
As one can see, the output is 48Khz, but it has a filter at 20Khz. In both, the 44Khz resampled and the 48Khz, there's some problem when the audio is above 20Khz, affecting the whole spectrum range (seconds 9 to 9.5 in 44Khz, and seconds 9 to 10 in 48Khz).I'm not sure why it affects less to the 44Khz one. Maybe the filter is on decoding? or in some place after some analyses?
Mmm... there's something from the Sweep2448Opus.png that is making me wonder if there isn't an error somehow in the codec. Not on the resampler part, but on the filter part. (or maybe in the reconstruction part, don't know...)
I'm not sure why it affects less to the 44Khz one. Maybe the filter is on decoding? or in some place after some analyses?
Opus does not code any frequencies above 20 kHz because that's how far the human hearing goes (and even then very few people hear up to 20 kHz). As for all the ugly stuff you see at lower frequencies when the signal goes above 20 kHz... keep in mind that it corresponds to an amplitude of -120 dB to -140 dB, i.e. totally inaudible. That's the problem when you show a spectrogram with 180 dB of dynamic range -- most of what you see cannot possibly be audible (and most of the rest also isn't but because of masking). Just like you aren't listening to images, you shouldn't be looking at audio clips (spectrograms) to determine quality. At best a spectrogram can be useful as a way to identify an artefact you've already heard, but that's about it.
Just like you aren't listening to images, you shouldn't be looking at audio clips (spectrograms) to determine quality.
I think it's a great example of why you shouldn't use spectrograms to compare lossy codecs.
Probably what you are seeing is the resampling from 44.1k->48k attenuating additional high frequency energy, less of which is then left over to alias into lower frequencies during coding. Basically the resampler is a type of lowpass filter.
It would seem illogical to have a bad implementation of something, to know it, to know an easy fix, and not fix it just because it's "good enough".
I didn't think about that, but it makes sense, a soft rollout filter that partially filters the 21 to 22Khz range, indeed. But then, this is a proof of what I've just said above, the 20Khz filter is of less quality than the 22Khz filter at the resampler.
What I see is that this whole topic would have been avoided if OPUS simply supported 44.100Hz audio without the need of resampling.
I feel like it's a matter of time until it eventually gets supported (officially or not).
The less layers of change applied to the source the better outcome to the final product (audible or not), with less doubts and need for research.
Opus uses fixed power of 2 sampling rates. That is not possible to change without making a new codec, officially or otherwise. So no, it is not going to change.
This is foolish. The point of a codec is produce high quality audio, not avoid the need for you to worry about imaginary problems.
Quote from: saratoga on 23 May, 2017, 01:17:24 PMOpus uses fixed power of 2 sampling rates. That is not possible to change without making a new codec, officially or otherwise. So no, it is not going to change.Yeah right,
I have seen similar stuff being said about countless situations of "this is not going to happen because..." and sooner or later, most often after some backlash, it did happen.
Quote from: saratoga on 23 May, 2017, 01:17:24 PMThis is foolish. The point of a codec is produce high quality audio, not avoid the need for you to worry about imaginary problems. Foolish is to be passive agressive when you can't do constructive criticism.
Even more, there is no forum TOS that will restrict people posting similar stuff because it goes against the whole nature of forums.