From 3db33b446f3cd1d3b7142b0ab0e4dcbbec968ee9 Mon Sep 17 00:00:00 2001 From: Martin Vignali Date: Mon, 22 Oct 2018 22:55:14 +0200 Subject: [PATCH] swscale/utils : simplify unscaled initial test for float pixfmt --- libswscale/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index cb40164a95..d5913ed733 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1810,8 +1810,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, /* unscaled special cases */ if (unscaled && !usesHFilter && !usesVFilter && (c->srcRange == c->dstRange || isAnyRGB(dstFormat) || - srcFormat == AV_PIX_FMT_GRAYF32 && dstFormat == AV_PIX_FMT_GRAY8 || - srcFormat == AV_PIX_FMT_GRAY8 && dstFormat == AV_PIX_FMT_GRAYF32)) { + isFloat(srcFormat) || isFloat(dstFormat))){ ff_get_unscaled_swscale(c); if (c->swscale) {