Fix use_uv_intra_estimate in rd loop
This commit fixes the use of uv_intra_estimate by properly restoring the mode_info struct required by rd_pick_intra_sbuv_mode. Change-Id: I6a156d79533c4e2e60dfd3b8c5bb0a42a8eca280
This commit is contained in:
@@ -786,7 +786,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
|
|||||||
sf->last_partitioning_redo_frequency = 3;
|
sf->last_partitioning_redo_frequency = 3;
|
||||||
|
|
||||||
sf->use_uv_intra_rd_estimate = 1;
|
sf->use_uv_intra_rd_estimate = 1;
|
||||||
sf->skip_encode_sb = 1;
|
sf->skip_encode_sb = 0;
|
||||||
sf->use_lp32x32fdct = 1;
|
sf->use_lp32x32fdct = 1;
|
||||||
sf->subpel_iters_per_step = 1;
|
sf->subpel_iters_per_step = 1;
|
||||||
sf->use_fast_coef_updates = 2;
|
sf->use_fast_coef_updates = 2;
|
||||||
@@ -819,7 +819,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
|
|||||||
sf->last_partitioning_redo_frequency = 3;
|
sf->last_partitioning_redo_frequency = 3;
|
||||||
|
|
||||||
sf->use_uv_intra_rd_estimate = 1;
|
sf->use_uv_intra_rd_estimate = 1;
|
||||||
sf->skip_encode_sb = 1;
|
sf->skip_encode_sb = 0;
|
||||||
sf->use_lp32x32fdct = 1;
|
sf->use_lp32x32fdct = 1;
|
||||||
sf->subpel_iters_per_step = 1;
|
sf->subpel_iters_per_step = 1;
|
||||||
sf->use_fast_coef_updates = 2;
|
sf->use_fast_coef_updates = 2;
|
||||||
|
|||||||
@@ -1286,11 +1286,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
int this_rate_tokenonly, this_rate, s;
|
int this_rate_tokenonly, this_rate, s;
|
||||||
int64_t this_distortion, this_sse;
|
int64_t this_distortion, this_sse;
|
||||||
|
|
||||||
// int mode_mask = (bsize <= BLOCK_8X8)
|
for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
|
||||||
// ? ALL_INTRA_MODES : cpi->sf.intra_uv_mode_mask;
|
|
||||||
|
|
||||||
for (mode = DC_PRED; mode <= TM_PRED; mode ++) {
|
|
||||||
// if (!(mode_mask & (1 << mode)))
|
|
||||||
if (!(cpi->sf.intra_uv_mode_mask[max_uv_txsize_lookup[bsize]]
|
if (!(cpi->sf.intra_uv_mode_mask[max_uv_txsize_lookup[bsize]]
|
||||||
& (1 << mode)))
|
& (1 << mode)))
|
||||||
continue;
|
continue;
|
||||||
@@ -1337,7 +1333,6 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
}
|
}
|
||||||
|
|
||||||
x->e_mbd.mi_8x8[0]->mbmi.uv_mode = mode_selected;
|
x->e_mbd.mi_8x8[0]->mbmi.uv_mode = mode_selected;
|
||||||
|
|
||||||
return best_rd;
|
return best_rd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3662,7 +3657,9 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
if (cpi->sf.use_uv_intra_rd_estimate) {
|
if (cpi->sf.use_uv_intra_rd_estimate) {
|
||||||
// Do Intra UV best rd mode selection if best mode choice above was intra.
|
// Do Intra UV best rd mode selection if best mode choice above was intra.
|
||||||
if (vp9_mode_order[best_mode_index].ref_frame == INTRA_FRAME) {
|
if (vp9_mode_order[best_mode_index].ref_frame == INTRA_FRAME) {
|
||||||
TX_SIZE uv_tx_size = get_uv_tx_size(mbmi);
|
TX_SIZE uv_tx_size;
|
||||||
|
*mbmi = best_mbmode;
|
||||||
|
uv_tx_size = get_uv_tx_size(mbmi);
|
||||||
rd_pick_intra_sbuv_mode(cpi, x, ctx, &rate_uv_intra[uv_tx_size],
|
rd_pick_intra_sbuv_mode(cpi, x, ctx, &rate_uv_intra[uv_tx_size],
|
||||||
&rate_uv_tokenonly[uv_tx_size],
|
&rate_uv_tokenonly[uv_tx_size],
|
||||||
&dist_uv[uv_tx_size],
|
&dist_uv[uv_tx_size],
|
||||||
@@ -4410,7 +4407,9 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
if (cpi->sf.use_uv_intra_rd_estimate) {
|
if (cpi->sf.use_uv_intra_rd_estimate) {
|
||||||
// Do Intra UV best rd mode selection if best mode choice above was intra.
|
// Do Intra UV best rd mode selection if best mode choice above was intra.
|
||||||
if (vp9_ref_order[best_mode_index].ref_frame == INTRA_FRAME) {
|
if (vp9_ref_order[best_mode_index].ref_frame == INTRA_FRAME) {
|
||||||
TX_SIZE uv_tx_size = get_uv_tx_size(mbmi);
|
TX_SIZE uv_tx_size;
|
||||||
|
*mbmi = best_mbmode;
|
||||||
|
uv_tx_size = get_uv_tx_size(mbmi);
|
||||||
rd_pick_intra_sbuv_mode(cpi, x, ctx, &rate_uv_intra[uv_tx_size],
|
rd_pick_intra_sbuv_mode(cpi, x, ctx, &rate_uv_intra[uv_tx_size],
|
||||||
&rate_uv_tokenonly[uv_tx_size],
|
&rate_uv_tokenonly[uv_tx_size],
|
||||||
&dist_uv[uv_tx_size],
|
&dist_uv[uv_tx_size],
|
||||||
|
|||||||
Reference in New Issue
Block a user