]> git.sesse.net Git - ffmpeg/commitdiff
avutil/common: Add FFABSU() for a signed -> unsigned ABS
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Jan 2021 15:22:33 +0000 (16:22 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 26 Jan 2021 17:37:12 +0000 (18:37 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
doc/APIchanges
libavutil/common.h
libavutil/version.h

index 1509c9b8cb41a14b15ee3586d5cef35e9d802237..1332694820dfac6ddb38573e7474097c11b265a5 100644 (file)
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2021-01-26 - xxxxxxxxxx - lavu 56.64.100 - common.h
+  Add FFABSU()
+
 2021-01-25 - xxxxxxxxxx - lavc 58.119.100 - avcodec.h
   Deprecate AVCodecContext.debug_mv, FF_DEBUG_VIS_MV_P_FOR, FF_DEBUG_VIS_MV_B_FOR,
   FF_DEBUG_VIS_MV_B_BACK
index b9fbcc4d6097fb1cde1e3c5983da948bde704c73..a60a558b1d4628eea80eb050e705e0127e4d70ca 100644 (file)
  */
 #define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
 
+/**
+ * Unsigned Absolute value.
+ * This takes the absolute value of a signed int and returns it as a unsigned.
+ * This also works with INT_MIN which would otherwise not be representable
+ * As with many macros, this evaluates its argument twice.
+ */
+#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
+
 /**
  * Comparator.
  * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0
index bb8d60bef56e36de3c33fdd90e15f1b9ba2a8d9d..21136e6cb7cbb6f979b4606766d7bc343b076481 100644 (file)
@@ -79,8 +79,8 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  56
-#define LIBAVUTIL_VERSION_MINOR  63
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR  64
+#define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
                                                LIBAVUTIL_VERSION_MINOR, \