diff options
author | wm4 <wm4@nowhere> | 2020-06-17 18:15:51 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-06-17 19:44:45 +0200 |
commit | fd9c570f222c30758296aae0b736fd85bbc4a9c4 (patch) | |
tree | 0a2c7e14dffe04870dde9ccb5d8ef5a1a8cc28d2 /waftools | |
parent | 1ffa83ea92f6413e5e74e31ccd47ed5ac49efd9f (diff) | |
download | mpv-fd9c570f222c30758296aae0b736fd85bbc4a9c4.tar.bz2 mpv-fd9c570f222c30758296aae0b736fd85bbc4a9c4.tar.xz |
video: some concessions to big endian hosts
The recent changes to the image format metadata broke big endian, and
that was intentional. Some things are inherent to little endian (like
the idea to coalesce bit and byte offsets into a single bit offset), and
they don't be fixed. But some obvious things can be fixed, such as
marking LE vs. BE formats the right way around on BE hosts.
The metadata is formally still in LE, except that if the LE/BE flag
matches the host endian, the host endian can be used when accessing
packed formats with bit shifts, or when computing byte aligned component
byte offsets. The former may work because formats with LE/BE variants
use the same bit offsets after byte swapping, the latter may work
because little endian is the natural concept for addressing memory. But
it will "subtly" fail to do the right thing in some cases, and code
using this can't know, so have fun.
Many things are broken, but this makes e.g. vo_gpu mostly work.
My general opinion about BE computers is that you should get a better
computer, you can get one for free from any garbage dump.
Diffstat (limited to 'waftools')
0 files changed, 0 insertions, 0 deletions