From 6999e4484143091067b0d631b624aea7554a46db Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Sun, 8 Sep 2024 12:21:01 +0300 Subject: [PATCH] [ibc] Remove check_mv_cost_satd since it is not needed and causes an error, fixes #23 --- src/search_ibc.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/search_ibc.c b/src/search_ibc.c index 39038aae..7d1d2820 100644 --- a/src/search_ibc.c +++ b/src/search_ibc.c @@ -219,38 +219,6 @@ static uint32_t calculate_ibc_cost_sad(ibc_search_info_t *info, const cu_loc_t* return cost; } -static bool check_mv_cost_satd(ibc_search_info_t *info, - int x, - int y, - double *best_cost, - double* best_bits, - vector2d_t *best_mv) -{ - if (!intmv_within_ibc_range(info, x, y)) return false; - - double cost = calculate_ibc_cost_satd(info->state, info->lcu, &info->origin, x, y); - - if (cost >= *best_cost) return false; - - cost += info->mvd_cost_func( - info->state, - x, y, INTERNAL_MV_PREC, - info->mv_cand, - NULL, - 0, - 0, - best_bits - ); - - if (cost >= *best_cost) return false; - - // Set to motion vector in internal pixel precision. - best_mv->x = x * (1 << INTERNAL_MV_PREC); - best_mv->y = y * (1 << INTERNAL_MV_PREC); - *best_cost = cost; - - return true; - } /** * \brief Calculate cost for an integer motion vector. *