diff options
author | wm4 <wm4@nowhere> | 2020-06-17 16:15:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-06-17 19:43:09 +0200 |
commit | 7d755020f3656a6b7d899a768743db33e700743f (patch) | |
tree | d6eaaef1586eca7d3bbd2c5c2a9904c07c4e374a /audio/chmap_sel.c | |
parent | 5e323333cf128bc159c3bac9e412ff8c6de41693 (diff) | |
download | mpv-7d755020f3656a6b7d899a768743db33e700743f.tar.bz2 mpv-7d755020f3656a6b7d899a768743db33e700743f.tar.xz |
img_format: fight ffmpeg pixdesc some more
This change attempts to fix detection of how endian swapping is to be
performed. Details can be found in the code comments.
It should not change anything, other than fixing handling of the
X2RGB10BE ffmpeg pixel format. This format was detected incorrectly, and
the component location metadata was discarded due to an internal
consistency check. With this commit, it is handled correctly. At first I
thought the X2RGB10BE ffmpeg pixdesc metadata was wrong, but it appears
to be correct. The problem with this format is that it's the first
packed RGB format that requires bit shift to access, and where the
endian word size is larger than the (rounded up) component size, all
while pixdesc would "require" you to perform 3 memory accesses (instead
of 1), and the code tries to reverse this.
It appears that trying to use the pixdesc metadata is much, much more
work than just duplicating it in a saner form. To be fair, most problems
are with big endian, and the mpv internal format does not care much
about endian _hosts_.
Diffstat (limited to 'audio/chmap_sel.c')
0 files changed, 0 insertions, 0 deletions