Closed hrj closed 8 years ago
I am trying to create a lossy optimiser for FLIF. It works by modifying the source image such that mis-predictions are reduced.
However, the current YIQ transform in FLIF is not local. The 4*par factor, where par = max/4 is dependent on global values.
4*par
par = max/4
The other source of non-local effects is the grey value used in the predict function, where grey = (min + max) / 2.
grey
grey = (min + max) / 2
:one: shouldn't affect compression. :two: might affect compression (probably for the better).
I have a working POC for :one:. Will test and make a PR soon.
Sounds good! Getting rid of grey is a good idea (especially because it's currently a global variable).
Both :one: and :two: are done!
Motivation
I am trying to create a lossy optimiser for FLIF. It works by modifying the source image such that mis-predictions are reduced.
However, the current YIQ transform in FLIF is not local. The
4*par
factor, wherepar = max/4
is dependent on global values.The other source of non-local effects is the
grey
value used in the predict function, wheregrey = (min + max) / 2
.Proposal
4*par
factor in YIQ transform. This will essentially make I and Q values signed.grey
in predict.:one: shouldn't affect compression. :two: might affect compression (probably for the better).
I have a working POC for :one:. Will test and make a PR soon.