Rename intra prediction to kvz_intra_predict

This commit is contained in:
Ari Koivula 2015-10-05 05:42:59 +03:00
parent 7280dbf429
commit 30b4fa4247
3 changed files with 11 additions and 11 deletions

View file

@ -375,7 +375,7 @@ static void kvz_intra_pred_filtered_dc(
}
void kvz_intra_get_pred_new(
void kvz_intra_predict(
kvz_intra_references *refs,
int_fast8_t log2_width,
int_fast8_t mode,
@ -628,7 +628,7 @@ void kvz_intra_recon_lcu_luma(encoder_state_t * const state, int x, int y, int d
kvz_intra_build_reference(log2_width, COLOR_Y, &luma_px, &pic_px, lcu, &refs);
kvz_pixel pred[32 * 32];
kvz_intra_get_pred_new(&refs, log2_width, intra_mode, COLOR_Y, pred);
kvz_intra_predict(&refs, log2_width, intra_mode, COLOR_Y, pred);
kvz_pixel *block_in_lcu = &lcu->rec.y[lcu_px.x + lcu_px.y * LCU_WIDTH];
kvz_pixels_blit(pred, block_in_lcu, width, width, width, LCU_WIDTH);
@ -680,7 +680,7 @@ void kvz_intra_recon_lcu_chroma(encoder_state_t * const state, int x, int y, int
kvz_intra_build_reference(log2_width_c, COLOR_U, &luma_px, &pic_px, lcu, &refs);
kvz_pixel pred[32 * 32];
kvz_intra_get_pred_new(&refs, log2_width_c, intra_mode, COLOR_U, pred);
kvz_intra_predict(&refs, log2_width_c, intra_mode, COLOR_U, pred);
kvz_pixel *pu_in_lcu = &lcu->rec.u[lcu_px.x / 2 + (lcu_px.y * LCU_WIDTH) / 4];
kvz_pixels_blit(pred, pu_in_lcu, width_c, width_c, width_c, LCU_WIDTH_C);
@ -692,7 +692,7 @@ void kvz_intra_recon_lcu_chroma(encoder_state_t * const state, int x, int y, int
kvz_intra_build_reference(log2_width_c, COLOR_V, &luma_px, &pic_px, lcu, &refs);
kvz_pixel pred[32 * 32];
kvz_intra_get_pred_new(&refs, log2_width_c, intra_mode, COLOR_V, pred);
kvz_intra_predict(&refs, log2_width_c, intra_mode, COLOR_V, pred);
kvz_pixel *pu_in_lcu = &lcu->rec.v[lcu_px.x / 2 + (lcu_px.y * LCU_WIDTH) / 4];
kvz_pixels_blit(pred, pu_in_lcu, width_c, width_c, width_c, LCU_WIDTH_C);

View file

@ -70,7 +70,7 @@ void kvz_intra_build_reference(
* \param color Color of the prediction.
* \param dst Buffer for the predicted pixels.
*/
void kvz_intra_get_pred_new(
void kvz_intra_predict(
kvz_intra_references *refs,
int_fast8_t log2_width,
int_fast8_t mode,

View file

@ -296,7 +296,7 @@ static void search_intra_chroma_rough(encoder_state_t * const state,
kvz_pixels_blit(orig_u, orig_block, width, width, origstride, width);
for (int i = 0; i < 5; ++i) {
if (modes[i] == luma_mode) continue;
kvz_intra_get_pred_new(refs_u, log2_width_c, modes[i], COLOR_U, pred);
kvz_intra_predict(refs_u, log2_width_c, modes[i], COLOR_U, pred);
//costs[i] += get_cost(encoder_state, pred, orig_block, satd_func, sad_func, width);
costs[i] += satd_func(pred, orig_block);
}
@ -304,7 +304,7 @@ static void search_intra_chroma_rough(encoder_state_t * const state,
kvz_pixels_blit(orig_v, orig_block, width, width, origstride, width);
for (int i = 0; i < 5; ++i) {
if (modes[i] == luma_mode) continue;
kvz_intra_get_pred_new(refs_v, log2_width_c, modes[i], COLOR_V, pred);
kvz_intra_predict(refs_v, log2_width_c, modes[i], COLOR_V, pred);
//costs[i] += get_cost(encoder_state, pred, orig_block, satd_func, sad_func, width);
costs[i] += satd_func(pred, orig_block);
}
@ -379,7 +379,7 @@ static int8_t search_intra_rough(encoder_state_t * const state,
// Calculate SAD for evenly spaced modes to select the starting point for
// the recursive search.
for (int mode = 2; mode <= 34; mode += offset) {
kvz_intra_get_pred_new(refs, log2_width, mode, COLOR_Y, pred);
kvz_intra_predict(refs, log2_width, mode, COLOR_Y, pred);
costs[modes_selected] = get_cost(state, pred, orig_block, satd_func, sad_func, width);
modes[modes_selected] = mode;
@ -402,7 +402,7 @@ static int8_t search_intra_rough(encoder_state_t * const state,
int8_t center_node = best_mode;
int8_t mode = center_node - offset;
if (mode >= 2) {
kvz_intra_get_pred_new(refs, log2_width, mode, COLOR_Y, pred);
kvz_intra_predict(refs, log2_width, mode, COLOR_Y, pred);
costs[modes_selected] = get_cost(state, pred, orig_block, satd_func, sad_func, width);
modes[modes_selected] = mode;
if (costs[modes_selected] < best_cost) {
@ -414,7 +414,7 @@ static int8_t search_intra_rough(encoder_state_t * const state,
mode = center_node + offset;
if (mode <= 34) {
kvz_intra_get_pred_new(refs, log2_width, mode, COLOR_Y, pred);
kvz_intra_predict(refs, log2_width, mode, COLOR_Y, pred);
costs[modes_selected] = get_cost(state, pred, orig_block, satd_func, sad_func, width);
modes[modes_selected] = mode;
if (costs[modes_selected] < best_cost) {
@ -441,7 +441,7 @@ static int8_t search_intra_rough(encoder_state_t * const state,
}
if (!has_mode) {
kvz_intra_get_pred_new(refs, log2_width, mode, COLOR_Y, pred);
kvz_intra_predict(refs, log2_width, mode, COLOR_Y, pred);
costs[modes_selected] = get_cost(state, pred, orig_block, satd_func, sad_func, width);
modes[modes_selected] = mode;
++modes_selected;