Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-31 11:55:59 +0300
committerPaul B Mahol <onemda@gmail.com>2020-08-31 12:09:53 +0300
commit823eb009cb93b9717e3532e4325233bf85946a73 (patch)
tree3b4e5e934a8f64680dd1bc06c478d61d123ea687 /libavfilter
parent64e93025f002c137c6b8baa8c7112482ce5df857 (diff)
avfilter/vsrc_gradients: do not use (l)lrint variants for double
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vsrc_gradients.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c
index 410c3cb69b..f62cedad8f 100644
--- a/libavfilter/vsrc_gradients.c
+++ b/libavfilter/vsrc_gradients.c
@@ -98,20 +98,20 @@ static uint32_t lerp_color(uint8_t c0[4], uint8_t c1[4], float x)
{
const float y = 1.f - x;
- return (lrint(c0[0] * y + c1[0] * x)) << 0 |
- (lrint(c0[1] * y + c1[1] * x)) << 8 |
- (lrint(c0[2] * y + c1[2] * x)) << 16 |
- (lrint(c0[3] * y + c1[3] * x)) << 24;
+ return (lrintf(c0[0] * y + c1[0] * x)) << 0 |
+ (lrintf(c0[1] * y + c1[1] * x)) << 8 |
+ (lrintf(c0[2] * y + c1[2] * x)) << 16 |
+ (lrintf(c0[3] * y + c1[3] * x)) << 24;
}
static uint64_t lerp_color16(uint8_t c0[4], uint8_t c1[4], float x)
{
const float y = 1.f - x;
- return (llrint((c0[0] * y + c1[0] * x) * 256)) << 0 |
- (llrint((c0[1] * y + c1[1] * x) * 256)) << 16 |
- (llrint((c0[2] * y + c1[2] * x) * 256)) << 32 |
- (llrint((c0[3] * y + c1[3] * x) * 256)) << 48;
+ return (llrintf((c0[0] * y + c1[0] * x) * 256)) << 0 |
+ (llrintf((c0[1] * y + c1[1] * x) * 256)) << 16 |
+ (llrintf((c0[2] * y + c1[2] * x) * 256)) << 32 |
+ (llrintf((c0[3] * y + c1[3] * x) * 256)) << 48;
}
static uint32_t lerp_colors(uint8_t arr[3][4], int nb_colors, float step)