Closed mhermier closed 2 years ago
Hi, I was toying with the spec to implement an encoder and it says: https://github.com/phoboslab/qoi/blob/a27f8ed4593ffad272b70030bf1ef3010d0803e1/qoi.h#L169-L177
Unless I'm mistaken, the dr_dg and db_dg indicates that the difference of colors is made using last_px (which should maybe be renamed as prev_px for clarity) minus cur_px, but in the reference implementation we can see that it seems to be the other way around: https://github.com/phoboslab/qoi/blob/a27f8ed4593ffad272b70030bf1ef3010d0803e1/qoi.h#L460-L465
dr_dg
db_dg
last_px
prev_px
cur_px
That is rather unfortunate. At least the wording was correct ("difference from the previous pixel"). I hope nobody followed that example verbatim...
Thanks for the notice!
Hi, I was toying with the spec to implement an encoder and it says: https://github.com/phoboslab/qoi/blob/a27f8ed4593ffad272b70030bf1ef3010d0803e1/qoi.h#L169-L177
Unless I'm mistaken, the
dr_dg
anddb_dg
indicates that the difference of colors is made usinglast_px
(which should maybe be renamed asprev_px
for clarity) minuscur_px
, but in the reference implementation we can see that it seems to be the other way around: https://github.com/phoboslab/qoi/blob/a27f8ed4593ffad272b70030bf1ef3010d0803e1/qoi.h#L460-L465