I also want to point out (beyond issue #214) that the test suite as it is now is totally insufficient, because it does not catch even the most severe errors like JPEGs not parsing correctly at all. That makes it difficult to contribute performance fixes like #215 with confidence.
This should fix the regression from https://github.com/Twinside/Juicy.Pixels/pull/215#issuecomment-1339068368.
I made a couple mistakes there.
I improved the equivalence test (which was not correct), and further confirmed it against the old implementation in my separate branch
jpeg-parsing-fixes-2-investigation
with commit https://github.com/Twinside/Juicy.Pixels/commit/054d76bac8b92c30210057b9d785cb33fa821f2c.I also want to point out (beyond issue #214) that the test suite as it is now is totally insufficient, because it does not catch even the most severe errors like JPEGs not parsing correctly at all. That makes it difficult to contribute performance fixes like #215 with confidence.