summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-10 17:57:01 +0100
committerwm4 <wm4@nowhere>2020-02-10 17:57:01 +0100
commita9116ddd3841ddc1d644e302a9f732cac2675d6d (patch)
tree376b3ecefead7ee1745a60fb5de0a392c9469cc2 /DOCS
parentc31661466b8a7efcad418a0ba49f632ea035b2e4 (diff)
downloadmpv-a9116ddd3841ddc1d644e302a9f732cac2675d6d.tar.bz2
mpv-a9116ddd3841ddc1d644e302a9f732cac2675d6d.tar.xz
zimg: support gray/alpha conversion
The special thing about this format is 1. mpv assigns the component ID 4 to alpha, and component IDs 2 and 3 are not present, which causes some messy details. 2. zimg always wants the alpha plane as plane 3, and plane 1 and 2 are not present, while FFmpeg/mpv put the alpha plane as plane 1. In theory, 2. could be avoided, since FFmpeg actually doesn't have a any 2 plane formats (alpha is either packed, or plane 3). But having to skip "empty" planes would break expectations. zplanes is not equivalent to the mpv plane count (actually it was always used this way), while zimg does not really have a plane count, but does, in this case, only use plane 0 and 3, while 2 and 3 are unused and unset. z_planes[] (not zplanes) is now always valid for all 4 array entries (because it uses zimg indexes), but a -1 entry means it's an unused plane. I wonder if these conventions taken by mpv/zimg are not just causing extra work. Maybe component IDs should just be indexes by the "natural" order (e.g. R-G-B-A, Y-U-V-A, Y-A), and alpha should be represented as a field that specifies the component ID for it, or just strictly assume that 2/4 component formats always use the last component for alpha.
Diffstat (limited to 'DOCS')
0 files changed, 0 insertions, 0 deletions