Skip to main content
Topic: Opus frequency notching at 15.5 kHz (Read 1985 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Opus frequency notching at 15.5 kHz

Using Opus 1.2.1 and 1.3beta I notice that there is a notch between about 15.5 kHz and about 16.5 kHz that is attenuated by up to -3.8dB from the original source. This effect remains until using a bitrate >= 144 kbps. I can't say it's audible to me, but my hearing sucks above 16 kHz. It seems like cutting the volume of 15.5 kHz frequencies in half would be fairly audible to sensitive ears.

This graph was made from Adobe Audition CS6 frequency analysis of the track "Flora's Secret" by Enya. The orange line is the average volume level at each frequency of the source WAV and the blue line is a 96 kbps Opus decoded by opusdec 1.2.1. See the notch at 15.5 kHz. You can also see frequencies above 17 kHz appear boosted over the original. It's as if the line of the original between 15.5 kHz and 19.5 kHz was tilted to the left.



Is this effect by design, or at least a known and accepted side effect of "folding" bands?

Re: Opus frequency notching at 15.5 kHz

Reply #1
It seems like cutting the volume of 15.5 kHz frequencies in half would be fairly audible to sensitive ears.
One might think...


...or not.

https://hydrogenaud.io/index.php/topic,3974.html#post_tos8

I see no point in Opus developers catering to those who listen with their eyes.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

Re: Opus frequency notching at 15.5 kHz

Reply #2
That's just a ~15.5 khz lowpass filter. There is no "notch".

Re: Opus frequency notching at 15.5 kHz

Reply #3
If you look at his graph, you'll see that the Opus file has a slight notch of less than 5 dB between 15.5kHz and 16.5kHz, and then goes up to match the source material again. It doesn't really have any further low pass filtering until it hits 20kHz.

Not that this is a fair comparison of how a codec works. The notch is also less than -75dB, so it would take some seriously sensitive equipment to pick out just that difference over any other differences in the signal.

Re: Opus frequency notching at 15.5 kHz

Reply #4
I don't see any notch. I see a 15.5 khz roll off followed by some high frequency enery that doesn't track the source file (noise shaping perhaps?).

Re: Opus frequency notching at 15.5 kHz

Reply #5
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency. The encoder *could* code that band better, but it would require many bits (taken from lower frequencies) and the result would likely be worse.

Re: Opus frequency notching at 15.5 kHz

Reply #6
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency. The encoder *could* code that band better, but it would require many bits (taken from lower frequencies) and the result would likely be worse.

Thanks jmvalin, very interesting.  Purely for curiousity's sake, is there an approximate scale of encoded bitrate vs. frequency that the "making stuff up" process kicks in?  Not trying to rock the boat, not for MY ears at any rate, just curious.  Thank you for Opus.

Re: Opus frequency notching at 15.5 kHz

Reply #7
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency. The encoder *could* code that band better, but it would require many bits (taken from lower frequencies) and the result would likely be worse.

Thank you. I wasn't trying to "listen with my eyes" as I mentioned that my hearing above 16 kHz sucks and I can't ABX the 96 kbps Opus file. This was just to try and understand how the codec is working, and to see if I could investigate why some golden ears can ABX Opus up to 160 kbps. Seeing that roll off at 15.5 kHz got me to wondering because it looks like the energy "saved" by that roll off is more than offset by the extra energy between about 17 kHz and 19.5 kHz, where the Opus file has more energy than the source. My rudimentary knowledge had me thinking that if that extra energy could be used to keep the energy between 15.5 kHz and 17 kHz similar to the source material, it might make it more difficult for golden ears to ABX Opus at this bitrate and above. However, that's assuming the relative energy of various frequency bands is what they're hearing. It could be other effects.

Re: Opus frequency notching at 15.5 kHz

Reply #8
Note that Opus splits audio into frequency bands and distributes bits along those. I imagine those bands to be "buckets" that bits can be allocated to.

The complete range from 15600 to 20000 Hz is coded in one "bucket" - band 20 to be more precise (c.f. table 55 in https://tools.ietf.org/html/rfc6716). Apparently the psychoacoustic model in Opus determined that while some energy is needed in this band, the detailed structure wasn't of high importance compared to the other bands. Thus the band was filled  somewhat uniformly, which is why things from 15600 to 20000 Hz look somewhat flat.


Re: Opus frequency notching at 15.5 kHz

Reply #9
Note that Opus splits audio into frequency bands and distributes bits along those. I imagine those bands to be "buckets" that bits can be allocated to.

The complete range from 15600 to 20000 Hz is coded in one "bucket" - band 20 to be more precise (c.f. table 55 in https://tools.ietf.org/html/rfc6716). Apparently the psychoacoustic model in Opus determined that while some energy is needed in this band, the detailed structure wasn't of high importance compared to the other bands. Thus the band was filled  somewhat uniformly, which is why things from 15600 to 20000 Hz look somewhat flat.
"9600 Hz |   12000 Hz"
That explains why 24000 Hz is better than 22050 Hz (sample rate) for low bitrates.

Re: Opus frequency notching at 15.5 kHz

Reply #10
"9600 Hz |   12000 Hz"
That explains why 24000 Hz is better than 22050 Hz (sample rate) for low bitrates.

Opus doesn't even support 22050 Hz sampling rate. 

Re: Opus frequency notching at 15.5 kHz

Reply #11
Opus doesn't even support 22050 Hz sampling rate.

I was talking about lossless files with those sampling rates converted to Opus. I downsampled a 44100 Hz mono WAV to a few different sampling rates then converted them to Opus (among other codecs) at various bitrates and noticed that while 24kbps Opus sounded OK for the bitrate on the 22050 Hz file, the "filling in" effect made it sound a lot worse than the 24000 Hz file. This flaw disappears around 32kbps.

Re: Opus frequency notching at 15.5 kHz

Reply #12
Opus doesn't even support 22050 Hz sampling rate.

I was talking about lossless files with those sampling rates converted to Opus. I downsampled a 44100 Hz mono WAV to a few different sampling rates then converted them to Opus (among other codecs) at various bitrates and noticed that while 24kbps Opus sounded OK for the bitrate on the 22050 Hz file, the "filling in" effect made it sound a lot worse than the 24000 Hz file.

Since opus doesn't support 22050Hz, you're actually comparing 44100->22050->24000 (probably) to 44100->24000.  The latter sounds better because the conversion to 22050 will not be transparent. 

Re: Opus frequency notching at 15.5 kHz

Reply #13
Since opus doesn't support 22050Hz, you're actually comparing 44100->22050->24000 (probably) to 44100->24000.  The latter sounds better because the conversion to 22050 will not be transparent. 

This is confusing. I thought opus only supports 48khz.

Did you mean "44100->22050->48000" and "44100->48000"?


Re: Opus frequency notching at 15.5 kHz

Reply #15
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency.

Is it "intentional" as in perceptual noise substitution, or a side effect of other optimization?
Memento: this is Hydrogenaudio. Do not assume good faith.

Re: Opus frequency notching at 15.5 kHz

Reply #16
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency.
Is it "intentional" as in perceptual noise substitution, or a side effect of other optimization?

And, is there an encoding bitrate above which that behaviour intentionally ceases, or is there always a plateau of some sort at which the "generalizing" technique begins?

Re: Opus frequency notching at 15.5 kHz

Reply #17
I'm not Opus dev but I can answer this questions :)
The behaviour is simply due to Opus "making stuff up" above 15.6 kHz at that bitrate. This saves many bits that can be used to make the encoded file sound better and it's hard to hear the difference because the ear isn't very sensitive at that frequency.

Is it "intentional" as in perceptual noise substitution, or a side effect of other optimization?

It's band folding which is similar to SBR and  it's intentional. While band folding is simpler than SBR it scales much better with high bitrate because it's applied only on frequencies bands for which there are no bits to spend.  In comparison HE-AAC's SBR  is applied roughly on a half of frequency range (that's why it's doesn't scale to high bitrates).

And, is there an encoding bitrate above which that behaviour intentionally ceases, or is there always a plateau of some sort at which the "generalizing" technique begins?
I beleive it's used up to somewhere 160 kbps. You can check it by encoding to Opus to different bitrates and see if HF is copy-paste of LF. Anyway human hearing isn't very sensible to "details" in high frequency range. I can say that I percieve high frequency more as loudness (energy) than as details.  That's why band folding works good.

 
SimplePortal 1.0.0 RC1 © 2008-2018