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:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 19:39:40 +0300
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-01 02:29:29 +0300
commit5a41a5a4f57dc30df3795f52634ca69a18f33226 (patch)
tree6a2319e561284180efc8ae7688ac7cbda35f99e8 /libavfilter
parent0eac93da0fd5baa400ee0a4a6dd8334202e8ada9 (diff)
avfilter/af_compand: use hypot()
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_compand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index 3848d67bd9..a64778e5ec 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -467,13 +467,13 @@ static int config_output(AVFilterLink *outlink)
L(2).b = (L(0).y - L(2).y) / (L(0).x - L(2).x);
theta = atan2(L(2).y - L(4).y, L(2).x - L(4).x);
- len = sqrt(pow(L(2).x - L(4).x, 2.) + pow(L(2).y - L(4).y, 2.));
+ len = hypot(L(2).x - L(4).x, L(2).y - L(4).y);
r = FFMIN(radius, len);
L(3).x = L(2).x - r * cos(theta);
L(3).y = L(2).y - r * sin(theta);
theta = atan2(L(0).y - L(2).y, L(0).x - L(2).x);
- len = sqrt(pow(L(0).x - L(2).x, 2.) + pow(L(0).y - L(2).y, 2.));
+ len = hypot(L(0).x - L(2).x, L(0).y - L(2).y);
r = FFMIN(radius, len / 2);
x = L(2).x + r * cos(theta);
y = L(2).y + r * sin(theta);