From ab0c2cf4317e32ddff50d8586d50a3b84b6a5289 Mon Sep 17 00:00:00 2001 From: fryshorts Date: Sun, 16 Nov 2014 22:05:28 +0100 Subject: [PATCH] libobs: Replace fmaxf with inline comparison. This replaces the call to fmaxf with the equivalent inline comparison which is a bit faster (at least on linux). --- libobs/obs-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index f9ae3a407..a2c8fe5af 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -655,7 +655,7 @@ static void calc_volume_levels(struct obs_source *source, float *array, float val_pow2 = val * val; sum_val += val_pow2; - max_val = fmaxf(max_val, val_pow2); + max_val = (max_val > val_pow2) ? max_val : val_pow2; } /*