mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
swscale: use a function for isBayer
This commit is contained in:
parent
9c2436e1e7
commit
c30875e8b2
1 changed files with 6 additions and 14 deletions
|
|
@ -760,20 +760,12 @@ static av_always_inline int isGray(enum AVPixelFormat pix_fmt)
|
|||
|| (x) == AV_PIX_FMT_BGR24 \
|
||||
)
|
||||
|
||||
#define isBayer(x) ( \
|
||||
(x)==AV_PIX_FMT_BAYER_BGGR8 \
|
||||
|| (x)==AV_PIX_FMT_BAYER_BGGR16LE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_BGGR16BE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_RGGB8 \
|
||||
|| (x)==AV_PIX_FMT_BAYER_RGGB16LE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_RGGB16BE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GBRG8 \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GBRG16LE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GBRG16BE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GRBG8 \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GRBG16LE \
|
||||
|| (x)==AV_PIX_FMT_BAYER_GRBG16BE \
|
||||
)
|
||||
static av_always_inline int isBayer(enum AVPixelFormat pix_fmt)
|
||||
{
|
||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
|
||||
av_assert0(desc);
|
||||
return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER);
|
||||
}
|
||||
|
||||
#define isAnyRGB(x) \
|
||||
( \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue