vp10_diff_update_prob(r, &fc->inter_mode_probs[i][j]);
}
+#if CONFIG_MISC_FIXES
+static REFERENCE_MODE read_frame_reference_mode(const VP10_COMMON *cm,
+ struct vpx_read_bit_buffer *rb) {
+ if (is_compound_reference_allowed(cm)) {
+ return vpx_rb_read_bit(rb) ? REFERENCE_MODE_SELECT
+ : (vpx_rb_read_bit(rb) ? COMPOUND_REFERENCE
+ : SINGLE_REFERENCE);
+ } else {
+ return SINGLE_REFERENCE;
+ }
+}
+#else
static REFERENCE_MODE read_frame_reference_mode(const VP10_COMMON *cm,
vpx_reader *r) {
if (is_compound_reference_allowed(cm)) {
return SINGLE_REFERENCE;
}
}
+#endif
static void read_frame_reference_mode_probs(VP10_COMMON *cm, vpx_reader *r) {
FRAME_CONTEXT *const fc = cm->fc;
setup_segmentation_dequant(cm);
#if CONFIG_MISC_FIXES
cm->tx_mode = xd->lossless ? ONLY_4X4 : read_tx_mode(rb);
+ cm->reference_mode = read_frame_reference_mode(cm, rb);
#endif
setup_tile_info(cm, rb);
for (i = 0; i < INTRA_INTER_CONTEXTS; i++)
vp10_diff_update_prob(&r, &fc->intra_inter_prob[i]);
+#if !CONFIG_MISC_FIXES
cm->reference_mode = read_frame_reference_mode(cm, &r);
+#endif
if (cm->reference_mode != SINGLE_REFERENCE)
setup_compound_reference_mode(cm);
read_frame_reference_mode_probs(cm, &r);
cm->tx_mode = TX_4X4;
else
write_txfm_mode(cm->tx_mode, wb);
+ if (cpi->allow_comp_inter_inter) {
+ const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT;
+ const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE;
+
+ vpx_wb_write_bit(wb, use_hybrid_pred);
+ if (!use_hybrid_pred)
+ vpx_wb_write_bit(wb, use_compound_pred);
+ }
#endif
write_tile_info(cm, wb);
counts->intra_inter[i]);
if (cpi->allow_comp_inter_inter) {
- const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE;
const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT;
+#if !CONFIG_MISC_FIXES
+ const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE;
vpx_write_bit(&header_bc, use_compound_pred);
if (use_compound_pred) {
vp10_cond_prob_diff_update(&header_bc, &fc->comp_inter_prob[i],
counts->comp_inter[i]);
}
+#else
+ if (use_hybrid_pred)
+ for (i = 0; i < COMP_INTER_CONTEXTS; i++)
+ vp10_cond_prob_diff_update(&header_bc, &fc->comp_inter_prob[i],
+ counts->comp_inter[i]);
+#endif
}
if (cm->reference_mode != COMPOUND_REFERENCE) {