summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
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/encoder/vp9_encodeframe.c
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/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 168b46012..36bba0f70 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -129,9 +129,8 @@ static void calc_av_activity(VP9_COMP *cpi, int64_t activity_sum) {
unsigned int tmp;
// Create a list to sort to
- CHECK_MEM_ERROR(sortlist,
- vpx_calloc(sizeof(unsigned int),
- cpi->common.MBs));
+ CHECK_MEM_ERROR(&cpi->common, sortlist, vpx_calloc(sizeof(unsigned int),
+ cpi->common.MBs));
// Copy map to sort list
vpx_memcpy(sortlist, cpi->mb_activity_map,
@@ -323,21 +322,17 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
MACROBLOCKD * const xd = &x->e_mbd;
MODE_INFO *mi = &ctx->mic;
MB_MODE_INFO * const mbmi = &xd->mode_info_context->mbmi;
-#if CONFIG_DEBUG || CONFIG_INTERNAL_STATS
- MB_PREDICTION_MODE mb_mode = mi->mbmi.mode;
-#endif
int mb_mode_index = ctx->best_mode_index;
const int mis = cpi->common.mode_info_stride;
const int bh = 1 << mi_height_log2(bsize), bw = 1 << mi_width_log2(bsize);
+ const MB_PREDICTION_MODE mb_mode = mi->mbmi.mode;
-#if CONFIG_DEBUG
assert(mb_mode < MB_MODE_COUNT);
assert(mb_mode_index < MAX_MODES);
assert(mi->mbmi.ref_frame[0] < MAX_REF_FRAMES);
assert(mi->mbmi.ref_frame[1] < MAX_REF_FRAMES);
-#endif
-
assert(mi->mbmi.sb_type == bsize);
+
// Restore the coding context of the MB to that that was in place
// when the mode was picked for it
for (y = 0; y < bh; y++) {