mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
video: make IMGFMT_IS_HWACCEL() return 0 or 1
Sometimes helps avoiding usage mistakes.
This commit is contained in:
parent
2115e2306e
commit
7533d3c3a8
@ -231,7 +231,7 @@ static inline bool IMGFMT_IS_RGB(int fmt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define IMGFMT_RGB_DEPTH(fmt) (mp_imgfmt_get_desc(fmt).plane_bits)
|
#define IMGFMT_RGB_DEPTH(fmt) (mp_imgfmt_get_desc(fmt).plane_bits)
|
||||||
#define IMGFMT_IS_HWACCEL(fmt) (mp_imgfmt_get_desc(fmt).flags & MP_IMGFLAG_HWACCEL)
|
#define IMGFMT_IS_HWACCEL(fmt) (!!(mp_imgfmt_get_desc(fmt).flags & MP_IMGFLAG_HWACCEL))
|
||||||
|
|
||||||
int mp_imgfmt_from_name(bstr name);
|
int mp_imgfmt_from_name(bstr name);
|
||||||
char *mp_imgfmt_to_name_buf(char *buf, size_t buf_size, int fmt);
|
char *mp_imgfmt_to_name_buf(char *buf, size_t buf_size, int fmt);
|
||||||
|
Loading…
Reference in New Issue
Block a user