diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/filter/vf_scale.c | 12 | ||||
-rw-r--r-- | video/fmt-conversion.c | 36 | ||||
-rw-r--r-- | video/image_writer.c | 2 | ||||
-rw-r--r-- | video/img_format.c | 16 | ||||
-rw-r--r-- | video/img_format.h | 50 | ||||
-rw-r--r-- | video/out/gl_video.c | 8 | ||||
-rw-r--r-- | video/out/vo_direct3d.c | 6 | ||||
-rw-r--r-- | video/out/vo_opengl_old.c | 8 | ||||
-rw-r--r-- | video/out/vo_sdl.c | 20 | ||||
-rw-r--r-- | video/out/vo_wayland.c | 42 | ||||
-rw-r--r-- | video/out/vo_x11.c | 48 |
11 files changed, 117 insertions, 131 deletions
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c index f11fd58a65..0090eb775f 100644 --- a/video/filter/vf_scale.c +++ b/video/filter/vf_scale.c @@ -113,12 +113,12 @@ static const unsigned int outfmt_list[] = { IMGFMT_GBRP, IMGFMT_RGB48_LE, IMGFMT_RGB48_BE, - IMGFMT_BGR16, - IMGFMT_RGB16, - IMGFMT_BGR15, - IMGFMT_RGB15, - IMGFMT_BGR12, - IMGFMT_RGB12, + IMGFMT_BGR565, + IMGFMT_RGB565, + IMGFMT_BGR555, + IMGFMT_RGB555, + IMGFMT_BGR444, + IMGFMT_RGB444, IMGFMT_Y8, IMGFMT_BGR8, IMGFMT_RGB8, diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c index 88e10c924e..44fafa631f 100644 --- a/video/fmt-conversion.c +++ b/video/fmt-conversion.c @@ -30,31 +30,31 @@ static const struct { {IMGFMT_ARGB, AV_PIX_FMT_ARGB}, {IMGFMT_BGRA, AV_PIX_FMT_BGRA}, {IMGFMT_BGR24, AV_PIX_FMT_BGR24}, - {IMGFMT_BGR16_BE, AV_PIX_FMT_RGB565BE}, - {IMGFMT_BGR16_LE, AV_PIX_FMT_RGB565LE}, - {IMGFMT_BGR15_BE, AV_PIX_FMT_RGB555BE}, - {IMGFMT_BGR15_LE, AV_PIX_FMT_RGB555LE}, - {IMGFMT_BGR12_BE, AV_PIX_FMT_RGB444BE}, - {IMGFMT_BGR12_LE, AV_PIX_FMT_RGB444LE}, - {IMGFMT_BGR8, AV_PIX_FMT_RGB8}, - {IMGFMT_BGR4, AV_PIX_FMT_RGB4}, + {IMGFMT_RGB565_BE, AV_PIX_FMT_RGB565BE}, + {IMGFMT_RGB565_LE, AV_PIX_FMT_RGB565LE}, + {IMGFMT_RGB555_BE, AV_PIX_FMT_RGB555BE}, + {IMGFMT_RGB555_LE, AV_PIX_FMT_RGB555LE}, + {IMGFMT_RGB444_BE, AV_PIX_FMT_RGB444BE}, + {IMGFMT_RGB444_LE, AV_PIX_FMT_RGB444LE}, + {IMGFMT_RGB8, AV_PIX_FMT_RGB8}, + {IMGFMT_RGB4, AV_PIX_FMT_RGB4}, {IMGFMT_MONO, AV_PIX_FMT_MONOBLACK}, {IMGFMT_MONO_W, AV_PIX_FMT_MONOWHITE}, - {IMGFMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE}, - {IMGFMT_BGR4_BYTE, AV_PIX_FMT_RGB4_BYTE}, + {IMGFMT_RGB4_BYTE, AV_PIX_FMT_RGB4_BYTE}, + {IMGFMT_BGR4_BYTE, AV_PIX_FMT_BGR4_BYTE}, {IMGFMT_RGB48_LE, AV_PIX_FMT_RGB48LE}, {IMGFMT_RGB48_BE, AV_PIX_FMT_RGB48BE}, {IMGFMT_ABGR, AV_PIX_FMT_ABGR}, {IMGFMT_RGBA, AV_PIX_FMT_RGBA}, {IMGFMT_RGB24, AV_PIX_FMT_RGB24}, - {IMGFMT_RGB16_BE, AV_PIX_FMT_BGR565BE}, - {IMGFMT_RGB16_LE, AV_PIX_FMT_BGR565LE}, - {IMGFMT_RGB15_BE, AV_PIX_FMT_BGR555BE}, - {IMGFMT_RGB15_LE, AV_PIX_FMT_BGR555LE}, - {IMGFMT_RGB12_BE, AV_PIX_FMT_BGR444BE}, - {IMGFMT_RGB12_LE, AV_PIX_FMT_BGR444LE}, - {IMGFMT_RGB8, AV_PIX_FMT_BGR8}, - {IMGFMT_RGB4, AV_PIX_FMT_BGR4}, + {IMGFMT_BGR565_BE, AV_PIX_FMT_BGR565BE}, + {IMGFMT_BGR565_LE, AV_PIX_FMT_BGR565LE}, + {IMGFMT_BGR555_BE, AV_PIX_FMT_BGR555BE}, + {IMGFMT_BGR555_LE, AV_PIX_FMT_BGR555LE}, + {IMGFMT_BGR444_BE, AV_PIX_FMT_BGR444BE}, + {IMGFMT_BGR444_LE, AV_PIX_FMT_BGR444LE}, + {IMGFMT_BGR8, AV_PIX_FMT_BGR8}, + {IMGFMT_BGR4, AV_PIX_FMT_BGR4}, {IMGFMT_PAL8, AV_PIX_FMT_PAL8}, {IMGFMT_GBRP, AV_PIX_FMT_GBRP}, {IMGFMT_GBRP9_BE, AV_PIX_FMT_GBRP9BE}, diff --git a/video/image_writer.c b/video/image_writer.c index f1318512b3..f769fd9f27 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -227,7 +227,7 @@ static const struct img_writer img_writers[] = { }, { "tga", write_lavc, .lavc_codec = AV_CODEC_ID_TARGA, - .pixfmts = (const int[]) { IMGFMT_BGR24, IMGFMT_BGRA, IMGFMT_BGR15_LE, + .pixfmts = (const int[]) { IMGFMT_BGR24, IMGFMT_BGRA, IMGFMT_RGB555_LE, IMGFMT_Y8, 0}, }, #if HAVE_JPEG diff --git a/video/img_format.c b/video/img_format.c index 3802e1b58e..0b20b92dfb 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -44,20 +44,6 @@ struct mp_imgfmt_entry { static const struct mp_imgfmt_entry mp_imgfmt_list[] = { // not in ffmpeg FMT("vdpau_output", IMGFMT_VDPAU_OUTPUT) - // these names are weirdly different from FFmpeg's - FMT_ENDIAN("rgb12", IMGFMT_RGB12) - FMT_ENDIAN("rgb15", IMGFMT_RGB15) - FMT_ENDIAN("rgb16", IMGFMT_RGB16) - FMT_ENDIAN("bgr12", IMGFMT_BGR12) - FMT_ENDIAN("bgr15", IMGFMT_BGR15) - FMT_ENDIAN("bgr16", IMGFMT_BGR16) - // the MPlayer derived names have components in reverse order - FMT("rgb8", IMGFMT_RGB8) - FMT("bgr8", IMGFMT_BGR8) - FMT("rgb4_byte", IMGFMT_RGB4_BYTE) - FMT("bgr4_byte", IMGFMT_BGR4_BYTE) - FMT("rgb4", IMGFMT_RGB4) - FMT("bgr4", IMGFMT_BGR4) // FFmpeg names have an annoying "_vld" suffix FMT("vda", IMGFMT_VDA) FMT("vaapi", IMGFMT_VAAPI) @@ -183,7 +169,7 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt) // Packed RGB formats are the only formats that have less than 8 bits per // component, and still require endian dependent access. if (pd->comp[0].depth_minus1 + 1 <= 8 && - !(mpfmt >= IMGFMT_RGB12_LE && mpfmt <= IMGFMT_BGR16_BE)) + !(mpfmt >= IMGFMT_RGB444_LE && mpfmt <= IMGFMT_BGR565_BE)) { desc.flags |= MP_IMGFLAG_LE | MP_IMGFLAG_BE; } else { diff --git a/video/img_format.h b/video/img_format.h index 64662aba08..c6c26e7fab 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -203,29 +203,29 @@ enum mp_imgfmt { IMGFMT_RGB0_START = IMGFMT_0RGB, IMGFMT_RGB0_END = IMGFMT_RGB0, - // Accessed with bit-shifts (components ordered from LSB to MSB) - IMGFMT_RGB8, // r3 g3 b2 - IMGFMT_BGR8, - IMGFMT_RGB4_BYTE, // r1 g2 b1 with 1 pixel per byte - IMGFMT_BGR4_BYTE, - IMGFMT_RGB4, // r1 g2 b1, bit-packed - IMGFMT_BGR4, + // Accessed with bit-shifts (components ordered from MSB to LSB) + IMGFMT_BGR8, // r3 g3 b2 + IMGFMT_RGB8, + IMGFMT_BGR4_BYTE, // r1 g2 b1 with 1 pixel per byte + IMGFMT_RGB4_BYTE, + IMGFMT_BGR4, // r1 g2 b1, bit-packed + IMGFMT_RGB4, IMGFMT_MONO, // 1 bit per pixel, bit-packed IMGFMT_MONO_W, // like IMGFMT_MONO, but inverted (white pixels) // Accessed with bit-shifts after endian-swapping the uint16_t pixel - IMGFMT_RGB12_LE, // 4r 4g 4b 4a (LSB to MSB) - IMGFMT_RGB12_BE, - IMGFMT_RGB15_LE, // 5r 5g 5b 1a - IMGFMT_RGB15_BE, - IMGFMT_RGB16_LE, // 5r 6g 5b - IMGFMT_RGB16_BE, - IMGFMT_BGR12_LE, // 4b 4r 4g 4a - IMGFMT_BGR12_BE, - IMGFMT_BGR15_LE, // 5b 5g 5r 1a - IMGFMT_BGR15_BE, - IMGFMT_BGR16_LE, // 5b 6g 5r - IMGFMT_BGR16_BE, + IMGFMT_RGB444_LE, // 4r 4g 4b 4a (MSB to LSB) + IMGFMT_RGB444_BE, + IMGFMT_RGB555_LE, // 5r 5g 5b 1a + IMGFMT_RGB555_BE, + IMGFMT_RGB565_LE, // 5r 6g 5b + IMGFMT_RGB565_BE, + IMGFMT_BGR444_LE, // 4b 4r 4g 4a + IMGFMT_BGR444_BE, + IMGFMT_BGR555_LE, // 5b 5g 5r 1a + IMGFMT_BGR555_BE, + IMGFMT_BGR565_LE, // 5b 6g 5r + IMGFMT_BGR565_BE, // The first plane has 1 byte per pixel. The second plane is a palette with // 256 entries, with each entry encoded like in IMGFMT_BGR32. @@ -270,12 +270,12 @@ enum mp_imgfmt { IMGFMT_RGB32 = MP_SELECT_LE_BE(IMGFMT_RGBA, IMGFMT_ABGR), IMGFMT_BGR32 = MP_SELECT_LE_BE(IMGFMT_BGRA, IMGFMT_ARGB), - IMGFMT_RGB12 = MP_SELECT_LE_BE(IMGFMT_RGB12_LE, IMGFMT_RGB12_BE), - IMGFMT_RGB15 = MP_SELECT_LE_BE(IMGFMT_RGB15_LE, IMGFMT_RGB15_BE), - IMGFMT_RGB16 = MP_SELECT_LE_BE(IMGFMT_RGB16_LE, IMGFMT_RGB16_BE), - IMGFMT_BGR12 = MP_SELECT_LE_BE(IMGFMT_BGR12_LE, IMGFMT_BGR12_BE), - IMGFMT_BGR15 = MP_SELECT_LE_BE(IMGFMT_BGR15_LE, IMGFMT_BGR15_BE), - IMGFMT_BGR16 = MP_SELECT_LE_BE(IMGFMT_BGR16_LE, IMGFMT_BGR16_BE), + IMGFMT_RGB444 = MP_SELECT_LE_BE(IMGFMT_RGB444_LE, IMGFMT_RGB444_BE), + IMGFMT_RGB555 = MP_SELECT_LE_BE(IMGFMT_RGB555_LE, IMGFMT_RGB555_BE), + IMGFMT_RGB565 = MP_SELECT_LE_BE(IMGFMT_RGB565_LE, IMGFMT_RGB565_BE), + IMGFMT_BGR444 = MP_SELECT_LE_BE(IMGFMT_BGR444_LE, IMGFMT_BGR444_BE), + IMGFMT_BGR555 = MP_SELECT_LE_BE(IMGFMT_BGR555_LE, IMGFMT_BGR555_BE), + IMGFMT_BGR565 = MP_SELECT_LE_BE(IMGFMT_BGR565_LE, IMGFMT_BGR565_BE), IMGFMT_RGB48 = MP_SELECT_LE_BE(IMGFMT_RGB48_LE, IMGFMT_RGB48_BE), IMGFMT_RGBA64 = MP_SELECT_LE_BE(IMGFMT_RGBA64_LE, IMGFMT_RGBA64_BE), IMGFMT_BGRA64 = MP_SELECT_LE_BE(IMGFMT_BGRA64_LE, IMGFMT_BGRA64_BE), diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 1b83d416ce..26c49d5737 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -220,10 +220,10 @@ struct fmt_entry { // Very special formats, for which OpenGL happens to have direct support static const struct fmt_entry mp_to_gl_formats[] = { - {IMGFMT_RGB15, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, - {IMGFMT_RGB16, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV}, - {IMGFMT_BGR15, GL_RGBA, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, - {IMGFMT_BGR16, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}, + {IMGFMT_BGR555, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, + {IMGFMT_BGR565, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV}, + {IMGFMT_RGB555, GL_RGBA, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, + {IMGFMT_RGB565, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}, {0}, }; diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 5d42cd7d6e..c732d3c19b 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -207,9 +207,9 @@ static const struct fmt_entry fmt_table[] = { {IMGFMT_BGR32, D3DFMT_X8R8G8B8}, {IMGFMT_RGB32, D3DFMT_X8B8G8R8}, {IMGFMT_BGR24, D3DFMT_R8G8B8}, //untested - {IMGFMT_BGR16, D3DFMT_R5G6B5}, - {IMGFMT_BGR15, D3DFMT_X1R5G5B5}, - {IMGFMT_BGR8 , D3DFMT_R3G3B2}, //untested + {IMGFMT_RGB565, D3DFMT_R5G6B5}, + {IMGFMT_RGB555, D3DFMT_X1R5G5B5}, + {IMGFMT_RGB8, D3DFMT_R3G3B2}, //untested // grayscale (can be considered both packed and planar) {IMGFMT_Y8, D3DFMT_L8}, {IMGFMT_Y16, D3DFMT_L16}, diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c index 567fad743e..ea04283376 100644 --- a/video/out/vo_opengl_old.c +++ b/video/out/vo_opengl_old.c @@ -279,11 +279,11 @@ static int glFindFormat(uint32_t fmt, int have_texture_rg, int *dummy, *gl_type = GL_UNSIGNED_BYTE_2_3_3_REV; break; #endif - case IMGFMT_RGB15: + case IMGFMT_BGR555: *gl_format = GL_RGBA; *gl_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; break; - case IMGFMT_RGB16: + case IMGFMT_BGR565: *gl_format = GL_RGB; *gl_type = GL_UNSIGNED_SHORT_5_6_5_REV; break; @@ -297,11 +297,11 @@ static int glFindFormat(uint32_t fmt, int have_texture_rg, int *dummy, *gl_type = GL_UNSIGNED_BYTE_3_3_2; break; #endif - case IMGFMT_BGR15: + case IMGFMT_RGB555: *gl_format = GL_BGRA; *gl_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; break; - case IMGFMT_BGR16: + case IMGFMT_RGB565: *gl_format = GL_RGB; *gl_type = GL_UNSIGNED_SHORT_5_6_5; break; diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index 9696520b83..e31dfdc8f2 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -69,11 +69,11 @@ const struct formatmap_entry formats[] = { {SDL_PIXELFORMAT_BGR24, IMGFMT_BGR24, 0}, {SDL_PIXELFORMAT_RGB888, IMGFMT_RGB24, 0}, {SDL_PIXELFORMAT_BGR888, IMGFMT_BGR24, 0}, - {SDL_PIXELFORMAT_RGB565, IMGFMT_RGB16, 0}, - {SDL_PIXELFORMAT_BGR565, IMGFMT_BGR16, 0}, - {SDL_PIXELFORMAT_RGB555, IMGFMT_RGB15, 0}, - {SDL_PIXELFORMAT_BGR555, IMGFMT_BGR15, 0}, - {SDL_PIXELFORMAT_RGB444, IMGFMT_RGB12, 0} + {SDL_PIXELFORMAT_RGB565, IMGFMT_BGR565, 0}, + {SDL_PIXELFORMAT_BGR565, IMGFMT_RGB565, 0}, + {SDL_PIXELFORMAT_RGB555, IMGFMT_BGR555, 0}, + {SDL_PIXELFORMAT_BGR555, IMGFMT_RGB555, 0}, + {SDL_PIXELFORMAT_RGB444, IMGFMT_BGR444, 0} #else {SDL_PIXELFORMAT_RGBX8888, IMGFMT_ABGR, 0}, // has no alpha -> bad for OSD {SDL_PIXELFORMAT_BGRX8888, IMGFMT_ARGB, 0}, // has no alpha -> bad for OSD @@ -85,11 +85,11 @@ const struct formatmap_entry formats[] = { {SDL_PIXELFORMAT_BGR24, IMGFMT_BGR24, 0}, {SDL_PIXELFORMAT_RGB888, IMGFMT_BGR24, 0}, {SDL_PIXELFORMAT_BGR888, IMGFMT_RGB24, 0}, - {SDL_PIXELFORMAT_RGB565, IMGFMT_BGR16, 0}, - {SDL_PIXELFORMAT_BGR565, IMGFMT_RGB16, 0}, - {SDL_PIXELFORMAT_RGB555, IMGFMT_BGR15, 0}, - {SDL_PIXELFORMAT_BGR555, IMGFMT_RGB15, 0}, - {SDL_PIXELFORMAT_RGB444, IMGFMT_BGR12, 0} + {SDL_PIXELFORMAT_RGB565, IMGFMT_RGB565, 0}, + {SDL_PIXELFORMAT_BGR565, IMGFMT_RGB565, 0}, + {SDL_PIXELFORMAT_RGB555, IMGFMT_RGB555, 0}, + {SDL_PIXELFORMAT_BGR555, IMGFMT_BGR555, 0}, + {SDL_PIXELFORMAT_RGB444, IMGFMT_RGB444, 0} #endif }; diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c index 7776bf4d4d..9c1bf6259d 100644 --- a/video/out/vo_wayland.c +++ b/video/out/vo_wayland.c @@ -56,30 +56,30 @@ struct fmtentry { // the first 2 Formats should be available on most platforms // all other formats are optional -// the waylad byte order is reversed +// the waylad byte order is sometimes reversed static const struct fmtentry fmttable[] = { {WL_SHM_FORMAT_ARGB8888, IMGFMT_BGRA}, // 8b 8g 8r 8a {WL_SHM_FORMAT_XRGB8888, IMGFMT_BGR0}, - {WL_SHM_FORMAT_RGB332, IMGFMT_BGR8}, // 3b 3g 2r - {WL_SHM_FORMAT_BGR233, IMGFMT_RGB8}, // 3r 3g 3b, - {WL_SHM_FORMAT_XRGB4444, IMGFMT_BGR12_LE}, // 4b 4g 4r 4a - {WL_SHM_FORMAT_XBGR4444, IMGFMT_RGB12_LE}, // 4r 4g 4b 4a - {WL_SHM_FORMAT_RGBX4444, IMGFMT_RGB12_BE}, // 4a 4b 4g 4r - {WL_SHM_FORMAT_BGRX4444, IMGFMT_BGR12_BE}, // 4a 4r 4g 4b - {WL_SHM_FORMAT_ARGB4444, IMGFMT_BGR12_LE}, - {WL_SHM_FORMAT_ABGR4444, IMGFMT_RGB12_LE}, - {WL_SHM_FORMAT_RGBA4444, IMGFMT_RGB12_BE}, - {WL_SHM_FORMAT_BGRA4444, IMGFMT_BGR12_BE}, - {WL_SHM_FORMAT_XRGB1555, IMGFMT_BGR15_LE}, // 5b 5g 5r 1a - {WL_SHM_FORMAT_XBGR1555, IMGFMT_RGB15_LE}, // 5r 5g 5b 1a - {WL_SHM_FORMAT_RGBX5551, IMGFMT_RGB15_BE}, // 1a 5g 5b 5r - {WL_SHM_FORMAT_BGRX5551, IMGFMT_BGR15_BE}, // 1a 5r 5g 5b - {WL_SHM_FORMAT_ARGB1555, IMGFMT_BGR15_LE}, - {WL_SHM_FORMAT_ABGR1555, IMGFMT_RGB15_LE}, - {WL_SHM_FORMAT_RGBA5551, IMGFMT_RGB15_BE}, - {WL_SHM_FORMAT_BGRA5551, IMGFMT_BGR15_BE}, - {WL_SHM_FORMAT_RGB565, IMGFMT_BGR16_LE}, // 5b 6g 5r - {WL_SHM_FORMAT_BGR565, IMGFMT_RGB16_LE}, // 5r 6g 5b + {WL_SHM_FORMAT_RGB332, IMGFMT_RGB8}, // 3b 3g 2r + {WL_SHM_FORMAT_BGR233, IMGFMT_BGR8}, // 3r 3g 3b, + {WL_SHM_FORMAT_XRGB4444, IMGFMT_RGB444_LE}, // 4b 4g 4r 4a + {WL_SHM_FORMAT_XBGR4444, IMGFMT_BGR444_LE}, // 4r 4g 4b 4a + {WL_SHM_FORMAT_RGBX4444, IMGFMT_BGR444_BE}, // 4a 4b 4g 4r + {WL_SHM_FORMAT_BGRX4444, IMGFMT_RGB444_BE}, // 4a 4r 4g 4b + {WL_SHM_FORMAT_ARGB4444, IMGFMT_RGB444_LE}, + {WL_SHM_FORMAT_ABGR4444, IMGFMT_BGR444_LE}, + {WL_SHM_FORMAT_RGBA4444, IMGFMT_BGR444_BE}, + {WL_SHM_FORMAT_BGRA4444, IMGFMT_RGB444_BE}, + {WL_SHM_FORMAT_XRGB1555, IMGFMT_RGB555_LE}, // 5b 5g 5r 1a + {WL_SHM_FORMAT_XBGR1555, IMGFMT_BGR555_LE}, // 5r 5g 5b 1a + {WL_SHM_FORMAT_RGBX5551, IMGFMT_BGR555_BE}, // 1a 5g 5b 5r + {WL_SHM_FORMAT_BGRX5551, IMGFMT_RGB555_BE}, // 1a 5r 5g 5b + {WL_SHM_FORMAT_ARGB1555, IMGFMT_RGB555_LE}, + {WL_SHM_FORMAT_ABGR1555, IMGFMT_BGR555_LE}, + {WL_SHM_FORMAT_RGBA5551, IMGFMT_BGR555_BE}, + {WL_SHM_FORMAT_BGRA5551, IMGFMT_RGB555_BE}, + {WL_SHM_FORMAT_RGB565, IMGFMT_RGB565_LE}, // 5b 6g 5r + {WL_SHM_FORMAT_BGR565, IMGFMT_BGR565_LE}, // 5r 6g 5b {WL_SHM_FORMAT_RGB888, IMGFMT_BGR24}, // 8b 8g 8r {WL_SHM_FORMAT_BGR888, IMGFMT_RGB24}, // 8r 8g 8b {WL_SHM_FORMAT_XBGR8888, IMGFMT_RGB0}, diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index 26af641dbb..fa067849af 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -261,30 +261,30 @@ const struct fmt2Xfmtentry_s { unsigned green_mask; unsigned blue_mask; } fmt2Xfmt[] = { - {IMGFMT_RGB8, BO_NATIVE, 0x00000007, 0x00000038, 0x000000C0}, - {IMGFMT_RGB8, BO_NONNATIVE, 0x00000007, 0x00000038, 0x000000C0}, - {IMGFMT_BGR8, BO_NATIVE, 0x000000E0, 0x0000001C, 0x00000003}, - {IMGFMT_BGR8, BO_NONNATIVE, 0x000000E0, 0x0000001C, 0x00000003}, - {IMGFMT_RGB15, BO_NATIVE, 0x0000001F, 0x000003E0, 0x00007C00}, - {IMGFMT_BGR15, BO_NATIVE, 0x00007C00, 0x000003E0, 0x0000001F}, - {IMGFMT_RGB16, BO_NATIVE, 0x0000001F, 0x000007E0, 0x0000F800}, - {IMGFMT_BGR16, BO_NATIVE, 0x0000F800, 0x000007E0, 0x0000001F}, - {IMGFMT_RGB24, MSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, - {IMGFMT_RGB24, LSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, - {IMGFMT_BGR24, MSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, - {IMGFMT_BGR24, LSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, - {IMGFMT_RGB32, BO_NATIVE, 0x000000FF, 0x0000FF00, 0x00FF0000}, - {IMGFMT_RGB32, BO_NONNATIVE, 0xFF000000, 0x00FF0000, 0x0000FF00}, - {IMGFMT_BGR32, BO_NATIVE, 0x00FF0000, 0x0000FF00, 0x000000FF}, - {IMGFMT_BGR32, BO_NONNATIVE, 0x0000FF00, 0x00FF0000, 0xFF000000}, - {IMGFMT_ARGB, MSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, - {IMGFMT_ARGB, LSBFirst, 0x0000FF00, 0x00FF0000, 0xFF000000}, - {IMGFMT_ABGR, MSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, - {IMGFMT_ABGR, LSBFirst, 0xFF000000, 0x00FF0000, 0x0000FF00}, - {IMGFMT_RGBA, MSBFirst, 0xFF000000, 0x00FF0000, 0x0000FF00}, - {IMGFMT_RGBA, LSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, - {IMGFMT_BGRA, MSBFirst, 0x0000FF00, 0x00FF0000, 0xFF000000}, - {IMGFMT_BGRA, LSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, + {IMGFMT_BGR8, BO_NATIVE, 0x00000007, 0x00000038, 0x000000C0}, + {IMGFMT_BGR8, BO_NONNATIVE, 0x00000007, 0x00000038, 0x000000C0}, + {IMGFMT_RGB8, BO_NATIVE, 0x000000E0, 0x0000001C, 0x00000003}, + {IMGFMT_RGB8, BO_NONNATIVE, 0x000000E0, 0x0000001C, 0x00000003}, + {IMGFMT_BGR555, BO_NATIVE, 0x0000001F, 0x000003E0, 0x00007C00}, + {IMGFMT_BGR555, BO_NATIVE, 0x00007C00, 0x000003E0, 0x0000001F}, + {IMGFMT_BGR565, BO_NATIVE, 0x0000001F, 0x000007E0, 0x0000F800}, + {IMGFMT_RGB565, BO_NATIVE, 0x0000F800, 0x000007E0, 0x0000001F}, + {IMGFMT_RGB24, MSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, + {IMGFMT_RGB24, LSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, + {IMGFMT_BGR24, MSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, + {IMGFMT_BGR24, LSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, + {IMGFMT_RGB32, BO_NATIVE, 0x000000FF, 0x0000FF00, 0x00FF0000}, + {IMGFMT_RGB32, BO_NONNATIVE, 0xFF000000, 0x00FF0000, 0x0000FF00}, + {IMGFMT_BGR32, BO_NATIVE, 0x00FF0000, 0x0000FF00, 0x000000FF}, + {IMGFMT_BGR32, BO_NONNATIVE, 0x0000FF00, 0x00FF0000, 0xFF000000}, + {IMGFMT_ARGB, MSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, + {IMGFMT_ARGB, LSBFirst, 0x0000FF00, 0x00FF0000, 0xFF000000}, + {IMGFMT_ABGR, MSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, + {IMGFMT_ABGR, LSBFirst, 0xFF000000, 0x00FF0000, 0x0000FF00}, + {IMGFMT_RGBA, MSBFirst, 0xFF000000, 0x00FF0000, 0x0000FF00}, + {IMGFMT_RGBA, LSBFirst, 0x000000FF, 0x0000FF00, 0x00FF0000}, + {IMGFMT_BGRA, MSBFirst, 0x0000FF00, 0x00FF0000, 0xFF000000}, + {IMGFMT_BGRA, LSBFirst, 0x00FF0000, 0x0000FF00, 0x000000FF}, {0} }; |