|
static uint8_t | select_best_mode_index (const int8_t *modes, const double *costs, uint8_t length) |
| Select mode with the smallest cost. More...
|
|
static double | get_cost (encoder_state_t *const state, kvz_pixel *pred, kvz_pixel *orig_block, cost_pixel_nxn_func *satd_func, cost_pixel_nxn_func *sad_func, int width) |
| Calculate quality of the reconstruction. More...
|
|
static void | get_cost_dual (encoder_state_t *const state, const pred_buffer preds, const kvz_pixel *orig_block, cost_pixel_nxn_multi_func *satd_twin_func, cost_pixel_nxn_multi_func *sad_twin_func, int width, double *costs_out) |
| Calculate quality of the reconstruction. More...
|
|
static double | search_intra_trdepth (encoder_state_t *const state, int x_px, int y_px, int depth, int max_depth, int intra_mode, int cost_treshold, cu_info_t *const pred_cu, lcu_t *const lcu) |
| Perform search for best intra transform split configuration. More...
|
|
static void | search_intra_chroma_rough (encoder_state_t *const state, int x_px, int y_px, int depth, const kvz_pixel *orig_u, const kvz_pixel *orig_v, int16_t origstride, kvz_intra_references *refs_u, kvz_intra_references *refs_v, int8_t luma_mode, int8_t modes[5], double costs[5]) |
|
static int8_t | search_intra_rough (encoder_state_t *const state, kvz_pixel *orig, int32_t origstride, kvz_intra_references *refs, int log2_width, int8_t *intra_preds, int8_t modes[35], double costs[35]) |
| Order the intra prediction modes according to a fast criteria. More...
|
|
static int8_t | search_intra_rdo (encoder_state_t *const state, int x_px, int y_px, int depth, kvz_pixel *orig, int32_t origstride, int8_t *intra_preds, int modes_to_check, int8_t modes[35], double costs[35], lcu_t *lcu) |
| Find best intra mode out of the ones listed in parameter modes. More...
|
|
double | kvz_luma_mode_bits (const encoder_state_t *state, int8_t luma_mode, const int8_t *intra_preds) |
|
double | kvz_chroma_mode_bits (const encoder_state_t *state, int8_t chroma_mode, int8_t luma_mode) |
|
int8_t | kvz_search_intra_chroma_rdo (encoder_state_t *const state, int x_px, int y_px, int depth, int8_t intra_mode, int8_t modes[5], int8_t num_modes, lcu_t *const lcu) |
|
int8_t | kvz_search_cu_intra_chroma (encoder_state_t *const state, const int x_px, const int y_px, const int depth, lcu_t *lcu) |
|
void | kvz_search_cu_intra (encoder_state_t *const state, const int x_px, const int y_px, const int depth, lcu_t *lcu, int8_t *mode_out, double *cost_out) |
| Update lcu to have best modes at this depth. More...
|
|
This function uses SATD to order the intra prediction modes. For 4x4 modes SAD might be used instead, if the cost given by SAD is much better than the one given by SATD, to take into account that 4x4 modes can be coded with transform skip. This version of the function calculates two costs simultaneously to better utilize large SIMD registers with AVX and newer extensions.
The modes are searched using halving search and the total number of modes that are tried is dependent on size of the predicted block. More modes are tried for smaller blocks.
- Parameters
-
| orig | Pointer to the top-left corner of current CU in the picture being encoded. |
| orig_stride | Stride of param orig.. |
| rec | Pointer to the top-left corner of current CU in the picture being encoded. |
| rec_stride | Stride of param rec. |
| width | Width of the prediction block. |
| intra_preds | Array of the 3 predicted intra modes. |
[out] | modes | The modes ordered according to their RD costs, from best to worst. The number of modes and costs output is given by parameter modes_to_check. |
[out] | costs | The RD costs of corresponding modes in param modes. |
- Returns
- Number of prediction modes in param modes.