Changed intra to use best rough cost when using inter and rd=2

This commit is contained in:
Eemeli Kallio 2017-04-05 13:01:32 +03:00
parent 33ce101ab5
commit 9f605152ae

View file

@ -836,7 +836,7 @@ void kvz_search_cu_intra(encoder_state_t * const state,
// Set transform depth to current depth, meaning no transform splits. // Set transform depth to current depth, meaning no transform splits.
kvz_lcu_set_trdepth(lcu, x_px, y_px, depth, depth); kvz_lcu_set_trdepth(lcu, x_px, y_px, depth, depth);
double best_rough_cost = costs[select_best_mode_index(modes, costs, number_of_modes)];
// Refine results with slower search or get some results if rough search was skipped. // Refine results with slower search or get some results if rough search was skipped.
const int32_t rdo_level = state->encoder_control->cfg.rdo; const int32_t rdo_level = state->encoder_control->cfg.rdo;
if (rdo_level >= 2 || skip_rough_search) { if (rdo_level >= 2 || skip_rough_search) {
@ -863,5 +863,5 @@ void kvz_search_cu_intra(encoder_state_t * const state,
uint8_t best_mode_i = select_best_mode_index(modes, costs, number_of_modes); uint8_t best_mode_i = select_best_mode_index(modes, costs, number_of_modes);
*mode_out = modes[best_mode_i]; *mode_out = modes[best_mode_i];
*cost_out = costs[best_mode_i]; *cost_out = best_rough_cost;
} }