Upstream qoi decoder seems fine if stream ends early, investigate
Opened this issue · 2 comments
amstan commented
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 commented
(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 commented
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?