From 582bc5a348f5cd12b6ad3be4ecbee71bc082ea32 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 18:06:50 +0300 Subject: libswscale: Adds conversions from/to float gray format. Signed-off-by: Michael Niedermayer --- libswscale/swscale_internal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libswscale/swscale_internal.h') 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); -- cgit v1.2.3