Merge "FIXED bug in when CONFIG_SEGMENTATION NOT DEFINED" into experimental

This commit is contained in:
Suman Sunkara 2010-11-17 12:07:24 -05:00 коммит произвёл On2 (Google) Code Review
Родитель 8232a3a0e4 c35057f0f6
Коммит 15a1dca2fb
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -831,29 +831,39 @@ static void write_mb_features(vp8_writer *w, const MB_MODE_INFO *mi, const MACRO
case 0: case 0:
vp8_write(w, 0, x->mb_segment_tree_probs[0]); vp8_write(w, 0, x->mb_segment_tree_probs[0]);
vp8_write(w, 0, x->mb_segment_tree_probs[1]); vp8_write(w, 0, x->mb_segment_tree_probs[1]);
#if CONFIG_SEGMENTATION
segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[1]); segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[1]);
#endif
break; break;
case 1: case 1:
vp8_write(w, 0, x->mb_segment_tree_probs[0]); vp8_write(w, 0, x->mb_segment_tree_probs[0]);
vp8_write(w, 1, x->mb_segment_tree_probs[1]); vp8_write(w, 1, x->mb_segment_tree_probs[1]);
#if CONFIG_SEGMENTATION
segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_one(x->mb_segment_tree_probs[1]); segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_one(x->mb_segment_tree_probs[1]);
#endif
break; break;
case 2: case 2:
vp8_write(w, 1, x->mb_segment_tree_probs[0]); vp8_write(w, 1, x->mb_segment_tree_probs[0]);
vp8_write(w, 0, x->mb_segment_tree_probs[2]); vp8_write(w, 0, x->mb_segment_tree_probs[2]);
#if CONFIG_SEGMENTATION
segment_cost += vp8_cost_one(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[2]); segment_cost += vp8_cost_one(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[2]);
#endif
break; break;
case 3: case 3:
vp8_write(w, 1, x->mb_segment_tree_probs[0]); vp8_write(w, 1, x->mb_segment_tree_probs[0]);
vp8_write(w, 1, x->mb_segment_tree_probs[2]); vp8_write(w, 1, x->mb_segment_tree_probs[2]);
#if CONFIG_SEGMENTATION
segment_cost += vp8_cost_one(x->mb_segment_tree_probs[0]) + vp8_cost_one(x->mb_segment_tree_probs[2]); segment_cost += vp8_cost_one(x->mb_segment_tree_probs[0]) + vp8_cost_one(x->mb_segment_tree_probs[2]);
#endif
break; break;
// TRAP.. This should not happen // TRAP.. This should not happen
default: default:
vp8_write(w, 0, x->mb_segment_tree_probs[0]); vp8_write(w, 0, x->mb_segment_tree_probs[0]);
vp8_write(w, 0, x->mb_segment_tree_probs[1]); vp8_write(w, 0, x->mb_segment_tree_probs[1]);
#if CONFIG_SEGMENTATION
segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[1]); segment_cost += vp8_cost_zero(x->mb_segment_tree_probs[0]) + vp8_cost_zero(x->mb_segment_tree_probs[1]);
#endif
break; break;
} }
} }