Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does the 1-bit variant work? #47

Open
ElijahHamilton opened this issue May 27, 2024 · 3 comments
Open

How does the 1-bit variant work? #47

ElijahHamilton opened this issue May 27, 2024 · 3 comments

Comments

@ElijahHamilton
Copy link

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

@phoboslab
Copy link
Owner

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.

@ElijahHamilton
Copy link
Author

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

@phoboslab
Copy link
Owner

phoboslab commented May 28, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants