Commit b097a3ba authored by Yaowu Xu's avatar Yaowu Xu

Remove two un-used entries in mode_lf_delta[]

With the removal of i4X4 and SPLIT_MV modes, the two entries for the
modes are no longer used. This patch remove the coding of the deltas.

Change-Id: Iea4eb500404ebe9706159380a03b8eca542fb4c3
parent def6bc76
......@@ -30,7 +30,7 @@
#define MBSKIP_CONTEXTS 3
#define MAX_REF_LF_DELTAS 4
#define MAX_MODE_LF_DELTAS 4
#define MAX_MODE_LF_DELTAS 2
/* Segment Feature Masks */
#define SEGMENT_DELTADATA 0
......@@ -330,9 +330,9 @@ typedef struct macroblockd {
signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS];
/* 0 = Intra, Last, GF, ARF */
signed char ref_lf_deltas[MAX_REF_LF_DELTAS];
/* 0 = I4X4_PRED, ZERO_MV, MV, SPLIT */
/* 0 = ZERO_MV, MV */
signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS];
/* 0 = I4X4_PRED, ZERO_MV, MV, SPLIT */
/* 0 = ZERO_MV, MV */
signed char mode_lf_deltas[MAX_MODE_LF_DELTAS];
/* Distance of MB away from frame edges */
......
......@@ -385,10 +385,8 @@ static void set_default_lf_deltas(MACROBLOCKD *xd) {
xd->ref_lf_deltas[GOLDEN_FRAME] = -1;
xd->ref_lf_deltas[ALTREF_FRAME] = -1;
xd->mode_lf_deltas[0] = 2; // I4X4_PRED
xd->mode_lf_deltas[1] = -1; // Zero
xd->mode_lf_deltas[2] = 1; // New mv
xd->mode_lf_deltas[3] = 2; // Split mv
xd->mode_lf_deltas[0] = 0; // Zero
xd->mode_lf_deltas[1] = 0; // New mv
}
void vp9_setup_past_independence(VP9_COMMON *cm, MACROBLOCKD *xd) {
......
......@@ -17,20 +17,20 @@
#include "vp9/common/vp9_seg_common.h"
static void lf_init_lut(loop_filter_info_n *lfi) {
lfi->mode_lf_lut[DC_PRED] = 1;
lfi->mode_lf_lut[D45_PRED] = 1;
lfi->mode_lf_lut[D135_PRED] = 1;
lfi->mode_lf_lut[D117_PRED] = 1;
lfi->mode_lf_lut[D153_PRED] = 1;
lfi->mode_lf_lut[D27_PRED] = 1;
lfi->mode_lf_lut[D63_PRED] = 1;
lfi->mode_lf_lut[V_PRED] = 1;
lfi->mode_lf_lut[H_PRED] = 1;
lfi->mode_lf_lut[TM_PRED] = 1;
lfi->mode_lf_lut[ZEROMV] = 1;
lfi->mode_lf_lut[NEARESTMV] = 2;
lfi->mode_lf_lut[NEARMV] = 2;
lfi->mode_lf_lut[NEWMV] = 2;
lfi->mode_lf_lut[DC_PRED] = 0;
lfi->mode_lf_lut[D45_PRED] = 0;
lfi->mode_lf_lut[D135_PRED] = 0;
lfi->mode_lf_lut[D117_PRED] = 0;
lfi->mode_lf_lut[D153_PRED] = 0;
lfi->mode_lf_lut[D27_PRED] = 0;
lfi->mode_lf_lut[D63_PRED] = 0;
lfi->mode_lf_lut[V_PRED] = 0;
lfi->mode_lf_lut[H_PRED] = 0;
lfi->mode_lf_lut[TM_PRED] = 0;
lfi->mode_lf_lut[ZEROMV] = 0;
lfi->mode_lf_lut[NEARESTMV] = 1;
lfi->mode_lf_lut[NEARMV] = 1;
lfi->mode_lf_lut[NEWMV] = 1;
}
void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi,
......@@ -132,13 +132,7 @@ void vp9_loop_filter_frame_init(VP9_COMMON *cm,
/* Apply delta for reference frame */
lvl_ref += xd->ref_lf_deltas[ref] << n_shift;
/* Apply delta for Intra modes */
mode = 0; /* I4X4_PRED */
/* Only the split mode I4X4_PRED has a further special case */
lvl_mode = lvl_ref + (xd->mode_lf_deltas[mode] << n_shift);
lfi->lvl[seg][ref][mode] = clamp(lvl_mode, 0, 63);
mode = 1; /* all the rest of Intra modes */
mode = 0; /* all the rest of Intra modes */
lvl_mode = lvl_ref;
lfi->lvl[seg][ref][mode] = clamp(lvl_mode, 0, 63);
......@@ -150,7 +144,7 @@ void vp9_loop_filter_frame_init(VP9_COMMON *cm,
lvl_ref += xd->ref_lf_deltas[ref] << n_shift;
/* Apply delta for Inter modes */
for (mode = 1; mode < 4; mode++) {
for (mode = 0; mode < MAX_MODE_LF_DELTAS; mode++) {
lvl_mode = lvl_ref + (xd->mode_lf_deltas[mode] << n_shift);
lfi->lvl[seg][ref][mode] = clamp(lvl_mode, 0, 63);
}
......
......@@ -575,10 +575,8 @@ static void set_default_lf_deltas(VP9_COMP *cpi) {
cpi->mb.e_mbd.ref_lf_deltas[GOLDEN_FRAME] = -2;
cpi->mb.e_mbd.ref_lf_deltas[ALTREF_FRAME] = -2;
cpi->mb.e_mbd.mode_lf_deltas[0] = 4; // I4X4_PRED
cpi->mb.e_mbd.mode_lf_deltas[1] = -2; // Zero
cpi->mb.e_mbd.mode_lf_deltas[2] = 2; // New mv
cpi->mb.e_mbd.mode_lf_deltas[3] = 4; // Split mv
cpi->mb.e_mbd.mode_lf_deltas[0] = 0; // Zero
cpi->mb.e_mbd.mode_lf_deltas[1] = 0; // New mv
}
static void set_rd_speed_thresholds(VP9_COMP *cpi, int mode, int speed) {
......
......@@ -74,7 +74,7 @@ typedef struct {
// 0 = Intra, Last, GF, ARF
signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS];
// 0 = I4X4_PRED, ZERO_MV, MV, SPLIT
// 0 = ZERO_MV, MV
signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS];
vp9_coeff_probs_model coef_probs[TX_SIZE_MAX_SB][BLOCK_TYPES];
......
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