HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: 145dBSPL on 2012-10-13 11:53:44

Title: Flaws in recent Opus codec?
Post by: 145dBSPL on 2012-10-13 11:53:44
Hi everybody,

this is my first post here, even if i read this forum for a quite long time already.

Recently i did some testing on the Opus codec an found a strange behaviour.
I encoded a file with the official 0.1.5 binaries and had a look the frequency response.
Knowing that judging quality with this is useless, i discovered a ~1000Hz /-3dB drop
around 16 kHz which is not present e.g. in Ogg encoded files.

This lead me to encode/decode a linear sweep for comparison and this finally showed
a really messed up response for the Opus encoded sweep in the HF region.
I am not quite sure if it is encoder or decoder related.
For decoding i used the official opusdec and the foobar built-in one.

Opus music sample:
(http://imageshack.us/a/img338/1803/opus015.png)

Oggvorbis music sample:
(http://imageshack.us/a/img196/2014/ogg133.png)

Opus linear sweep:
(http://imageshack.us/a/img7/9789/opus015sweep.png)

Oggvorbis linear sweep:
(http://imageshack.us/a/img259/2804/ogg133sweep.png)

What do you think? Could someone try to replicate or has this been
noticed already?

Thank you.
Cheers!
Title: Flaws in recent Opus codec?
Post by: Dynamic on 2012-10-13 16:58:57
Welcome to the forums.

Interesting. I also note that in the music sample it's a notch cut, and in the sweep it's raised (or was the decoder was different each time as you said you used opusdec and foobar2000). If this is a bug, it's unlikely to have been picked up in listening tests, as many or most listeners struggle to identify at 16kHz low-pass filter in real music so would probably fail to notice a 3 dB variation at 16 kHz too. Nonetheless, it's potentially a sign of a bug.

Can I ask what target bitrate you specified in opusenc? It could help to get to the bottom of it.
Title: Flaws in recent Opus codec?
Post by: 145dBSPL on 2012-10-13 17:45:53
Hi Dynamic,

thank you.

Yes, i forgot to mention the settings.
Opus 0.1.5 and Oggenc2.87 (libVorbis v1.3.3) with following switches
<opusenc --bitrate 128> and <oggenc -q 4> is what i used.
So nothing special.

Both decoders showed the same behavior.
Foobar decoder was used finally.

Sweep was generated as a 10 seconds .wav with 16 bit / 44,1 kHz and -10dB gain.

Regards
Title: Flaws in recent Opus codec?
Post by: ExUser on 2012-10-13 19:16:30
The big question now is: Can you actually hear the difference?
Title: Flaws in recent Opus codec?
Post by: 145dBSPL on 2012-10-13 19:58:55
In case of the music sample - this is a question i can not answer right now
as my focus was not set on this yet. I just discovered a behaviour which i
think is not correct.

The sweep sounds terrible. It starts with heavy distortions quite early
from ~10kHz on as it also can be seen in the wavy response graphics.
Title: Flaws in recent Opus codec?
Post by: saratoga on 2012-10-13 20:13:38
Does the sweep sound any different if you use 48k as the sampling rate ?
Title: Flaws in recent Opus codec?
Post by: 145dBSPL on 2012-10-13 20:29:06
Just did a quick test with a 48kHz sweep and both decoders.
It looks and sounds similar/identical.
Title: Flaws in recent Opus codec?
Post by: ExUser on 2012-10-13 20:43:22
To disambiguate, the problem still exists at 48kHz?
Title: Flaws in recent Opus codec?
Post by: 145dBSPL on 2012-10-14 12:26:43
Yes, i can confirm that it also exists on decoded 48kHz sweep
with <SAMPLERATE_ORIGINAL> : 48000 stated in the Opus file.
Title: Flaws in recent Opus codec?
Post by: romor on 2012-10-16 14:40:03
I noticed similar, maybe same "issue" which I guess it's just opus temperament feature

With any bitrate method,
- at 128 kbps, if I downmix opus file to mono (overlap channels), around 16 kHz there is visible boundary region (maybe related to OP observation)
- at 96 kbps larger low density strip is visible in ~ 12-16 kHz range:

(http://i.imgur.com/vEfbxt.png) (http://i.imgur.com/vEfbx.png)

- at 80 kbps there are two large strips
etc

I tested with both opusdec file (44.1k) and opus decoded from foobar (48k).
This "signature" was present on all (10) test files in larger/smaller amount then in example screenshot
Title: Flaws in recent Opus codec?
Post by: Speckmade on 2013-01-25 22:35:53
145dBSPL, romor: Do your spectrograms show the mono downmix of a stereo Opus file? If so, are the graphs for only one of the stereo channels alright?

Maybe I recognise the phenomenon.