From 98bf413b4b4e26bec938ceedabdef2b7dab33ee8 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Tue, 6 Mar 2012 09:52:15 -0800 Subject: [PATCH] fix a compiling error when CONFIG_COMP_INTRA_PRED not defined Change-Id: I4159ff365953598d9c9bc3ecacfb5c5f4a315b45 --- vp8/encoder/bitstream.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c index 58e34cdc3..330054108 100644 --- a/vp8/encoder/bitstream.c +++ b/vp8/encoder/bitstream.c @@ -1124,9 +1124,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) if (mode == B_PRED) { - int j = 0, uses_second = m->bmi[0].as_mode.second != (B_PREDICTION_MODE) (B_DC_PRED - 1); - + int j = 0; +#if CONFIG_COMP_INTRA_PRED + int uses_second = m->bmi[0].as_mode.second != (B_PREDICTION_MODE) (B_DC_PRED - 1); vp8_write(w, uses_second, 128); +#endif do { #if CONFIG_COMP_INTRA_PRED B_PREDICTION_MODE mode2 = m->bmi[j].as_mode.second; @@ -1514,9 +1516,11 @@ static void write_kfmodes(VP8_COMP *cpi) if (ym == B_PRED) { const int mis = c->mode_info_stride; - int i = 0, uses_second = m->bmi[0].as_mode.second != (B_PREDICTION_MODE) (B_DC_PRED - 1); - + int i = 0; +#if CONFIG_COMP_INTRA_PRED + int uses_second = m->bmi[0].as_mode.second != (B_PREDICTION_MODE) (B_DC_PRED - 1); vp8_write(bc, uses_second, 128); +#endif do { const B_PREDICTION_MODE A = above_block_mode(m, i, mis); -- 2.40.0