mirror of
https://github.com/mpv-player/mpv
synced 2025-01-11 17:39:38 +00:00
libmpcodecs: use 128 instead of 64 to define non-native RGB image formats
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
This commit is contained in:
parent
47a0e4fadd
commit
cb2f0e7c38
@ -54,39 +54,39 @@
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define IMGFMT_ABGR IMGFMT_RGB32
|
||||
#define IMGFMT_BGRA (IMGFMT_RGB32|64)
|
||||
#define IMGFMT_BGRA (IMGFMT_RGB32|128)
|
||||
#define IMGFMT_ARGB IMGFMT_BGR32
|
||||
#define IMGFMT_RGBA (IMGFMT_BGR32|64)
|
||||
#define IMGFMT_RGBA (IMGFMT_BGR32|128)
|
||||
#define IMGFMT_RGB48NE IMGFMT_RGB48BE
|
||||
#define IMGFMT_RGB12BE IMGFMT_RGB12
|
||||
#define IMGFMT_RGB12LE (IMGFMT_RGB12|64)
|
||||
#define IMGFMT_RGB12LE (IMGFMT_RGB12|128)
|
||||
#define IMGFMT_RGB15BE IMGFMT_RGB15
|
||||
#define IMGFMT_RGB15LE (IMGFMT_RGB15|64)
|
||||
#define IMGFMT_RGB15LE (IMGFMT_RGB15|128)
|
||||
#define IMGFMT_RGB16BE IMGFMT_RGB16
|
||||
#define IMGFMT_RGB16LE (IMGFMT_RGB16|64)
|
||||
#define IMGFMT_RGB16LE (IMGFMT_RGB16|128)
|
||||
#define IMGFMT_BGR12BE IMGFMT_BGR12
|
||||
#define IMGFMT_BGR12LE (IMGFMT_BGR12|64)
|
||||
#define IMGFMT_BGR12LE (IMGFMT_BGR12|128)
|
||||
#define IMGFMT_BGR15BE IMGFMT_BGR15
|
||||
#define IMGFMT_BGR15LE (IMGFMT_BGR15|64)
|
||||
#define IMGFMT_BGR15LE (IMGFMT_BGR15|128)
|
||||
#define IMGFMT_BGR16BE IMGFMT_BGR16
|
||||
#define IMGFMT_BGR16LE (IMGFMT_BGR16|64)
|
||||
#define IMGFMT_BGR16LE (IMGFMT_BGR16|128)
|
||||
#else
|
||||
#define IMGFMT_ABGR (IMGFMT_BGR32|64)
|
||||
#define IMGFMT_ABGR (IMGFMT_BGR32|128)
|
||||
#define IMGFMT_BGRA IMGFMT_BGR32
|
||||
#define IMGFMT_ARGB (IMGFMT_RGB32|64)
|
||||
#define IMGFMT_ARGB (IMGFMT_RGB32|128)
|
||||
#define IMGFMT_RGBA IMGFMT_RGB32
|
||||
#define IMGFMT_RGB48NE IMGFMT_RGB48LE
|
||||
#define IMGFMT_RGB12BE (IMGFMT_RGB12|64)
|
||||
#define IMGFMT_RGB12BE (IMGFMT_RGB12|128)
|
||||
#define IMGFMT_RGB12LE IMGFMT_RGB12
|
||||
#define IMGFMT_RGB15BE (IMGFMT_RGB15|64)
|
||||
#define IMGFMT_RGB15BE (IMGFMT_RGB15|128)
|
||||
#define IMGFMT_RGB15LE IMGFMT_RGB15
|
||||
#define IMGFMT_RGB16BE (IMGFMT_RGB16|64)
|
||||
#define IMGFMT_RGB16BE (IMGFMT_RGB16|128)
|
||||
#define IMGFMT_RGB16LE IMGFMT_RGB16
|
||||
#define IMGFMT_BGR12BE (IMGFMT_BGR12|64)
|
||||
#define IMGFMT_BGR12BE (IMGFMT_BGR12|128)
|
||||
#define IMGFMT_BGR12LE IMGFMT_BGR12
|
||||
#define IMGFMT_BGR15BE (IMGFMT_BGR15|64)
|
||||
#define IMGFMT_BGR15BE (IMGFMT_BGR15|128)
|
||||
#define IMGFMT_BGR15LE IMGFMT_BGR15
|
||||
#define IMGFMT_BGR16BE (IMGFMT_BGR16|64)
|
||||
#define IMGFMT_BGR16BE (IMGFMT_BGR16|128)
|
||||
#define IMGFMT_BGR16LE IMGFMT_BGR16
|
||||
#endif
|
||||
|
||||
|
@ -429,8 +429,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
}
|
||||
out_offset = 0;
|
||||
// We can easily "emulate" non-native RGB32 and BGR32
|
||||
if (out_format == (IMGFMT_BGR32 | 64) || out_format == (IMGFMT_RGB32 | 64)) {
|
||||
out_format &= ~64;
|
||||
if (out_format == (IMGFMT_BGR32 | 128) || out_format == (IMGFMT_RGB32 | 128)) {
|
||||
out_format &= ~128;
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
out_offset = 1;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user