summaryrefslogtreecommitdiffstats
path: root/sub/osd.h
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2022-01-11 21:03:27 +0100
committerJan Ekström <jeebjp@gmail.com>2022-01-11 23:45:08 +0200
commit9e2c0b8baa3f9ccba997129a1c1023f61611e4dd (patch)
treefff3693f77deeef422f91fb817c028ef54f76e63 /sub/osd.h
parent429402cb087f3a052cb9645af1e42156fd413c6c (diff)
downloadmpv-9e2c0b8baa3f9ccba997129a1c1023f61611e4dd.tar.bz2
mpv-9e2c0b8baa3f9ccba997129a1c1023f61611e4dd.tar.xz
sub: rename SUBBITMAP_RGBA to SUBBITMAP_BGRA
This was a misnomer, the actual channel order is IMGFMT_BGRA (as the comment explicitly point out). Rename the enum for consistency.
Diffstat (limited to 'sub/osd.h')
-rw-r--r--sub/osd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sub/osd.h b/sub/osd.h
index 9b680b8bf8..168f86320e 100644
--- a/sub/osd.h
+++ b/sub/osd.h
@@ -24,11 +24,11 @@
#include "options/m_option.h"
-// NOTE: VOs must support at least SUBBITMAP_RGBA.
+// NOTE: VOs must support at least SUBBITMAP_BGRA.
enum sub_bitmap_format {
SUBBITMAP_EMPTY = 0,// no bitmaps; always has num_parts==0
SUBBITMAP_LIBASS, // A8, with a per-surface blend color (libass.color)
- SUBBITMAP_RGBA, // IMGFMT_BGRA (MSB=A, LSB=B), scaled, premultiplied alpha
+ SUBBITMAP_BGRA, // IMGFMT_BGRA (MSB=A, LSB=B), scaled, premultiplied alpha
SUBBITMAP_COUNT
};
@@ -64,7 +64,7 @@ struct sub_bitmaps {
// Packed representation of the bitmap data. If non-NULL, then the
// parts[].bitmap pointer points into the image data here (and stride will
// correspond to packed->stride[0]).
- // SUBBITMAP_RGBA: IMGFMT_BGRA (exact match)
+ // SUBBITMAP_BGRA: IMGFMT_BGRA (exact match)
// SUBBITMAP_LIBASS: IMGFMT_Y8 (not the same, but compatible layout)
// Other formats have this set to NULL.
struct mp_image *packed;
@@ -82,7 +82,7 @@ struct sub_bitmap_list {
int64_t change_id;
// Bounding box for rendering. It's notable that SUBBITMAP_LIBASS images are
- // always within these bounds, while SUBBITMAP_RGBA is not necessarily.
+ // always within these bounds, while SUBBITMAP_BGRA is not necessarily.
int w, h;
// Sorted by sub_bitmaps.render_index. Unused parts are not in the array,