Commit ff8b630c authored by Yaowu Xu's avatar Yaowu Xu Committed by On2 (Google) Code Review

Merge "Added Prediction Filter to Mode Selection" into experimental

parents cb231c88 bbc926dc
......@@ -231,6 +231,7 @@ EXPERIMENT_LIST="
int_8x8fdct
newintramodes
adaptive_entropy
pred_filter
"
CONFIG_LIST="
external_build
......
......@@ -214,6 +214,11 @@ typedef struct
// a valid predictor
unsigned char mb_in_image;
#if CONFIG_PRED_FILTER
// Flag to turn prediction signal filter on(1)/off(0 ) at the MB level
unsigned int pred_filter_enabled;
#endif
} MB_MODE_INFO;
typedef struct
......
......@@ -287,6 +287,15 @@ typedef struct VP8Common
#if CONFIG_POSTPROC
struct postproc_state postproc_state;
#endif
#if CONFIG_PRED_FILTER
/* Prediction filter variables */
int pred_filter_mode; // 0=disabled at the frame level (no MB filtered)
// 1=enabled at the frame level (all MB filtered)
// 2=specified per MB (1=filtered, 0=non-filtered)
vp8_prob prob_pred_filter_off;
#endif
} VP8_COMMON;
#endif
This diff is collapsed.
......@@ -527,8 +527,14 @@ static void mb_mode_mv_init(VP8D_COMP *pbi)
#endif
}
if(pbi->common.frame_type != KEY_FRAME)
if(cm->frame_type != KEY_FRAME)
{
#if CONFIG_PRED_FILTER
cm->pred_filter_mode = (vp8_prob)vp8_read_literal(bc, 2);
if (cm->pred_filter_mode == 2)
cm->prob_pred_filter_off = (vp8_prob)vp8_read_literal(bc, 8);
#endif
// Decode the baseline probabilities for decoding reference frame
cm->prob_intra_coded = (vp8_prob)vp8_read_literal(bc, 8);
cm->prob_last_coded = (vp8_prob)vp8_read_literal(bc, 8);
......@@ -728,6 +734,18 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
vp8_accum_mv_refs(&pbi->common, mbmi->mode, rct);
}
#if CONFIG_PRED_FILTER
if (mbmi->mode >= NEARESTMV && mbmi->mode < SPLITMV)
{
// Is the prediction filter enabled
if (cm->pred_filter_mode == 2)
mbmi->pred_filter_enabled =
vp8_read(bc, cm->prob_pred_filter_off);
else
mbmi->pred_filter_enabled = cm->pred_filter_mode;
}
#endif
if ( cm->comp_pred_mode == COMP_PREDICTION_ONLY ||
(cm->comp_pred_mode == HYBRID_PREDICTION &&
vp8_read(bc, get_pred_prob( cm, xd, PRED_COMP ))) )
......
......@@ -815,6 +815,18 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
#endif
}
#if CONFIG_PRED_FILTER
// Write the prediction filter mode used for this frame
vp8_write_literal(w, pc->pred_filter_mode, 2);
// Write prediction filter on/off probability if signaling at MB level
if (pc->pred_filter_mode == 2)
vp8_write_literal(w, pc->prob_pred_filter_off, 8);
//printf("pred_filter_mode:%d prob_pred_filter_off:%d\n",
// pc->pred_filter_mode, pc->prob_pred_filter_off);
#endif
vp8_write_literal(w, pc->prob_intra_coded, 8);
vp8_write_literal(w, pc->prob_last_coded, 8);
vp8_write_literal(w, pc->prob_gf_coded, 8);
......@@ -1032,6 +1044,18 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
vp8_accum_mv_refs(&cpi->common, mode, ct);
}
#if CONFIG_PRED_FILTER
// Is the prediction filter enabled
if (mode >= NEARESTMV && mode < SPLITMV)
{
if (cpi->common.pred_filter_mode == 2 )
vp8_write(w, mi->pred_filter_enabled,
pc->prob_pred_filter_off);
else
assert (mi->pred_filter_enabled ==
cpi->common.pred_filter_mode);
}
#endif
if (mi->second_ref_frame &&
(mode == NEWMV || mode == SPLITMV))
{
......
......@@ -1201,6 +1201,19 @@ static void encode_frame_internal(VP8_COMP *cpi)
cpi->skip_false_count = 0;
#endif
#if CONFIG_PRED_FILTER
if (cm->current_video_frame == 0)
{
// Initially assume that we'll signal the prediction filter
// state at the frame level and that it is off.
cpi->common.pred_filter_mode = 0;
cpi->common.prob_pred_filter_off = 128;
}
cpi->pred_filter_on_count = 0;
cpi->pred_filter_off_count = 0;
#endif
#if 0
// Experimental code
cpi->frame_distortion = 0;
......
......@@ -1223,6 +1223,11 @@ void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x)
BLOCK *b = &x->block[0];
#if CONFIG_PRED_FILTER
// Disable the prediction filter for firstpass
x->e_mbd.mode_info_context->mbmi.pred_filter_enabled = 0;
#endif
vp8_build_inter16x16_predictors_mby(&x->e_mbd);
ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), x->e_mbd.predictor, b->src_stride);
......
......@@ -83,6 +83,17 @@ typedef struct
prototype_submbuv(*submbuv);
} vp8_encodemb_rtcd_vtable_t;
typedef struct
{
MB_PREDICTION_MODE mode;
MV_REFERENCE_FRAME ref_frame;
MV_REFERENCE_FRAME second_ref_frame;
#if CONFIG_PRED_FILTER
int pred_filter_flag;
#endif
} MODE_DEFINITION;
#if CONFIG_RUNTIME_CPU_DETECT
#define ENCODEMB_INVOKE(ctx,fn) (ctx)->fn
#else
......
......@@ -104,6 +104,11 @@ static unsigned int do_16x16_motion_iteration
&distortion, &sse);
}
#if CONFIG_PRED_FILTER
// Disable the prediction filter
xd->mode_info_context->mbmi.pred_filter_enabled = 0;
#endif
vp8_set_mbmode_and_mvs(x, NEWMV, dst_mv);
vp8_build_inter16x16_predictors_mby(xd);
//VARIANCE_INVOKE(&cpi->rtcd.variance, satd16x16)
......
......@@ -741,6 +741,41 @@ void vp8_set_speed_features(VP8_COMP *cpi)
switch (Mode)
{
case 0: // best quality mode
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROMV_FILT ] = 0;
sf->thresh_mult[THR_ZEROG ] = 0;
sf->thresh_mult[THR_ZEROG_FILT ] = 0;
sf->thresh_mult[THR_ZEROA ] = 0;
sf->thresh_mult[THR_ZEROA_FILT ] = 0;
sf->thresh_mult[THR_NEARESTMV ] = 0;
sf->thresh_mult[THR_NEARESTMV_FILT] = 0;
sf->thresh_mult[THR_NEARESTG ] = 0;
sf->thresh_mult[THR_NEARESTG_FILT ] = 0;
sf->thresh_mult[THR_NEARESTA ] = 0;
sf->thresh_mult[THR_NEARESTA_FILT ] = 0;
sf->thresh_mult[THR_NEARMV ] = 0;
sf->thresh_mult[THR_NEARMV_FILT ] = 0;
sf->thresh_mult[THR_NEARG ] = 0;
sf->thresh_mult[THR_NEARG_FILT ] = 0;
sf->thresh_mult[THR_NEARA ] = 0;
sf->thresh_mult[THR_NEARA_FILT ] = 0;
sf->thresh_mult[THR_DC ] = 0;
sf->thresh_mult[THR_V_PRED ] = 1000;
sf->thresh_mult[THR_H_PRED ] = 1000;
sf->thresh_mult[THR_B_PRED ] = 2000;
sf->thresh_mult[THR_I8X8_PRED] = 2000;
sf->thresh_mult[THR_TM ] = 1000;
sf->thresh_mult[THR_NEWMV ] = 1000;
sf->thresh_mult[THR_NEWG ] = 1000;
sf->thresh_mult[THR_NEWA ] = 1000;
sf->thresh_mult[THR_NEWMV_FILT ] = 1000;
sf->thresh_mult[THR_NEWG_FILT ] = 1000;
sf->thresh_mult[THR_NEWA_FILT ] = 1000;
#else
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROG ] = 0;
sf->thresh_mult[THR_ZEROA ] = 0;
......@@ -770,7 +805,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_NEWMV ] = 1000;
sf->thresh_mult[THR_NEWG ] = 1000;
sf->thresh_mult[THR_NEWA ] = 1000;
#endif
sf->thresh_mult[THR_SPLITMV ] = 2500;
sf->thresh_mult[THR_SPLITG ] = 5000;
sf->thresh_mult[THR_SPLITA ] = 5000;
......@@ -800,10 +835,14 @@ void vp8_set_speed_features(VP8_COMP *cpi)
#endif
break;
case 1:
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTMV] = 0;
sf->thresh_mult[THR_NEARESTMV_FILT] = 0;
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROMV_FILT ] = 0;
sf->thresh_mult[THR_DC ] = 0;
sf->thresh_mult[THR_NEARMV ] = 0;
sf->thresh_mult[THR_NEARMV_FILT ] = 0;
sf->thresh_mult[THR_V_PRED ] = 1000;
sf->thresh_mult[THR_H_PRED ] = 1000;
#if CONFIG_NEWINTRAMODES
......@@ -819,12 +858,18 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_TM ] = 1000;
sf->thresh_mult[THR_NEARESTG ] = 1000;
sf->thresh_mult[THR_NEARESTG_FILT ] = 1000;
sf->thresh_mult[THR_NEARESTA ] = 1000;
sf->thresh_mult[THR_NEARESTA_FILT ] = 1000;
sf->thresh_mult[THR_ZEROG ] = 1000;
sf->thresh_mult[THR_ZEROA ] = 1000;
sf->thresh_mult[THR_NEARG ] = 1000;
sf->thresh_mult[THR_NEARA ] = 1000;
sf->thresh_mult[THR_ZEROG_FILT ] = 1000;
sf->thresh_mult[THR_ZEROA_FILT ] = 1000;
sf->thresh_mult[THR_NEARG_FILT ] = 1000;
sf->thresh_mult[THR_NEARA_FILT ] = 1000;
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROG ] = 0;
......@@ -835,11 +880,63 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_NEARMV ] = 0;
sf->thresh_mult[THR_NEARG ] = 0;
sf->thresh_mult[THR_NEARA ] = 0;
sf->thresh_mult[THR_ZEROMV_FILT ] = 0;
sf->thresh_mult[THR_ZEROG_FILT ] = 0;
sf->thresh_mult[THR_ZEROA_FILT ] = 0;
sf->thresh_mult[THR_NEARESTMV_FILT] = 0;
sf->thresh_mult[THR_NEARESTG_FILT ] = 0;
sf->thresh_mult[THR_NEARESTA_FILT ] = 0;
sf->thresh_mult[THR_NEARMV_FILT ] = 0;
sf->thresh_mult[THR_NEARG_FILT ] = 0;
sf->thresh_mult[THR_NEARA_FILT ] = 0;
sf->thresh_mult[THR_NEWMV ] = 1000;
sf->thresh_mult[THR_NEWG ] = 1000;
sf->thresh_mult[THR_NEWA ] = 1000;
sf->thresh_mult[THR_NEWMV_FILT ] = 1000;
sf->thresh_mult[THR_NEWG_FILT ] = 1000;
sf->thresh_mult[THR_NEWA_FILT ] = 1000;
#else
sf->thresh_mult[THR_NEARESTMV] = 0;
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_DC ] = 0;
sf->thresh_mult[THR_NEARMV ] = 0;
sf->thresh_mult[THR_V_PRED ] = 1000;
sf->thresh_mult[THR_H_PRED ] = 1000;
#if CONFIG_NEWINTRAMODES
sf->thresh_mult[THR_D45_PRED ] = 1000;
sf->thresh_mult[THR_D135_PRED] = 1000;
sf->thresh_mult[THR_D117_PRED] = 1000;
sf->thresh_mult[THR_D153_PRED] = 1000;
sf->thresh_mult[THR_D27_PRED ] = 1000;
sf->thresh_mult[THR_D63_PRED ] = 1000;
#endif
sf->thresh_mult[THR_B_PRED ] = 2500;
sf->thresh_mult[THR_I8X8_PRED] = 2500;
sf->thresh_mult[THR_TM ] = 1000;
sf->thresh_mult[THR_NEARESTG ] = 1000;
sf->thresh_mult[THR_NEARESTA ] = 1000;
sf->thresh_mult[THR_ZEROG ] = 1000;
sf->thresh_mult[THR_ZEROA ] = 1000;
sf->thresh_mult[THR_NEARG ] = 1000;
sf->thresh_mult[THR_NEARA ] = 1000;
sf->thresh_mult[THR_ZEROMV ] = 0;
sf->thresh_mult[THR_ZEROG ] = 0;
sf->thresh_mult[THR_ZEROA ] = 0;
sf->thresh_mult[THR_NEARESTMV] = 0;
sf->thresh_mult[THR_NEARESTG ] = 0;
sf->thresh_mult[THR_NEARESTA ] = 0;
sf->thresh_mult[THR_NEARMV ] = 0;
sf->thresh_mult[THR_NEARG ] = 0;
sf->thresh_mult[THR_NEARA ] = 0;
sf->thresh_mult[THR_NEWMV ] = 1000;
sf->thresh_mult[THR_NEWG ] = 1000;
sf->thresh_mult[THR_NEWA ] = 1000;
#endif
sf->thresh_mult[THR_SPLITMV ] = 1700;
sf->thresh_mult[THR_SPLITG ] = 4500;
sf->thresh_mult[THR_SPLITA ] = 4500;
......@@ -906,6 +1003,9 @@ void vp8_set_speed_features(VP8_COMP *cpi)
if (cpi->ref_frame_flags & VP8_LAST_FLAG)
{
sf->thresh_mult[THR_NEWMV ] = 2000;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEWMV_FILT ] = 2000;
#endif
sf->thresh_mult[THR_SPLITMV ] = 10000;
sf->thresh_mult[THR_COMP_SPLITLG ] = 20000;
}
......@@ -916,6 +1016,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROG ] = 1500;
sf->thresh_mult[THR_NEARG ] = 1500;
sf->thresh_mult[THR_NEWG ] = 2000;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTG_FILT ] = 1500;
sf->thresh_mult[THR_ZEROG_FILT ] = 1500;
sf->thresh_mult[THR_NEARG_FILT ] = 1500;
sf->thresh_mult[THR_NEWG_FILT ] = 2000;
#endif
sf->thresh_mult[THR_SPLITG ] = 20000;
sf->thresh_mult[THR_COMP_SPLITGA ] = 20000;
}
......@@ -926,6 +1032,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROA ] = 1500;
sf->thresh_mult[THR_NEARA ] = 1500;
sf->thresh_mult[THR_NEWA ] = 2000;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTA_FILT ] = 1500;
sf->thresh_mult[THR_ZEROA_FILT ] = 1500;
sf->thresh_mult[THR_NEARA_FILT ] = 1500;
sf->thresh_mult[THR_NEWA_FILT ] = 2000;
#endif
sf->thresh_mult[THR_SPLITA ] = 20000;
sf->thresh_mult[THR_COMP_SPLITLA ] = 10000;
}
......@@ -972,6 +1084,9 @@ void vp8_set_speed_features(VP8_COMP *cpi)
if (cpi->ref_frame_flags & VP8_LAST_FLAG)
{
sf->thresh_mult[THR_NEWMV ] = 2000;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEWMV_FILT ] = 2000;
#endif
sf->thresh_mult[THR_SPLITMV ] = 25000;
sf->thresh_mult[THR_COMP_SPLITLG ] = 50000;
}
......@@ -982,6 +1097,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROG ] = 2000;
sf->thresh_mult[THR_NEARG ] = 2000;
sf->thresh_mult[THR_NEWG ] = 2500;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTG_FILT ] = 2000;
sf->thresh_mult[THR_ZEROG_FILT ] = 2000;
sf->thresh_mult[THR_NEARG_FILT ] = 2000;
sf->thresh_mult[THR_NEWG_FILT ] = 2500;
#endif
sf->thresh_mult[THR_SPLITG ] = 50000;
sf->thresh_mult[THR_COMP_SPLITGA ] = 50000;
}
......@@ -992,6 +1113,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROA ] = 2000;
sf->thresh_mult[THR_NEARA ] = 2000;
sf->thresh_mult[THR_NEWA ] = 2500;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTA_FILT ] = 2000;
sf->thresh_mult[THR_ZEROA_FILT ] = 2000;
sf->thresh_mult[THR_NEARA_FILT ] = 2000;
sf->thresh_mult[THR_NEWA_FILT ] = 2500;
#endif
sf->thresh_mult[THR_SPLITA ] = 50000;
sf->thresh_mult[THR_COMP_SPLITLA ] = 25000;
}
......@@ -1029,6 +1156,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_NEARESTMV] = INT_MAX;
sf->thresh_mult[THR_ZEROMV ] = INT_MAX;
sf->thresh_mult[THR_NEARMV ] = INT_MAX;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEWMV_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEARESTMV_FILT] = INT_MAX;
sf->thresh_mult[THR_ZEROMV_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEARMV_FILT ] = INT_MAX;
#endif
sf->thresh_mult[THR_SPLITMV ] = INT_MAX;
}
......@@ -1038,6 +1171,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROG ] = INT_MAX;
sf->thresh_mult[THR_NEARG ] = INT_MAX;
sf->thresh_mult[THR_NEWG ] = INT_MAX;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTG_FILT ] = INT_MAX;
sf->thresh_mult[THR_ZEROG_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEARG_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEWG_FILT ] = INT_MAX;
#endif
sf->thresh_mult[THR_SPLITG ] = INT_MAX;
}
......@@ -1047,6 +1186,12 @@ void vp8_set_speed_features(VP8_COMP *cpi)
sf->thresh_mult[THR_ZEROA ] = INT_MAX;
sf->thresh_mult[THR_NEARA ] = INT_MAX;
sf->thresh_mult[THR_NEWA ] = INT_MAX;
#if CONFIG_PRED_FILTER
sf->thresh_mult[THR_NEARESTA_FILT ] = INT_MAX;
sf->thresh_mult[THR_ZEROA_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEARA_FILT ] = INT_MAX;
sf->thresh_mult[THR_NEWA_FILT ] = INT_MAX;
#endif
sf->thresh_mult[THR_SPLITA ] = INT_MAX;
}
......@@ -2866,6 +3011,55 @@ void loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm)
}
#if CONFIG_PRED_FILTER
void select_pred_filter_mode(VP8_COMP *cpi)
{
VP8_COMMON *cm = &cpi->common;
int prob_pred_filter_off = cm->prob_pred_filter_off;
// Force filter on/off if probability is extreme
if (prob_pred_filter_off >= 255 * 0.95)
cm->pred_filter_mode = 0; // Off at the frame level
else if (prob_pred_filter_off <= 255 * 0.05)
cm->pred_filter_mode = 1; // On at the frame level
else
cm->pred_filter_mode = 2; // Selectable at the MB level
}
void update_pred_filt_prob(VP8_COMP *cpi)
{
VP8_COMMON *cm = &cpi->common;
int prob_pred_filter_off;
// Based on the selection in the previous frame determine what mode
// to use for the current frame and work out the signaling probability
if ( cpi->pred_filter_on_count + cpi->pred_filter_off_count )
{
prob_pred_filter_off = cpi->pred_filter_off_count * 256 /
( cpi->pred_filter_on_count + cpi->pred_filter_off_count);
if (prob_pred_filter_off < 1)
prob_pred_filter_off = 1;
if (prob_pred_filter_off > 255)
prob_pred_filter_off = 255;
cm->prob_pred_filter_off = prob_pred_filter_off;
}
else
cm->prob_pred_filter_off = 128;
/*
{
FILE *fp = fopen("filt_use.txt", "a");
fprintf (fp, "%d %d prob=%d\n", cpi->pred_filter_off_count,
cpi->pred_filter_on_count, cm->prob_pred_filter_off);
fclose(fp);
}
*/
}
#endif
static void encode_frame_to_data_rate
(
VP8_COMP *cpi,
......@@ -3358,6 +3552,13 @@ static void encode_frame_to_data_rate
vp8_clear_system_state(); //__asm emms;
#if CONFIG_PRED_FILTER
// Update prediction filter on/off probability based on
// selection made for the current frame
if (cm->frame_type != KEY_FRAME)
update_pred_filt_prob( cpi );
#endif
// Dummy pack of the bitstream using up to date stats to get an
// accurate estimate of output frame size to determine if we need
// to recode.
......@@ -3691,6 +3892,13 @@ static void encode_frame_to_data_rate
cpi->dummy_packing = 0;
vp8_pack_bitstream(cpi, dest, size);
#if CONFIG_PRED_FILTER
// Select the prediction filtering mode to use for the
// next frame based on the current frame selections
if(cm->frame_type != KEY_FRAME)
select_pred_filter_mode (cpi);
#endif
update_reference_frames(cm);
#if CONFIG_ADAPTIVE_ENTROPY
vp8_copy(cpi->common.fc.coef_counts, cpi->coef_counts);
......
......@@ -43,11 +43,19 @@
#define AF_THRESH2 100
#define ARF_DECAY_THRESH 12
#if CONFIG_PRED_FILTER
#if CONFIG_NEWINTRAMODES
#define MAX_MODES 54
#else
#define MAX_MODES 48
#endif
#else // CONFIG_PRED_FILTER
#if CONFIG_NEWINTRAMODES
#define MAX_MODES 42
#else
#define MAX_MODES 36
#endif
#endif // CONFIG_PRED_FILTER
#define MIN_THRESHMULT 32
#define MAX_THRESHMULT 512
......@@ -164,25 +172,100 @@ typedef struct
MBGRAPH_MB_STATS *mb_stats;
} MBGRAPH_FRAME_STATS;
#if CONFIG_PRED_FILTER
typedef enum
{
THR_ZEROMV,
THR_ZEROMV_FILT,
THR_DC,
THR_NEARESTMV,
THR_NEARESTMV_FILT,
THR_NEARMV,
THR_NEARMV_FILT,
THR_ZEROG,
THR_ZEROG_FILT,
THR_NEARESTG,
THR_NEARESTG_FILT,
THR_ZEROA,
THR_ZEROA_FILT,
THR_NEARESTA,
THR_NEARESTA_FILT,
THR_NEARG,
THR_NEARG_FILT,
THR_NEARA,
THR_NEARA_FILT,
THR_V_PRED,
THR_H_PRED,
#if CONFIG_NEWINTRAMODES
THR_D45_PRED,
THR_D135_PRED,
THR_D117_PRED,
THR_D153_PRED,
THR_D27_PRED,
THR_D63_PRED,
#endif
THR_TM,
THR_NEWMV,
THR_NEWMV_FILT,
THR_NEWG,
THR_NEWG_FILT,
THR_NEWA,
THR_NEWA_FILT,
THR_SPLITMV,
THR_SPLITG,
THR_SPLITA,
THR_B_PRED,
THR_I8X8_PRED,
THR_COMP_ZEROLG,
THR_COMP_NEARESTLG,
THR_COMP_NEARLG,
THR_COMP_ZEROLA,
THR_COMP_NEARESTLA,
THR_COMP_NEARLA,
THR_COMP_ZEROGA,
THR_COMP_NEARESTGA,
THR_COMP_NEARGA,
THR_COMP_NEWLG,
THR_COMP_NEWLA,
THR_COMP_NEWGA,
THR_COMP_SPLITLG,
THR_COMP_SPLITLA,
THR_COMP_SPLITGA,
}
THR_MODES;
#else
typedef enum
{
THR_ZEROMV = 0,
THR_DC = 1,
THR_ZEROMV,
THR_DC,
THR_NEARESTMV = 2,
THR_NEARMV = 3,
THR_NEARESTMV,
THR_NEARMV,
THR_ZEROG = 4,
THR_NEARESTG = 5,
THR_ZEROG,
THR_NEARESTG,
THR_ZEROA = 6,
THR_NEARESTA = 7,
THR_ZEROA,
THR_NEARESTA,
THR_NEARG = 8,
THR_NEARA = 9,
THR_NEARG,
THR_NEARA,
THR_V_PRED = 10,
THR_H_PRED = 11,