mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
swscale/tests/swscale: Implement isALPHA() using AVPixFmtDescriptor
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a2cfd6062c
commit
1055ece30b
@ -48,12 +48,12 @@
|
|||||||
(!(isGray(x) || \
|
(!(isGray(x) || \
|
||||||
(x) == AV_PIX_FMT_MONOBLACK || \
|
(x) == AV_PIX_FMT_MONOBLACK || \
|
||||||
(x) == AV_PIX_FMT_MONOWHITE))
|
(x) == AV_PIX_FMT_MONOWHITE))
|
||||||
#define isALPHA(x) \
|
|
||||||
((x) == AV_PIX_FMT_BGR32 || \
|
static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
|
||||||
(x) == AV_PIX_FMT_BGR32_1 || \
|
{
|
||||||
(x) == AV_PIX_FMT_RGB32 || \
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
|
||||||
(x) == AV_PIX_FMT_RGB32_1 || \
|
return desc->flags & AV_PIX_FMT_FLAG_ALPHA;
|
||||||
(x) == AV_PIX_FMT_YUVA420P)
|
}
|
||||||
|
|
||||||
static uint64_t getSSD(const uint8_t *src1, const uint8_t *src2,
|
static uint64_t getSSD(const uint8_t *src1, const uint8_t *src2,
|
||||||
int stride1, int stride2, int w, int h)
|
int stride1, int stride2, int w, int h)
|
||||||
|
Loading…
Reference in New Issue
Block a user