opus icon indicating copy to clipboard operation
opus copied to clipboard

Support for custom modes with 50 sample framesize

Open smatt123 opened this issue 3 years ago • 3 comments

Hi,

I use OPUS for its very low coding delay. The delay at 100 sample framesize (at 48kHz) is already great, but I noticed that the OPUS custom interface allows to set an even smaller framesize of 50 samples.

However, when using a framesize of 50 samples, the codec fails to work properly (lots of distortion, and I don't think it is due to insufficient bitrate).

Thus my question, should a framesize of 50 samples work in principle? Or is 100 samples the minimum supported framesize and the option to select 50 with the OPUS custom interface is a bug?

Regards, Steffen

smatt123 avatar Nov 15 '21 09:11 smatt123

It should, although that's just about touching the absolute minimum of 48 samples (at 48kHz) and custom's always only received cursory testing. Does it change noticeably at 48, perhaps? Or is it more of a linear quality ramp up to sounding OK at 100 samples?

silverbacknet avatar Nov 15 '21 12:11 silverbacknet

Thanks for your reply. Based on your input I rechecked my test again. When I increase the bitrate significantly when switching from a frame size of 100 to 50, the result appears to be fine.

So it is likely that the issue I observed is just a significant reduction in coding efficiency (roughly by a factor of 2) when moving from a framesize of 100 to 50 as probably frequency resolution suffers to much.

I will do another test at a framesize of 48 to compare to 50 to make sure it is not just occuring at that particular configuration.

smatt123 avatar Nov 16 '21 10:11 smatt123

With a framesize of 48 (and also 64) I can observe similar low quality. On closer inspection I noticed that some parts of the codec, such as the pitch prefilter, are disabled if the available packet size is smaller than 13 bytes (even though bitrate at this small framesize is still around 90kpbs).

I guess framesizes < 100 samples were simply not taken much into account when optimizing the parameters of the codec - which of course is understandable given the typical use cases. So I would suggest to close the issue.

smatt123 avatar Nov 19 '21 13:11 smatt123