[FFmpeg-cvslog] avutil/common: Document FFABS() corner case

Michael Niedermayer git at videolan.org
Thu Sep 3 02:31:46 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Sep  3 02:00:05 2015 +0200| [733511fb53fedd3adaaeabc5db9d0b29e71ea1d3] | committer: Michael Niedermayer

avutil/common: Document FFABS() corner case

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=733511fb53fedd3adaaeabc5db9d0b29e71ea1d3
---

 libavutil/common.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavutil/common.h b/libavutil/common.h
index 3e62b6d..14343d9 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -58,6 +58,12 @@
                                                        : ((a) + (1<<(b)) - 1) >> (b))
 #define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
 #define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
+
+/**
+ * Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they
+ * are not representable as absolute values of their type. This is the same
+ * as with *abs()
+ */
 #define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
 #define FFSIGN(a) ((a) > 0 ? 1 : -1)
 



More information about the ffmpeg-cvslog mailing list