avutil/tx: use llrintf() to convert a float into a 64 bit integer

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

Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/388/head
James Almer 2 years ago
parent d5c7970a27
commit 86157f5a25
  1. 2
      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)

Loading…
Cancel
Save