Remove now deprecated array

This commit is contained in:
Ari Lemmetti 2021-11-29 02:16:28 +02:00
parent 90c0a708a7
commit 2ed434e57b

View file

@ -1219,7 +1219,6 @@ static void search_pu_inter_ref(inter_search_info_t *info,
cu_info_t *cur_cu, cu_info_t *cur_cu,
double *inter_cost, double *inter_cost,
uint32_t *inter_bitcost, uint32_t *inter_bitcost,
double *best_LX_cost,
blk_stats_map_t *amvp) blk_stats_map_t *amvp)
{ {
const kvz_config *cfg = &info->state->encoder_control->cfg; const kvz_config *cfg = &info->state->encoder_control->cfg;
@ -1406,7 +1405,6 @@ static void search_pu_inter_ref(inter_search_info_t *info,
// Update best unipreds for biprediction // Update best unipreds for biprediction
if (info->best_cost < best_LX_cost[ref_list]) {
bool valid_mv = fracmv_within_tile(info, mv.x, mv.y); bool valid_mv = fracmv_within_tile(info, mv.x, mv.y);
if (valid_mv) { if (valid_mv) {
// Map reference index to L0/L1 pictures // Map reference index to L0/L1 pictures
@ -1425,10 +1423,6 @@ static void search_pu_inter_ref(inter_search_info_t *info,
entry->cost = info->best_cost; entry->cost = info->best_cost;
entry->bits = info->best_bitcost; entry->bits = info->best_bitcost;
cur_map->size++; cur_map->size++;
// TODO: remove (this is just to keep old functionality)
best_LX_cost[ref_list] = info->best_cost;
}
} }
} }
@ -1775,7 +1769,6 @@ static void search_pu_inter(encoder_state_t * const state,
// Store unipred information of L0 and L1 for biprediction // Store unipred information of L0 and L1 for biprediction
// Best cost will be left at MAX_DOUBLE if no valid CU is found // Best cost will be left at MAX_DOUBLE if no valid CU is found
double best_cost_LX[2] = { MAX_DOUBLE, MAX_DOUBLE }; // TODO: remove
blk_stats_t stats[2][MAX_REF_PIC_COUNT]; blk_stats_t stats[2][MAX_REF_PIC_COUNT];
int8_t idx[2][MAX_REF_PIC_COUNT]; int8_t idx[2][MAX_REF_PIC_COUNT];
blk_stats_map_t amvp[2]; blk_stats_map_t amvp[2];
@ -1794,7 +1787,7 @@ static void search_pu_inter(encoder_state_t * const state,
info.ref_idx = ref_idx; info.ref_idx = ref_idx;
info.ref = state->frame->ref->images[ref_idx]; info.ref = state->frame->ref->images[ref_idx];
search_pu_inter_ref(&info, depth, lcu, cur_cu, inter_cost, inter_bitcost, best_cost_LX, amvp); search_pu_inter_ref(&info, depth, lcu, cur_cu, inter_cost, inter_bitcost, amvp);
} }
kvz_sort_indices_by_cost(&amvp[0]); kvz_sort_indices_by_cost(&amvp[0]);
@ -1808,7 +1801,7 @@ static void search_pu_inter(encoder_state_t * const state,
if (can_use_bipred) { if (can_use_bipred) {
// Try biprediction from valid acquired unipreds. // Try biprediction from valid acquired unipreds.
if (best_cost_LX[0] != MAX_DOUBLE && best_cost_LX[1] != MAX_DOUBLE) { if (amvp[0].size > 0 && amvp[1].size > 0) {
// TODO: logic is copy paste from search_pu_inter_bipred. // TODO: logic is copy paste from search_pu_inter_bipred.
// Get rid of duplicate code asap. // Get rid of duplicate code asap.