[FFmpeg-devel] [PATCH] avutil/tx: use llrintf() to convert a float into a 64 bit integer

James Almer jamrial at gmail.com
Tue Nov 8 19:08:28 EET 2022


Should fix fate failures on Windowx x86 targets, where long is 32 bits.

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavutil/tx_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/tx_priv.h b/libavutil/tx_priv.h
index 3195cb51b2..fb61119009 100644
--- a/libavutil/tx_priv.h
+++ b/libavutil/tx_priv.h
@@ -124,7 +124,7 @@ typedef void TXComplex;
     } while (0)
 
 #define UNSCALE(x) ((double)(x)/2147483648.0)
-#define RESCALE(x) (av_clip64(lrintf((x) * 2147483648.0), INT32_MIN, INT32_MAX))
+#define RESCALE(x) (av_clip64(llrintf((x) * 2147483648.0), INT32_MIN, INT32_MAX))
 
 #define FOLD(x, y) ((int32_t)((x) + (unsigned)(y) + 32) >> 6)
 
-- 
2.38.1



More information about the ffmpeg-devel mailing list