Merge "vp9: move encoder-only member from common"
This commit is contained in:
commit
4d40a046da
@ -184,7 +184,6 @@ typedef struct VP9Common {
|
||||
struct segmentation seg;
|
||||
|
||||
// Context probabilities for reference frame prediction
|
||||
int allow_comp_inter_inter;
|
||||
MV_REFERENCE_FRAME comp_fixed_ref;
|
||||
MV_REFERENCE_FRAME comp_var_ref[2];
|
||||
REFERENCE_MODE reference_mode;
|
||||
|
@ -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],
|
||||
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_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT;
|
||||
|
||||
|
@ -3714,9 +3714,9 @@ void vp9_encode_frame(VP9_COMP *cpi) {
|
||||
cm->ref_frame_sign_bias[GOLDEN_FRAME]) ||
|
||||
(cm->ref_frame_sign_bias[ALTREF_FRAME] ==
|
||||
cm->ref_frame_sign_bias[LAST_FRAME])) {
|
||||
cm->allow_comp_inter_inter = 0;
|
||||
cpi->allow_comp_inter_inter = 0;
|
||||
} else {
|
||||
cm->allow_comp_inter_inter = 1;
|
||||
cpi->allow_comp_inter_inter = 1;
|
||||
cm->comp_fixed_ref = ALTREF_FRAME;
|
||||
cm->comp_var_ref[0] = LAST_FRAME;
|
||||
cm->comp_var_ref[1] = GOLDEN_FRAME;
|
||||
@ -3740,7 +3740,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
|
||||
const int is_alt_ref = frame_type == ALTREF_FRAME;
|
||||
|
||||
/* 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;
|
||||
else if (mode_thrs[COMPOUND_REFERENCE] > mode_thrs[SINGLE_REFERENCE] &&
|
||||
mode_thrs[COMPOUND_REFERENCE] >
|
||||
|
@ -339,6 +339,8 @@ typedef struct VP9_COMP {
|
||||
unsigned int max_mv_magnitude;
|
||||
int mv_step_param;
|
||||
|
||||
int allow_comp_inter_inter;
|
||||
|
||||
// Default value is 1. From first pass stats, encode_breakout may be disabled.
|
||||
ENCODE_BREAKOUT_TYPE allow_encode_breakout;
|
||||
|
||||
|
@ -3065,7 +3065,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
|
||||
|
||||
comp_pred = second_ref_frame > INTRA_FRAME;
|
||||
if (comp_pred) {
|
||||
if (!cm->allow_comp_inter_inter)
|
||||
if (!cpi->allow_comp_inter_inter)
|
||||
continue;
|
||||
|
||||
// Skip compound inter modes if ARF is not available.
|
||||
@ -3715,7 +3715,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
|
||||
|
||||
comp_pred = second_ref_frame > INTRA_FRAME;
|
||||
if (comp_pred) {
|
||||
if (!cm->allow_comp_inter_inter)
|
||||
if (!cpi->allow_comp_inter_inter)
|
||||
continue;
|
||||
if (!(cpi->ref_frame_flags & flag_list[second_ref_frame]))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user