mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
swscale: use a function for isAnyRGB
This commit is contained in:
parent
c30875e8b2
commit
2b9a52bcca
@ -767,13 +767,13 @@ static av_always_inline int isBayer(enum AVPixelFormat pix_fmt)
|
||||
return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER);
|
||||
}
|
||||
|
||||
#define isAnyRGB(x) \
|
||||
( \
|
||||
isBayer(x) || \
|
||||
isRGBinInt(x) || \
|
||||
isBGRinInt(x) || \
|
||||
isRGB(x) \
|
||||
)
|
||||
static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt)
|
||||
{
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
|
||||
av_assert0(desc);
|
||||
return (desc->flags & AV_PIX_FMT_FLAG_RGB) ||
|
||||
pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE;
|
||||
}
|
||||
|
||||
static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user