[Pixman] Broken colours on big endian machines since b4a105d

Pekka Paalanen ppaalanen at gmail.com
Wed Dec 14 10:14:30 UTC 2022


On Wed, 14 Dec 2022 10:23:58 +0100
Jocelyn Falempe <jfalempe at redhat.com> wrote:

> On 14/12/2022 09:09, Pekka Paalanen wrote:
> > On Tue, 13 Dec 2022 15:08:41 -0500
> > Søren Sandmann <soren.sandmann at gmail.com> wrote:
> >   
> >> The commit in question is definitely broken and will cause wrong
> >> colors of scaled images on big-endian, but I'm not sure who can do
> >> anything about it these days.  
> > 
> > Let's at least add the mentioned author in CC here, like this.  
> 
> I'm sorry it breaks things for you.
> I've tested this on s390x big endian machine, and though that was the 
> right place to fix. But I'm not a pixman expert, so I'm probably wrong.
> 
> Which application are you using ? Does gnome-character has the right 
> colors for you ?
> 
> On s390x, most images in firefox are also color-inverted, but I wasn't 
> able to fix that.

These endianess problems are notorious, because there can be multiple
mistakes across several components, and two byte swaps cancel each
other out, meaning that an even number of mistakes along any single
path produces the expected result.

My feeling is that people always assume all other components are
already correct (starting from kernel drivers!) and then swap things in
their own components until things look right for them. Maybe Firefox
has bugs, or maybe some other library has bugs, or maybe Pixman has
bugs somewhere else. Two mistakes cancelling out each other is really
deceitful.

There can even be confusion about the meaning of pixel formats in
different APIs.

That makes finding the real culprit really challenging.


Thanks,
pq

> 
> Feel free to propose a revert.
> 
> Best regards,
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/pixman/attachments/20221214/09e7fec7/attachment.sig>


More information about the Pixman mailing list