[FFmpeg-devel] [PATCH 0/2] initial support for hypot

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sat Nov 14 18:11:18 CET 2015


The hypot function is very useful since the naive sqrt(x*x + y*y) has overflow
and hence mathematical accuracy issues, see e.g
http://www.johndcook.com/blog/2010/06/02/whats-so-hard-about-finding-a-hypotenuse/.

1/2 adds configure+libm support. The fallback is currently a naive one,
and may be improved in a separate patch.

2/2 gives a simple illustration in avutil/eval. It may be useful elsewhere as well.

Ganesh Ajjanagadde (2):
  configure+libm.h: add hypot emulation
  avutil/eval: change sqrt to hypot

 configure        | 2 ++
 libavutil/eval.c | 2 +-
 libavutil/libm.h | 8 ++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

-- 
2.6.2



More information about the ffmpeg-devel mailing list