gfxdisp / ColorVideoVDP

Colour video VDP
MIT License
29 stars 6 forks source link

PU21 parameters mismatch #13

Closed codenobug1 closed 4 months ago

codenobug1 commented 4 months ago

In the code in utils.py I saw there are different types to convert linear luminance values to the PU sace. The parameters in this code are like this: if type == 'banding': self.p = [1.063020987, 0.4200327408, 0.1666005322, 0.2817030548, 1.029472678, 1.119265011, 502.1303377] elif type == 'banding_glare': self.p = [234.0235618, 216.9339286, 0.0001091864237, 0.893206924, 0.06733984121, 1.444718567, 567.6315065]; elif type == 'peaks': self.p = [1.057454135, 0.6234292574, 0.3060331179, 0.3702234502, 1.116868695, 1.109926637, 391.3707005]; elif type == 'peaks_glare': self.p = [1.374063733, 0.3160810744, 0.1350497609, 0.510558148, 1.049265455, 1.404963498, 427.3579761]; but these parameters are different with the code in https://github.com/gfxdisp/pu21/blob/main/matlab/pu21_encoder.m, in which the parameters are: case 'banding' obj.par = [1.070275272, 0.4088273932, 0.153224308, 0.2520326168, 1.063512885, 1.14115047, 521.4527484]; case 'banding_glare' obj.par = [0.353487901, 0.3734658629, 8.277049286e-05, 0.9062562627, 0.09150303166, 0.9099517204, 596.3148142]; case 'peaks' obj.par = [1.043882782, 0.6459495343, 0.3194584211, 0.374025247, 1.114783422, 1.095360363, 384.9217577]; case 'peaks_glare' obj.par = [816.885024, 1479.463946, 0.001253215609, 0.9329636822, 0.06746643971, 1.573435413, 419.6006374];

So what's the difference between these 2 codes? in the Other metrics, you said you used the PU21 code.

mantiuk commented 4 months ago

This should be fixed now (commit #59a79b1)