fix the compile error in Debug mode on Windows with Visual Studio
in debug mode macro expension in assert cause compile error.
BUG=aomedia:605
Change-Id: Ie5c47a8496d043c0ee2e4d0b94cc2cf7ff168e6c
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 4756119..374dd01 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -5376,14 +5376,14 @@
#if CONFIG_TEMPMV_SIGNALING
if (cm->use_prev_frame_mvs) {
- assert(!cm->error_resilient_mode && cm->prev_frame &&
+ assert(!cm->error_resilient_mode && cm->prev_frame);
#if CONFIG_FRAME_SUPERRES
- cm->width == cm->last_width && cm->height == cm->last_height &&
+ assert(cm->width == cm->last_width && cm->height == cm->last_height);
#else
- cm->width == last_fb_ref_buf->buf->y_crop_width &&
- cm->height == last_fb_ref_buf->buf->y_crop_height &&
+ assert(cm->width == last_fb_ref_buf->buf->y_crop_width &&
+ cm->height == last_fb_ref_buf->buf->y_crop_height);
#endif // CONFIG_FRAME_SUPERRES
- !cm->prev_frame->intra_only);
+ assert(!cm->prev_frame->intra_only);
}
#else
cm->use_prev_frame_mvs = !cm->error_resilient_mode && cm->prev_frame &&
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index e8190e0..04af17b 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -6249,13 +6249,16 @@
const YV12_BUFFER_CONFIG *const scaled_ref_frame =
av1_get_scaled_ref_frame(cpi, ref);
- // Check that this is either an interinter or an interintra block
- assert(has_second_ref(mbmi) ||
+// Check that this is either an interinter or an interintra block
#if CONFIG_COMPOUND_SINGLEREF
+ assert(has_second_ref(mbmi) ||
// or a single ref comp pred mode
is_inter_singleref_comp_mode(mbmi->mode) ||
-#endif // CONFIG_COMPOUND_SINGLEREF
(ref_idx == 0 && mbmi->ref_frame[1] == INTRA_FRAME));
+#else
+ assert(has_second_ref(mbmi) ||
+ (ref_idx == 0 && mbmi->ref_frame[1] == INTRA_FRAME));
+#endif // CONFIG_COMPOUND_SINGLEREF
if (scaled_ref_frame) {
int i;