summaryrefslogtreecommitdiffstats
path: root/sub/draw_bmp.c
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/draw_bmp.c
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/draw_bmp.c')
-rw-r--r--sub/draw_bmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c
index f7f8982051..37e57a1991 100644
--- a/sub/draw_bmp.c
+++ b/sub/draw_bmp.c
@@ -32,7 +32,7 @@
const bool mp_draw_sub_formats[SUBBITMAP_COUNT] = {
[SUBBITMAP_LIBASS] = true,
- [SUBBITMAP_RGBA] = true,
+ [SUBBITMAP_BGRA] = true,
};
struct part {
@@ -84,7 +84,7 @@ struct mp_draw_sub_cache
struct mp_sws_context *alpha_to_calpha; // scaler for overlay -> calpha
bool scale_in_tiles;
- struct mp_sws_context *sub_scale; // scaler for SUBBITMAP_RGBA
+ struct mp_sws_context *sub_scale; // scaler for SUBBITMAP_BGRA
struct mp_repack *overlay_to_f32; // convert video_overlay to float
struct mp_image *overlay_tmp; // slice in float32
@@ -363,7 +363,7 @@ static void draw_rgba(uint8_t *dst, ptrdiff_t dst_stride,
static bool render_rgba(struct mp_draw_sub_cache *p, struct part *part,
struct sub_bitmaps *sb)
{
- assert(sb->format == SUBBITMAP_RGBA);
+ assert(sb->format == SUBBITMAP_BGRA);
if (part->change_id != sb->change_id) {
for (int n = 0; n < part->num_imgs; n++)
@@ -462,7 +462,7 @@ static bool render_sb(struct mp_draw_sub_cache *p, struct sub_bitmaps *sb)
case SUBBITMAP_LIBASS:
render_ass(p, sb);
return true;
- case SUBBITMAP_RGBA:
+ case SUBBITMAP_BGRA:
return render_rgba(p, part, sb);
}