Commit 72ece130 authored by James Zern's avatar James Zern

vp9: move encoder-only member from common

allow_comp_inter_inter VP9_COMMON -> VP9_COMP

Change-Id: I6d9dc25d1cdd7e2ab62f5be69cd9fa883d21dbb6
parent 3e0793b8
...@@ -182,7 +182,6 @@ typedef struct VP9Common { ...@@ -182,7 +182,6 @@ typedef struct VP9Common {
struct segmentation seg; struct segmentation seg;
// Context probabilities for reference frame prediction // Context probabilities for reference frame prediction
int allow_comp_inter_inter;
MV_REFERENCE_FRAME comp_fixed_ref; MV_REFERENCE_FRAME comp_fixed_ref;
MV_REFERENCE_FRAME comp_var_ref[2]; MV_REFERENCE_FRAME comp_var_ref[2];
REFERENCE_MODE reference_mode; REFERENCE_MODE reference_mode;
......
...@@ -1183,7 +1183,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) { ...@@ -1183,7 +1183,7 @@ static size_t write_compressed_header(VP9_COMP *cpi, uint8_t *data) {
vp9_cond_prob_diff_update(&header_bc, &fc->intra_inter_prob[i], vp9_cond_prob_diff_update(&header_bc, &fc->intra_inter_prob[i],
counts->intra_inter[i]); counts->intra_inter[i]);
if (cm->allow_comp_inter_inter) { if (cpi->allow_comp_inter_inter) {
const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE; const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE;
const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT; const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT;
......
...@@ -3716,9 +3716,9 @@ void vp9_encode_frame(VP9_COMP *cpi) { ...@@ -3716,9 +3716,9 @@ void vp9_encode_frame(VP9_COMP *cpi) {
cm->ref_frame_sign_bias[GOLDEN_FRAME]) || cm->ref_frame_sign_bias[GOLDEN_FRAME]) ||
(cm->ref_frame_sign_bias[ALTREF_FRAME] == (cm->ref_frame_sign_bias[ALTREF_FRAME] ==
cm->ref_frame_sign_bias[LAST_FRAME])) { cm->ref_frame_sign_bias[LAST_FRAME])) {
cm->allow_comp_inter_inter = 0; cpi->allow_comp_inter_inter = 0;
} else { } else {
cm->allow_comp_inter_inter = 1; cpi->allow_comp_inter_inter = 1;
cm->comp_fixed_ref = ALTREF_FRAME; cm->comp_fixed_ref = ALTREF_FRAME;
cm->comp_var_ref[0] = LAST_FRAME; cm->comp_var_ref[0] = LAST_FRAME;
cm->comp_var_ref[1] = GOLDEN_FRAME; cm->comp_var_ref[1] = GOLDEN_FRAME;
...@@ -3742,7 +3742,7 @@ void vp9_encode_frame(VP9_COMP *cpi) { ...@@ -3742,7 +3742,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
const int is_alt_ref = frame_type == ALTREF_FRAME; const int is_alt_ref = frame_type == ALTREF_FRAME;
/* prediction (compound, single or hybrid) mode selection */ /* prediction (compound, single or hybrid) mode selection */
if (is_alt_ref || !cm->allow_comp_inter_inter) if (is_alt_ref || !cpi->allow_comp_inter_inter)
cm->reference_mode = SINGLE_REFERENCE; cm->reference_mode = SINGLE_REFERENCE;
else if (mode_thrs[COMPOUND_REFERENCE] > mode_thrs[SINGLE_REFERENCE] && else if (mode_thrs[COMPOUND_REFERENCE] > mode_thrs[SINGLE_REFERENCE] &&
mode_thrs[COMPOUND_REFERENCE] > mode_thrs[COMPOUND_REFERENCE] >
......
...@@ -339,6 +339,8 @@ typedef struct VP9_COMP { ...@@ -339,6 +339,8 @@ typedef struct VP9_COMP {
unsigned int max_mv_magnitude; unsigned int max_mv_magnitude;
int mv_step_param; int mv_step_param;
int allow_comp_inter_inter;
// Default value is 1. From first pass stats, encode_breakout may be disabled. // Default value is 1. From first pass stats, encode_breakout may be disabled.
ENCODE_BREAKOUT_TYPE allow_encode_breakout; ENCODE_BREAKOUT_TYPE allow_encode_breakout;
......
...@@ -3065,7 +3065,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, ...@@ -3065,7 +3065,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
comp_pred = second_ref_frame > INTRA_FRAME; comp_pred = second_ref_frame > INTRA_FRAME;
if (comp_pred) { if (comp_pred) {
if (!cm->allow_comp_inter_inter) if (!cpi->allow_comp_inter_inter)
continue; continue;
// Skip compound inter modes if ARF is not available. // Skip compound inter modes if ARF is not available.
...@@ -3715,7 +3715,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, ...@@ -3715,7 +3715,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
comp_pred = second_ref_frame > INTRA_FRAME; comp_pred = second_ref_frame > INTRA_FRAME;
if (comp_pred) { if (comp_pred) {
if (!cm->allow_comp_inter_inter) if (!cpi->allow_comp_inter_inter)
continue; continue;
if (!(cpi->ref_frame_flags & flag_list[second_ref_frame])) if (!(cpi->ref_frame_flags & flag_list[second_ref_frame]))
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment