Commit 921b1c3c authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

Rename "dual" prediction to "compound" prediction.

Change-Id: Ibcd2b9b247ff9f83331dac47f91ec285e8955ff1
parent d4761651
......@@ -213,7 +213,7 @@ void vp8_create_common(VP8_COMMON *oci)
oci->txfm_mode = ONLY_4X4;
#endif
oci->mb_no_coeff_skip = 1;
oci->dual_pred_mode = HYBRID_PREDICTION;
oci->comp_pred_mode = HYBRID_PREDICTION;
oci->no_lpf = 0;
oci->filter_type = NORMAL_LOOPFILTER;
oci->use_bilinear_mc_filter = 0;
......
......@@ -40,7 +40,7 @@ void vp8_initialize_common(void);
#define NUM_YV12_BUFFERS 4
#define DUAL_PRED_CONTEXTS 2
#define COMP_PRED_CONTEXTS 2
typedef struct frame_contexts
{
......@@ -79,10 +79,10 @@ typedef enum
typedef enum
{
SINGLE_PREDICTION_ONLY = 0,
DUAL_PREDICTION_ONLY = 1,
COMP_PREDICTION_ONLY = 1,
HYBRID_PREDICTION = 2,
NB_PREDICTION_TYPES = 3,
} DUALPREDMODE_TYPE;
} COMPPREDMODE_TYPE;
#if CONFIG_T8X8
/* TODO: allows larger transform */
......@@ -153,7 +153,7 @@ typedef struct VP8Common
#if CONFIG_T8X8
TXFM_MODE txfm_mode;
#endif
DUALPREDMODE_TYPE dual_pred_mode;
COMPPREDMODE_TYPE comp_pred_mode;
int no_lpf;
int use_bilinear_mc_filter;
int full_pixel;
......@@ -237,7 +237,7 @@ typedef struct VP8Common
vp8_prob ref_pred_probs[PREDICTION_PROBS];
vp8_prob mod_refprobs[MAX_REF_FRAMES][PREDICTION_PROBS];
vp8_prob prob_dualpred[DUAL_PRED_CONTEXTS];
vp8_prob prob_comppred[COMP_PRED_CONTEXTS];
FRAME_CONTEXT lfc_a; /* last alt ref entropy */
FRAME_CONTEXT lfc; /* last frame entropy */
......
......@@ -37,8 +37,8 @@ unsigned char get_pred_context( VP8_COMMON *const cm,
(m - cm->mode_info_stride)->mbmi.ref_predicted;
break;
case PRED_DUAL:
// Context based on use of dual pred flag by neighbours
case PRED_COMP:
// Context based on use of comp pred flag by neighbours
//pred_context =
// ((m - 1)->mbmi.second_ref_frame != INTRA_FRAME) +
// ((m - cm->mode_info_stride)->mbmi.second_ref_frame != INTRA_FRAME);
......@@ -89,11 +89,11 @@ vp8_prob get_pred_prob( VP8_COMMON *const cm,
pred_probability = cm->ref_pred_probs[pred_context];
break;
case PRED_DUAL:
case PRED_COMP:
// In keeping with convention elsewhre the probability returned is
// the probability of a "0" outcome which in this case means the
// probability of dual pred off.
pred_probability = cm->prob_dualpred[pred_context];
// probability of comp pred off.
pred_probability = cm->prob_comppred[pred_context];
break;
default:
......
......@@ -21,7 +21,7 @@ typedef enum
{
PRED_SEG_ID = 0, // Segment identifier
PRED_REF = 1,
PRED_DUAL = 2
PRED_COMP = 2
} PRED_ID;
......
......@@ -526,14 +526,14 @@ static void mb_mode_mv_init(VP8D_COMP *pbi)
// frame prediction fails.
compute_mod_refprobs( cm );
pbi->common.dual_pred_mode = vp8_read(bc, 128);
if (cm->dual_pred_mode)
cm->dual_pred_mode += vp8_read(bc, 128);
if (cm->dual_pred_mode == HYBRID_PREDICTION)
pbi->common.comp_pred_mode = vp8_read(bc, 128);
if (cm->comp_pred_mode)
cm->comp_pred_mode += vp8_read(bc, 128);
if (cm->comp_pred_mode == HYBRID_PREDICTION)
{
int i;
for ( i = 0; i < DUAL_PRED_CONTEXTS; i++ )
cm->prob_dualpred[i] = (vp8_prob)vp8_read_literal(bc, 8);
for ( i = 0; i < COMP_PRED_CONTEXTS; i++ )
cm->prob_comppred[i] = (vp8_prob)vp8_read_literal(bc, 8);
}
if (vp8_read_bit(bc))
......@@ -856,9 +856,9 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
propagate_mv: /* same MV throughout */
if ( cm->dual_pred_mode == DUAL_PREDICTION_ONLY ||
(cm->dual_pred_mode == HYBRID_PREDICTION &&
vp8_read(bc, get_pred_prob( cm, xd, PRED_DUAL ))) )
if ( cm->comp_pred_mode == COMP_PREDICTION_ONLY ||
(cm->comp_pred_mode == HYBRID_PREDICTION &&
vp8_read(bc, get_pred_prob( cm, xd, PRED_COMP ))) )
{
mbmi->second_ref_frame = mbmi->ref_frame + 1;
if (mbmi->second_ref_frame == 4)
......
......@@ -627,31 +627,31 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
vp8_write_literal(w, pc->prob_last_coded, 8);
vp8_write_literal(w, pc->prob_gf_coded, 8);
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w, 1, 128);
vp8_write(w, 1, 128);
for (i = 0; i < DUAL_PRED_CONTEXTS; i++)
for (i = 0; i < COMP_PRED_CONTEXTS; i++)
{
if (cpi->single_pred_count[i] + cpi->dual_pred_count[i])
if (cpi->single_pred_count[i] + cpi->comp_pred_count[i])
{
pc->prob_dualpred[i] = cpi->single_pred_count[i] * 255 /
(cpi->single_pred_count[i] + cpi->dual_pred_count[i]);
if (pc->prob_dualpred[i] < 1)
pc->prob_dualpred[i] = 1;
pc->prob_comppred[i] = cpi->single_pred_count[i] * 255 /
(cpi->single_pred_count[i] + cpi->comp_pred_count[i]);
if (pc->prob_comppred[i] < 1)
pc->prob_comppred[i] = 1;
}
else
{
pc->prob_dualpred[i] = 128;
pc->prob_comppred[i] = 128;
}
vp8_write_literal(w, pc->prob_dualpred[i], 8);
vp8_write_literal(w, pc->prob_comppred[i], 8);
}
}
else if (cpi->common.dual_pred_mode == SINGLE_PREDICTION_ONLY)
else if (cpi->common.comp_pred_mode == SINGLE_PREDICTION_ONLY)
{
vp8_write(w, 0, 128);
}
else /* dual prediction only */
else /* compound prediction only */
{
vp8_write(w, 1, 128);
vp8_write(w, 0, 128);
......@@ -844,11 +844,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
#endif
write_mv(w, &mi->mv.as_mv, &best_mv, mvc);
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w,
mi->second_ref_frame != INTRA_FRAME,
get_pred_prob( pc, xd, PRED_DUAL ) );
get_pred_prob( pc, xd, PRED_COMP ) );
}
if (mi->second_ref_frame)
{
......@@ -925,11 +925,11 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
}
break;
default:
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w,
mi->second_ref_frame != INTRA_FRAME,
get_pred_prob( pc, xd, PRED_DUAL ) );
get_pred_prob( pc, xd, PRED_COMP ) );
}
break;
}
......@@ -1014,31 +1014,31 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
vp8_write_literal(w, pc->prob_last_coded, 8);
vp8_write_literal(w, pc->prob_gf_coded, 8);
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w, 1, 128);
vp8_write(w, 1, 128);
for (i = 0; i < DUAL_PRED_CONTEXTS; i++)
for (i = 0; i < COMP_PRED_CONTEXTS; i++)
{
if (cpi->single_pred_count[i] + cpi->dual_pred_count[i])
if (cpi->single_pred_count[i] + cpi->comp_pred_count[i])
{
pc->prob_dualpred[i] = cpi->single_pred_count[i] * 255 /
(cpi->single_pred_count[i] + cpi->dual_pred_count[i]);
if (pc->prob_dualpred[i] < 1)
pc->prob_dualpred[i] = 1;
pc->prob_comppred[i] = cpi->single_pred_count[i] * 255 /
(cpi->single_pred_count[i] + cpi->comp_pred_count[i]);
if (pc->prob_comppred[i] < 1)
pc->prob_comppred[i] = 1;
}
else
{
pc->prob_dualpred[i] = 128;
pc->prob_comppred[i] = 128;
}
vp8_write_literal(w, pc->prob_dualpred[i], 8);
vp8_write_literal(w, pc->prob_comppred[i], 8);
}
}
else if (cpi->common.dual_pred_mode == SINGLE_PREDICTION_ONLY)
else if (cpi->common.comp_pred_mode == SINGLE_PREDICTION_ONLY)
{
vp8_write(w, 0, 128);
}
else /* dual prediction only */
else /* compound prediction only */
{
vp8_write(w, 1, 128);
vp8_write(w, 0, 128);
......@@ -1211,11 +1211,10 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
#endif
write_mv(w, &mi->mv.as_mv, &best_mv, mvc);
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w, mi->second_ref_frame != INTRA_FRAME,
get_pred_prob( pc, xd, PRED_DUAL ) );
get_pred_prob( pc, xd, PRED_COMP ) );
}
if (mi->second_ref_frame)
{
......@@ -1286,10 +1285,10 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
}
break;
default:
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
vp8_write(w, mi->second_ref_frame != INTRA_FRAME,
get_pred_prob( pc, xd, PRED_DUAL ) );
get_pred_prob( pc, xd, PRED_COMP ) );
}
break;
}
......
......@@ -1130,9 +1130,9 @@ static void encode_frame_internal(VP8_COMP *cpi)
// re-initencode frame context.
init_encode_frame_mb_context(cpi);
cpi->rd_single_diff = cpi->rd_dual_diff = cpi->rd_hybrid_diff = 0;
cpi->rd_single_diff = cpi->rd_comp_diff = cpi->rd_hybrid_diff = 0;
vpx_memset(cpi->single_pred_count, 0, sizeof(cpi->single_pred_count));
vpx_memset(cpi->dual_pred_count, 0, sizeof(cpi->dual_pred_count));
vpx_memset(cpi->comp_pred_count, 0, sizeof(cpi->comp_pred_count));
{
struct vpx_usec_timer emr_timer;
......@@ -1239,11 +1239,11 @@ void vp8_encode_frame(VP8_COMP *cpi)
{
int frame_type, pred_type;
int redo = 0;
int single_diff, dual_diff, hybrid_diff;
int single_diff, comp_diff, hybrid_diff;
/*
* This code does a single RD pass over the whole frame assuming
* either dual, single or hybrid prediction as per whatever has
* either compound, single or hybrid prediction as per whatever has
* worked best for that type of frame in the past.
* It also predicts whether another coding mode would have worked
* better that this coding mode. If that is the case, it remembers
......@@ -1264,7 +1264,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
cpi->rd_prediction_type_threshes[frame_type][0] &&
cpi->rd_prediction_type_threshes[frame_type][1] >
cpi->rd_prediction_type_threshes[frame_type][2])
pred_type = DUAL_PREDICTION_ONLY;
pred_type = COMP_PREDICTION_ONLY;
else if (cpi->rd_prediction_type_threshes[frame_type][0] >
cpi->rd_prediction_type_threshes[frame_type][1] &&
cpi->rd_prediction_type_threshes[frame_type][0] >
......@@ -1273,38 +1273,38 @@ void vp8_encode_frame(VP8_COMP *cpi)
else
pred_type = HYBRID_PREDICTION;
cpi->common.dual_pred_mode = pred_type;
cpi->common.comp_pred_mode = pred_type;
encode_frame_internal(cpi);
single_diff = cpi->rd_single_diff / cpi->common.MBs;
cpi->rd_prediction_type_threshes[frame_type][0] += single_diff;
cpi->rd_prediction_type_threshes[frame_type][0] >>= 1;
dual_diff = cpi->rd_dual_diff / cpi->common.MBs;
cpi->rd_prediction_type_threshes[frame_type][1] += dual_diff;
comp_diff = cpi->rd_comp_diff / cpi->common.MBs;
cpi->rd_prediction_type_threshes[frame_type][1] += comp_diff;
cpi->rd_prediction_type_threshes[frame_type][1] >>= 1;
hybrid_diff = cpi->rd_hybrid_diff / cpi->common.MBs;
cpi->rd_prediction_type_threshes[frame_type][2] += hybrid_diff;
cpi->rd_prediction_type_threshes[frame_type][2] >>= 1;
if (cpi->common.dual_pred_mode == HYBRID_PREDICTION)
if (cpi->common.comp_pred_mode == HYBRID_PREDICTION)
{
int single_count_zero = 0;
int dual_count_zero = 0;
int comp_count_zero = 0;
int i;
for ( i = 0; i < DUAL_PRED_CONTEXTS; i++ )
for ( i = 0; i < COMP_PRED_CONTEXTS; i++ )
{
single_count_zero += cpi->single_pred_count[i];
dual_count_zero += cpi->dual_pred_count[i];
comp_count_zero += cpi->comp_pred_count[i];
}
if (dual_count_zero == 0)
if (comp_count_zero == 0)
{
cpi->common.dual_pred_mode = SINGLE_PREDICTION_ONLY;
cpi->common.comp_pred_mode = SINGLE_PREDICTION_ONLY;
}
else if (single_count_zero == 0)
{
cpi->common.dual_pred_mode = DUAL_PREDICTION_ONLY;
cpi->common.comp_pred_mode = COMP_PREDICTION_ONLY;
}
}
}
......@@ -1547,7 +1547,7 @@ int vp8cx_encode_inter_macroblock
// For now this codebase is limited to a single rd encode path
{
int zbin_mode_boost_enabled = cpi->zbin_mode_boost_enabled;
int single, dual, hybrid;
int single, compound, hybrid;
/* Are we using the fast quantizer for the mode selection? */
if(cpi->sf.use_fastquant_for_pick)
......@@ -1562,22 +1562,22 @@ int vp8cx_encode_inter_macroblock
cpi->zbin_mode_boost_enabled = 0;
}
vp8_rd_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate,
&distortion, &intra_error, &single, &dual, &hybrid);
&distortion, &intra_error, &single, &compound, &hybrid);
cpi->rd_single_diff += single;
cpi->rd_dual_diff += dual;
cpi->rd_comp_diff += compound;
cpi->rd_hybrid_diff += hybrid;
if (x->e_mbd.mode_info_context->mbmi.ref_frame &&
x->e_mbd.mode_info_context->mbmi.mode != SPLITMV)
{
unsigned char pred_context;
pred_context = get_pred_context( cm, xd, PRED_DUAL );
pred_context = get_pred_context( cm, xd, PRED_COMP );
if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME)
cpi->single_pred_count[pred_context]++;
else
cpi->dual_pred_count[pred_context]++;
cpi->comp_pred_count[pred_context]++;
}
#if CONFIG_T8X8
......
......@@ -696,19 +696,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_SPLITG ] = 5000;
sf->thresh_mult[THR_SPLITA ] = 5000;
sf->thresh_mult[THR_DUAL_ZEROLG ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTLG] = 0;
sf->thresh_mult[THR_DUAL_NEARLG ] = 0;
sf->thresh_mult[THR_DUAL_ZEROLA ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTLA] = 0;
sf->thresh_mult[THR_DUAL_NEARLA ] = 0;
sf->thresh_mult[THR_DUAL_ZEROGA ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTGA] = 0;
sf->thresh_mult[THR_DUAL_NEARGA ] = 0;
sf->thresh_mult[THR_DUAL_NEWLG ] = 1000;
sf->thresh_mult[THR_DUAL_NEWLA ] = 1000;
sf->thresh_mult[THR_DUAL_NEWGA ] = 1000;
sf->thresh_mult[THR_COMP_ZEROLG ] = 0;
sf->thresh_mult[THR_COMP_NEARESTLG] = 0;
sf->thresh_mult[THR_COMP_NEARLG ] = 0;
sf->thresh_mult[THR_COMP_ZEROLA ] = 0;
sf->thresh_mult[THR_COMP_NEARESTLA] = 0;
sf->thresh_mult[THR_COMP_NEARLA ] = 0;
sf->thresh_mult[THR_COMP_ZEROGA ] = 0;
sf->thresh_mult[THR_COMP_NEARESTGA] = 0;
sf->thresh_mult[THR_COMP_NEARGA ] = 0;
sf->thresh_mult[THR_COMP_NEWLG ] = 1000;
sf->thresh_mult[THR_COMP_NEWLA ] = 1000;
sf->thresh_mult[THR_COMP_NEWGA ] = 1000;
sf->first_step = 0;
sf->max_step_search_steps = MAX_MVSEARCH_STEPS;
......@@ -750,19 +750,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_SPLITG ] = 4500;
sf->thresh_mult[THR_SPLITA ] = 4500;
sf->thresh_mult[THR_DUAL_ZEROLG ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTLG] = 0;
sf->thresh_mult[THR_DUAL_NEARLG ] = 0;
sf->thresh_mult[THR_DUAL_ZEROLA ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTLA] = 0;
sf->thresh_mult[THR_DUAL_NEARLA ] = 0;
sf->thresh_mult[THR_DUAL_ZEROGA ] = 0;
sf->thresh_mult[THR_DUAL_NEARESTGA] = 0;
sf->thresh_mult[THR_DUAL_NEARGA ] = 0;
sf->thresh_mult[THR_COMP_ZEROLG ] = 0;
sf->thresh_mult[THR_COMP_NEARESTLG] = 0;
sf->thresh_mult[THR_COMP_NEARLG ] = 0;
sf->thresh_mult[THR_COMP_ZEROLA ] = 0;
sf->thresh_mult[THR_COMP_NEARESTLA] = 0;
sf->thresh_mult[THR_COMP_NEARLA ] = 0;
sf->thresh_mult[THR_COMP_ZEROGA ] = 0;
sf->thresh_mult[THR_COMP_NEARESTGA] = 0;
sf->thresh_mult[THR_COMP_NEARGA ] = 0;
sf->thresh_mult[THR_DUAL_NEWLG ] = 1000;
sf->thresh_mult[THR_DUAL_NEWLA ] = 1000;
sf->thresh_mult[THR_DUAL_NEWGA ] = 1000;
sf->thresh_mult[THR_COMP_NEWLG ] = 1000;
sf->thresh_mult[THR_COMP_NEWLA ] = 1000;
sf->thresh_mult[THR_COMP_NEWGA ] = 1000;
if (Speed > 0)
{
......@@ -814,19 +814,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_SPLITA ] = 20000;
}
sf->thresh_mult[THR_DUAL_ZEROLG ] = 1500;
sf->thresh_mult[THR_DUAL_NEARESTLG] = 1500;
sf->thresh_mult[THR_DUAL_NEARLG ] = 1500;
sf->thresh_mult[THR_DUAL_ZEROLA ] = 1500;
sf->thresh_mult[THR_DUAL_NEARESTLA] = 1500;
sf->thresh_mult[THR_DUAL_NEARLA ] = 1500;
sf->thresh_mult[THR_DUAL_ZEROGA ] = 1500;
sf->thresh_mult[THR_DUAL_NEARESTGA] = 1500;
sf->thresh_mult[THR_DUAL_NEARGA ] = 1500;
sf->thresh_mult[THR_DUAL_NEWLG ] = 2000;
sf->thresh_mult[THR_DUAL_NEWLA ] = 2000;
sf->thresh_mult[THR_DUAL_NEWGA ] = 2000;
sf->thresh_mult[THR_COMP_ZEROLG ] = 1500;
sf->thresh_mult[THR_COMP_NEARESTLG] = 1500;
sf->thresh_mult[THR_COMP_NEARLG ] = 1500;
sf->thresh_mult[THR_COMP_ZEROLA ] = 1500;
sf->thresh_mult[THR_COMP_NEARESTLA] = 1500;
sf->thresh_mult[THR_COMP_NEARLA ] = 1500;
sf->thresh_mult[THR_COMP_ZEROGA ] = 1500;
sf->thresh_mult[THR_COMP_NEARESTGA] = 1500;
sf->thresh_mult[THR_COMP_NEARGA ] = 1500;
sf->thresh_mult[THR_COMP_NEWLG ] = 2000;
sf->thresh_mult[THR_COMP_NEWLA ] = 2000;
sf->thresh_mult[THR_COMP_NEWGA ] = 2000;
}
if (Speed > 2)
......@@ -865,19 +865,19 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_SPLITA ] = 50000;
}
sf->thresh_mult[THR_DUAL_ZEROLG ] = 2000;
sf->thresh_mult[THR_DUAL_NEARESTLG] = 2000;
sf->thresh_mult[THR_DUAL_NEARLG ] = 2000;
sf->thresh_mult[THR_DUAL_ZEROLA ] = 2000;
sf->thresh_mult[THR_DUAL_NEARESTLA] = 2000;
sf->thresh_mult[THR_DUAL_NEARLA ] = 2000;
sf->thresh_mult[THR_DUAL_ZEROGA ] = 2000;
sf->thresh_mult[THR_DUAL_NEARESTGA] = 2000;
sf->thresh_mult[THR_DUAL_NEARGA ] = 2000;
sf->thresh_mult[THR_COMP_ZEROLG ] = 2000;
sf->thresh_mult[THR_COMP_NEARESTLG] = 2000;
sf->thresh_mult[THR_COMP_NEARLG ] = 2000;
sf->thresh_mult[THR_COMP_ZEROLA ] = 2000;
sf->thresh_mult[THR_COMP_NEARESTLA] = 2000;
sf->thresh_mult[THR_COMP_NEARLA ] = 2000;
sf->thresh_mult[THR_COMP_ZEROGA ] = 2000;
sf->thresh_mult[THR_COMP_NEARESTGA] = 2000;
sf->thresh_mult[THR_COMP_NEARGA ] = 2000;
sf->thresh_mult[THR_DUAL_NEWLG ] = 2500;
sf->thresh_mult[THR_DUAL_NEWLA ] = 2500;
sf->thresh_mult[THR_DUAL_NEWGA ] = 2500;
sf->thresh_mult[THR_COMP_NEWLG ] = 2500;
sf->thresh_mult[THR_COMP_NEWLA ] = 2500;
sf->thresh_mult[THR_COMP_NEWGA ] = 2500;
sf->improved_quant = 0;
sf->improved_dct = 0;
......@@ -922,26 +922,26 @@ void vp8_set_speed_features(VP8_COMP *cpi)
if ((cpi->ref_frame_flags & (VP8_LAST_FLAG | VP8_GOLD_FLAG)) != (VP8_LAST_FLAG | VP8_GOLD_FLAG))
{
sf->thresh_mult[THR_DUAL_ZEROLG ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARESTLG] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARLG ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEWLG ] = INT_MAX;
sf->thresh_mult[THR_COMP_ZEROLG ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARESTLG] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARLG ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEWLG ] = INT_MAX;
}
if ((cpi->ref_frame_flags & (VP8_LAST_FLAG | VP8_ALT_FLAG)) != (VP8_LAST_FLAG | VP8_ALT_FLAG))
{
sf->thresh_mult[THR_DUAL_ZEROLA ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARESTLA] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARLA ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEWLA ] = INT_MAX;
sf->thresh_mult[THR_COMP_ZEROLA ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARESTLA] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARLA ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEWLA ] = INT_MAX;
}
if ((cpi->ref_frame_flags & (VP8_GOLD_FLAG | VP8_ALT_FLAG)) != (VP8_GOLD_FLAG | VP8_ALT_FLAG))
{
sf->thresh_mult[THR_DUAL_ZEROGA ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARESTGA] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEARGA ] = INT_MAX;
sf->thresh_mult[THR_DUAL_NEWGA ] = INT_MAX;
sf->thresh_mult[THR_COMP_ZEROGA ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARESTGA] = INT_MAX;
sf->thresh_mult[THR_COMP_NEARGA ] = INT_MAX;
sf->thresh_mult[THR_COMP_NEWGA ] = INT_MAX;
}
// Slow quant, dct and trellis not worthwhile for first pass
......@@ -1578,8 +1578,8 @@ VP8_PTR vp8_create_compressor(VP8_CONFIG *oxcf)
cm->prob_last_coded = 128;
cm->prob_gf_coded = 128;
cm->prob_intra_coded = 63;
for ( i = 0; i < DUAL_PRED_CONTEXTS; i++ )
cm->prob_dualpred[i] = 128;
for ( i = 0; i < COMP_PRED_CONTEXTS; i++ )
cm->prob_comppred[i] = 128;
// Prime the recent reference frame useage counters.
// Hereafter they will be maintained as a sort of moving average
......
......@@ -191,21 +191,21 @@ typedef enum
THR_B_PRED = 19,
THR_I8X8_PRED = 20,
THR_DUAL_ZEROLG = 21,
THR_DUAL_NEARESTLG = 22,
THR_DUAL_NEARLG = 23,
THR_COMP_ZEROLG = 21,
THR_COMP_NEARESTLG = 22,
THR_COMP_NEARLG = 23,
THR_DUAL_ZEROLA = 24,
THR_DUAL_NEARESTLA = 25,
THR_DUAL_NEARLA = 26,
THR_COMP_ZEROLA = 24,
THR_COMP_NEARESTLA = 25,
THR_COMP_NEARLA = 26,
THR_DUAL_ZEROGA = 27,
THR_DUAL_NEARESTGA = 28,
THR_DUAL_NEARGA = 29,
THR_COMP_ZEROGA = 27,
THR_COMP_NEARESTGA = 28,
THR_COMP_NEARGA = 29,
THR_DUAL_NEWLG = 30,
THR_DUAL_NEWLA = 31,
THR_DUAL_NEWGA = 32,
THR_COMP_NEWLG = 30,
THR_COMP_NEWLA = 31,
THR_COMP_NEWGA = 32,
}
THR_MODES;
......@@ -357,10 +357,10 @@ typedef struct VP8_COMP
int rd_thresh_mult[MAX_MODES];
int rd_baseline_thresh[MAX_MODES];
int rd_threshes[MAX_MODES];
int64_t rd_single_diff, rd_dual_diff, rd_hybrid_diff;
int64_t rd_single_diff, rd_comp_diff, rd_hybrid_diff;
int rd_prediction_type_threshes[4][NB_PREDICTION_TYPES];