Merge "Removing frame_type field from MACROBLOCKD struct."
This commit is contained in:
commit
f66821afbb
@ -224,8 +224,6 @@ typedef struct macroblockd {
|
||||
MODE_INFO *mode_info_context;
|
||||
int mode_info_stride;
|
||||
|
||||
FRAME_TYPE frame_type;
|
||||
|
||||
int up_available;
|
||||
int left_available;
|
||||
int right_available;
|
||||
|
@ -954,7 +954,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
|
||||
|
||||
xd->mode_info_context = pc->mi;
|
||||
xd->prev_mode_info_context = pc->prev_mi;
|
||||
xd->frame_type = pc->frame_type;
|
||||
xd->mode_info_stride = pc->mode_info_stride;
|
||||
|
||||
init_dequantizer(pc, &pbi->mb);
|
||||
|
@ -1907,7 +1907,6 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
|
||||
cpi->seg0_idx = 0;
|
||||
|
||||
xd->mode_info_stride = cm->mode_info_stride;
|
||||
xd->frame_type = cm->frame_type;
|
||||
|
||||
// reset intra mode contexts
|
||||
if (cm->frame_type == KEY_FRAME)
|
||||
|
@ -1346,7 +1346,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
|
||||
int64_t UNINITIALIZED_IS_SAFE(d);
|
||||
i = idy * 2 + idx;
|
||||
|
||||
if (xd->frame_type == KEY_FRAME) {
|
||||
if (cpi->common.frame_type == KEY_FRAME) {
|
||||
const MB_PREDICTION_MODE A = above_block_mode(mic, i, mis);
|
||||
const MB_PREDICTION_MODE L = (xd->left_available || idx) ?
|
||||
left_block_mode(mic, i) : DC_PRED;
|
||||
@ -1488,13 +1488,12 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int64_t *distortion, int *skippable,
|
||||
BLOCK_SIZE_TYPE bsize) {
|
||||
MB_PREDICTION_MODE mode;
|
||||
MB_PREDICTION_MODE last_mode;
|
||||
MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected);
|
||||
int64_t best_rd = INT64_MAX, this_rd;
|
||||
int this_rate_tokenonly, this_rate, s;
|
||||
int64_t this_distortion;
|
||||
|
||||
last_mode = bsize <= BLOCK_SIZE_SB8X8 ?
|
||||
MB_PREDICTION_MODE last_mode = bsize <= BLOCK_SIZE_SB8X8 ?
|
||||
TM_PRED : cpi->sf.last_chroma_intra_mode;
|
||||
|
||||
for (mode = DC_PRED; mode <= last_mode; mode++) {
|
||||
@ -1502,7 +1501,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
super_block_uvrd(&cpi->common, x, &this_rate_tokenonly,
|
||||
&this_distortion, &s, NULL, bsize);
|
||||
this_rate = this_rate_tokenonly +
|
||||
x->intra_uv_mode_cost[x->e_mbd.frame_type][mode];
|
||||
x->intra_uv_mode_cost[cpi->common.frame_type][mode];
|
||||
this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
|
||||
|
||||
if (this_rd < best_rd) {
|
||||
@ -1530,7 +1529,7 @@ static int64_t rd_sbuv_dcpred(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
super_block_uvrd(&cpi->common, x, rate_tokenonly,
|
||||
distortion, skippable, NULL, bsize);
|
||||
*rate = *rate_tokenonly +
|
||||
x->intra_uv_mode_cost[x->e_mbd.frame_type][DC_PRED];
|
||||
x->intra_uv_mode_cost[cpi->common.frame_type][DC_PRED];
|
||||
this_rd = RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
|
||||
|
||||
x->e_mbd.mode_info_context->mbmi.uv_mode = DC_PRED;
|
||||
|
Loading…
Reference in New Issue
Block a user