|
static bool | fracmv_within_tile (const inter_search_info_t *info, int x, int y) |
|
static bool | intmv_within_tile (const inter_search_info_t *info, int x, int y) |
|
static bool | check_mv_cost (inter_search_info_t *info, int x, int y, double *best_cost, double *best_bits, vector2d_t *best_mv) |
| Calculate cost for an integer motion vector.
|
|
static unsigned | get_ep_ex_golomb_bitcost (unsigned symbol) |
|
static bool | mv_in_merge (const inter_search_info_t *info, vector2d_t mv) |
| Checks if mv is one of the merge candidates.
|
|
static void | select_starting_point (inter_search_info_t *info, vector2d_t extra_mv, double *best_cost, double *best_bits, vector2d_t *best_mv) |
| Select starting point for integer motion estimation search.
|
|
static double | get_mvd_coding_cost (const encoder_state_t *state, const cabac_data_t *cabac, const int32_t mvd_hor, const int32_t mvd_ver) |
|
static int | select_mv_cand (const encoder_state_t *state, int16_t mv_cand[2][2], int32_t mv_x, int32_t mv_y, double *cost_out) |
|
static double | calc_mvd_cost (const encoder_state_t *state, int x, int y, int mv_shift, int16_t mv_cand[2][2], inter_merge_cand_t merge_cand[5], int16_t num_cand, int32_t ref_idx, double *bitcost) |
|
static bool | early_terminate (inter_search_info_t *info, double *best_cost, double *best_bits, vector2d_t *best_mv) |
|
void | kvz_tz_pattern_search (inter_search_info_t *info, unsigned pattern_type, const int iDist, vector2d_t mv, int *best_dist, double *best_cost, double *best_bits, vector2d_t *best_mv) |
|
void | kvz_tz_raster_search (inter_search_info_t *info, int iSearchRange, int iRaster, double *best_cost, double *best_bits, vector2d_t *best_mv) |
|
static void | tz_search (inter_search_info_t *info, vector2d_t extra_mv, double *best_cost, double *best_bits, vector2d_t *best_mv) |
|
static void | hexagon_search (inter_search_info_t *info, vector2d_t extra_mv, uint32_t steps, double *best_cost, double *best_bits, vector2d_t *best_mv) |
| Do motion search using the HEXBS algorithm.
|
|
static void | diamond_search (inter_search_info_t *info, vector2d_t extra_mv, uint32_t steps, double *best_cost, double *best_bits, vector2d_t *best_mv) |
| Do motion search using the diamond algorithm.
|
|
static void | search_mv_full (inter_search_info_t *info, int32_t search_range, vector2d_t extra_mv, double *best_cost, double *best_bits, vector2d_t *best_mv) |
|
static void | search_frac (inter_search_info_t *info, double *best_cost, double *best_bits, vector2d_t *best_mv) |
| Do fractional motion estimation.
|
|
int | kvz_get_skip_context (int x, int y, lcu_t *const lcu, cu_array_t *const cu_a) |
|
static int16_t | get_scaled_mv (int16_t mv, int scale) |
| Calculate the scaled MV.
|
|
static void | apply_mv_scaling (int32_t current_poc, int32_t current_ref_poc, int32_t neighbor_poc, int32_t neighbor_ref_poc, vector2d_t *mv_cand) |
| Scale the MV according to the POC difference.
|
|
static void | search_pu_inter_ref (inter_search_info_t *info, int depth, lcu_t *lcu, cu_info_t *cur_cu, unit_stats_map_t *amvp) |
| Perform inter search for a single reference frame.
|
|
static void | search_pu_inter_bipred (inter_search_info_t *info, int depth, lcu_t *lcu, unit_stats_map_t *amvp_bipred) |
| Search bipred modes for a PU.
|
|
static bool | merge_candidate_in_list (inter_merge_cand_t *all_cands, inter_merge_cand_t *cand_to_add, unit_stats_map_t *merge) |
| Check if an identical merge candidate exists in a list.
|
|
static void | search_pu_inter (encoder_state_t *const state, int x_cu, int y_cu, int depth, part_mode_t part_mode, int i_pu, lcu_t *lcu, unit_stats_map_t *amvp, unit_stats_map_t *merge, inter_search_info_t *info) |
| Collect PU parameters and costs at this depth.
|
|
void | kvz_cu_cost_inter_rd2 (encoder_state_t *const state, int x, int y, int depth, cu_info_t *cur_cu, lcu_t *lcu, double *inter_cost, double *inter_bitcost) |
| Calculate inter coding cost for luma and chroma CBs (–rd=2 accuracy).
|
|
void | kvz_search_cu_inter (encoder_state_t *const state, int x, int y, int depth, lcu_t *lcu, double *inter_cost, double *inter_bitcost) |
| Update CU to have best modes at this depth.
|
|
void | kvz_search_cu_smp (encoder_state_t *const state, int x, int y, int depth, part_mode_t part_mode, lcu_t *lcu, double *inter_cost, double *inter_bitcost) |
| Update CU to have best modes at this depth.
|
|
- Parameters
-
info | search info |
extra_mv | extra motion vector to check |
steps | how many steps are done at maximum before exiting |
Motion vector is searched by searching iteratively with a diamond-shaped pattern. We take care of not checking the direction we came from, but further checking for avoiding visits to already visited points is not done.
If a non 0,0 predicted motion vector predictor is given as extra_mv, the 0,0 vector is also tried. This is hoped to help in the case where the predicted motion vector is way off. In the future even more additional points like 0,0 might be used, such as vectors from top or left.
- Parameters
-
info | search info |
extra_mv | extra motion vector to check |
steps | how many steps are done at maximum before exiting, does not affect the final step |
Motion vector is searched by first searching iteratively with the large hexagon pattern until the best match is at the center of the hexagon. As a final step a smaller hexagon is used to check the adjacent pixels.
If a non 0,0 predicted motion vector predictor is given as extra_mv, the 0,0 vector is also tried. This is hoped to help in the case where the predicted motion vector is way off. In the future even more additional points like 0,0 might be used, such as vectors from top or left.