diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-08-02 15:55:38 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-08-08 12:03:42 +0200 |
commit | 9d58cdb4ba9c2c53da74d0898e060cff30c74dcd (patch) | |
tree | da78bd7ef75beff53d0f051945fe87f6786888a7 /libswscale/swscale_internal.h | |
parent | b9ff25a93e9bd7002b18b2bdca6b6a77d7ceb6a0 (diff) | |
download | ffmpeg-9d58cdb4ba9c2c53da74d0898e060cff30c74dcd.tar.gz |
swscale: do not drop half of bits from 16bit bayer formats
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r-- | libswscale/swscale_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 1a1b6f0dee..d207d3beff 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -764,6 +764,13 @@ static av_always_inline int isBayer(enum AVPixelFormat pix_fmt) return !!(desc->flags & AV_PIX_FMT_FLAG_BAYER); } +static av_always_inline int isBayer16BPS(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->comp[1].depth == 8; +} + static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); |