summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-06-28 10:36:20 -0700
committerDmitry Kovalev <dkovalev@google.com>2013-06-28 10:36:20 -0700
commit8e6ce6bb9e31ce61ef2b2960437405fe8e654e7e (patch)
tree6430e7dd52d170102ba907f14341276b82ecfbe0 /vp9/decoder
parenta3664258c5cb8295c128c157bf73363434635960 (diff)
downloadlibvpx-8e6ce6bb9e31ce61ef2b2960437405fe8e654e7e.tar
libvpx-8e6ce6bb9e31ce61ef2b2960437405fe8e654e7e.tar.gz
libvpx-8e6ce6bb9e31ce61ef2b2960437405fe8e654e7e.tar.bz2
libvpx-8e6ce6bb9e31ce61ef2b2960437405fe8e654e7e.zip
Removing CONFIG_DEBUG checks on assertions.
Adding CHECK_MEM_ERROR macro to vp9_common.h and removing two duplicated ones from vp9_onyx_int.h and vp9_onyxd_int.h. Change-Id: I916afec61b3019f18193135dac7c35ed0f89b8b6
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_decodemv.c9
-rw-r--r--vp9/decoder/vp9_decodframe.c2
-rw-r--r--vp9/decoder/vp9_onyxd_int.h18
3 files changed, 3 insertions, 26 deletions
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c
index 020e9c6cc..0205c5aa5 100644
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <assert.h>
+
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_entropy.h"
#include "vp9/common/vp9_entropymode.h"
@@ -24,11 +26,6 @@
#include "vp9/decoder/vp9_dsubexp.h"
#include "vp9/decoder/vp9_treereader.h"
-
-#if CONFIG_DEBUG
-#include <assert.h>
-#endif
-
// #define DEBUG_DEC_MV
#ifdef DEBUG_DEC_MV
int dec_mvcount = 0;
@@ -748,9 +745,7 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
&cm->fc.NMVcount, xd->allow_high_precision_mv);
break;
default:
-#if CONFIG_DEBUG
assert(0);
-#endif
break;
}
}
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index 08acbf31d..f948e161c 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -1059,7 +1059,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
// Create the segmentation map structure and set to 0
if (!pc->last_frame_seg_map)
- CHECK_MEM_ERROR(pc->last_frame_seg_map,
+ CHECK_MEM_ERROR(pc, pc->last_frame_seg_map,
vpx_calloc((pc->mi_rows * pc->mi_cols), 1));
vp9_setup_block_dptrs(xd, pc->subsampling_x, pc->subsampling_y);
diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h
index 86985700c..e78cbb52a 100644
--- a/vp9/decoder/vp9_onyxd_int.h
+++ b/vp9/decoder/vp9_onyxd_int.h
@@ -41,22 +41,4 @@ typedef struct VP9Decompressor {
int initial_height;
} VP9D_COMP;
-
-#if CONFIG_DEBUG
-#define CHECK_MEM_ERROR(lval,expr) do {\
- lval = (expr); \
- if(!lval) \
- vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR,\
- "Failed to allocate "#lval" at %s:%d", \
- __FILE__,__LINE__);\
- } while(0)
-#else
-#define CHECK_MEM_ERROR(lval,expr) do {\
- lval = (expr); \
- if(!lval) \
- vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR,\
- "Failed to allocate "#lval);\
- } while(0)
-#endif
-
#endif // VP9_DECODER_VP9_TREEREADER_H_