summaryrefslogtreecommitdiff
path: root/third_party/aom/aom_mem
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
committertrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
commitdf9477dfa60ebb5d31bc142e58ce46535c17abce (patch)
treec4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/aom_mem
parent0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff)
downloaduxp-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/aom_mem')
-rw-r--r--third_party/aom/aom_mem/aom_mem.cmake5
-rw-r--r--third_party/aom/aom_mem/aom_mem.h19
2 files changed, 24 insertions, 0 deletions
diff --git a/third_party/aom/aom_mem/aom_mem.cmake b/third_party/aom/aom_mem/aom_mem.cmake
index 0375b09e06..6ea5ae0d49 100644
--- a/third_party/aom/aom_mem/aom_mem.cmake
+++ b/third_party/aom/aom_mem/aom_mem.cmake
@@ -8,6 +8,9 @@
## Media Patent License 1.0 was not distributed with this source code in the
## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
##
+if (NOT AOM_AOM_MEM_AOM_MEM_CMAKE_)
+set(AOM_AOM_MEM_AOM_MEM_CMAKE_ 1)
+
set(AOM_MEM_SOURCES
"${AOM_ROOT}/aom_mem/aom_mem.c"
"${AOM_ROOT}/aom_mem/aom_mem.h"
@@ -20,3 +23,5 @@ function (setup_aom_mem_targets)
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_mem PARENT_SCOPE)
target_sources(aom PUBLIC $<TARGET_OBJECTS:aom_mem>)
endfunction ()
+
+endif () # AOM_AOM_MEM_AOM_MEM_CMAKE_
diff --git a/third_party/aom/aom_mem/aom_mem.h b/third_party/aom/aom_mem/aom_mem.h
index 75bd4be65c..0d533c813c 100644
--- a/third_party/aom/aom_mem/aom_mem.h
+++ b/third_party/aom/aom_mem/aom_mem.h
@@ -39,6 +39,25 @@ void *aom_memset16(void *dest, int val, size_t length);
#include AOM_MEM_PLTFRM
#endif
+#if CONFIG_DEBUG
+#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \
+ do { \
+ lval = (expr); \
+ if (!lval) \
+ aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \
+ "Failed to allocate " #lval " at %s:%d", __FILE__, \
+ __LINE__); \
+ } while (0)
+#else
+#define AOM_CHECK_MEM_ERROR(error_info, lval, expr) \
+ do { \
+ lval = (expr); \
+ if (!lval) \
+ aom_internal_error(error_info, AOM_CODEC_MEM_ERROR, \
+ "Failed to allocate " #lval); \
+ } while (0)
+#endif
+
#if defined(__cplusplus)
}
#endif