aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 11:15:39 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 16:14:47 -0500
commit7324af651f60aadc8a1a04d99314d211df30ccb3 (patch)
tree618d1ae77773ff24fa5a4c9a7d5daf865fb0c195 /libavformat/mov.c
parent764900d6458a2f79166ff91df4f20ad39cd6acec (diff)
downloadffmpeg-7324af651f60aadc8a1a04d99314d211df30ccb3.tar.gz
avformat/mov: use hypot()
This simplifies the code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2910701ad5..cee037b4b4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3421,9 +3421,8 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (width && height && sc->display_matrix) {
double disp_transform[2];
-#define SQR(a) ((a)*(double)(a))
for (i = 0; i < 2; i++)
- disp_transform[i] = sqrt(SQR(display_matrix[i][0]) + SQR(display_matrix[i][1]));
+ disp_transform[i] = hypot(display_matrix[i][0], display_matrix[i][1]);
if (disp_transform[0] > 0 && disp_transform[1] > 0 &&
disp_transform[0] < (1<<24) && disp_transform[1] < (1<<24) &&