phoboslab/qoa

How does the 1-bit variant work?

Opened this issue · 3 comments

Hi, how does QOA work at 1-bit? Does it only store the residual at 1-bit? Or Something else?

Yes. It works similar to the other variants. Samples are divided into slices of 60. For each slice a 4-bit scalefactor and 60 1-bit residuals are stored. The 4-bit scalefactor and 1-bit residuals combined represent one of these values.

Wouldn't that give a bitrate of 8533.33333 bits/s?

For 8khz mono, yes.

I guess I misunderstood your initial question.

Does it only store the residual at 1-bit

So, no, the scalefactor for every slice of 60 samples is also stored. That means the effective bitrate is 1.0666 bits per sample (ignoring the overhead for file and frame headers).