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

Upstream qoi decoder seems fine if stream ends early, investigate #1

Open
amstan opened this issue Apr 4, 2022 · 2 comments
Open

Comments

@amstan
Copy link
Owner

amstan commented Apr 4, 2022

How to reproduce:

  • Set QOI_FPGA_ENCODER_POST_CYCLES = 0 so verilator_shim does not compensate for this effect
  • perhaps comment out all ops in the verilog except QOI_OP_RGB, so it's more visible

Note how everything's shifted over by 1 cycle, so the last pixel is missing. How come the upstream decoder is still ok with this? How does it manage to make up the last 0xffffff on testcard.qoi?

@amstan
Copy link
Owner Author

amstan commented Apr 4, 2022

(Please excuse the extension change)
testcard_rgba.bad.qoi.txt
testcard_rgba.good.qoi.txt

md5sum testcard_rgba.* images/testcard_rgba.qoi
d6c9a6908a6e1829d20d96ceb06041af  testcard_rgba.bad.qoi.txt
c2f8f473c7634156ce15c4c69b8ae6c1  testcard_rgba.good.qoi.txt
c2f8f473c7634156ce15c4c69b8ae6c1  images/testcard_rgba.qoi

The .bad file was generated according to above instructions. Note how it decodes into the exact same .png file using the refenrece decoder.

@amstan
Copy link
Owner Author

amstan commented Apr 5, 2022

Heh, my new verilog based decoder produces a different .png hash for the .bad file. An image viewer doesn't really show any difference between the 2. It might be a transparent pixel?

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

No branches or pull requests

1 participant