From 9f605152ae471e55b103f4dbd3d45758de9d2144 Mon Sep 17 00:00:00 2001 From: Eemeli Kallio Date: Wed, 5 Apr 2017 13:01:32 +0300 Subject: [PATCH] Changed intra to use best rough cost when using inter and rd=2 --- src/search_intra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search_intra.c b/src/search_intra.c index 0f024a90..9ce031f2 100644 --- a/src/search_intra.c +++ b/src/search_intra.c @@ -836,7 +836,7 @@ void kvz_search_cu_intra(encoder_state_t * const state, // Set transform depth to current depth, meaning no transform splits. 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. const int32_t rdo_level = state->encoder_control->cfg.rdo; 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); *mode_out = modes[best_mode_i]; - *cost_out = costs[best_mode_i]; + *cost_out = best_rough_cost; }