diff options
author | Sergey Lavrushkin <dualfal@gmail.com> | 2018-08-03 18:06:50 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-08-14 18:22:39 +0200 |
commit | 582bc5a348f5cd12b6ad3be4ecbee71bc082ea32 (patch) | |
tree | 8d53324a7a2b107bf4541740c07a6fcc4640f3b1 /libswscale/swscale_internal.h | |
parent | 551a029a181abe2b7b6f16e9631423a12e9fcae9 (diff) |
libswscale: Adds conversions from/to float gray format.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/swscale_internal.h')
-rw-r--r-- | libswscale/swscale_internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 1703856ab2..4fa59386a6 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -336,6 +336,8 @@ typedef struct SwsContext { uint32_t pal_yuv[256]; uint32_t pal_rgb[256]; + float uint2float_lut[256]; + /** * @name Scaled horizontal lines ring buffer. * The horizontal scaler keeps just enough scaled lines in a ring buffer @@ -764,6 +766,13 @@ static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt) pix_fmt == AV_PIX_FMT_MONOBLACK || pix_fmt == AV_PIX_FMT_MONOWHITE; } +static av_always_inline int isFloat(enum AVPixelFormat pix_fmt) +{ + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); + av_assert0(desc); + return desc->flags & AV_PIX_FMT_FLAG_FLOAT; +} + static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); |