From 4751a3744b4f96603f87eeb7fb3d9b360b6ba587 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Mon, 19 May 2014 14:23:20 +0300 Subject: [PATCH] Fix intra mode search not doing boundary smoothing for DC. - Move the boundary smoothing to the prediction function to make sure it's not forgotten. --- src/intra.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/intra.c b/src/intra.c index ddf86458..fbe9160b 100644 --- a/src/intra.c +++ b/src/intra.c @@ -248,6 +248,10 @@ void intra_get_pred(const encoder_control * const encoder, pixel *rec[2], int re for (i = 0; i < width * width; i++) { dst[i] = val; } + // Do extra post filtering for edge pixels of luma DC mode. + if (!is_chroma && width < 32) { + intra_dc_pred_filtering(ref_pixels, recstride, dst, width, width, width); + } } else { int filter_threshold = intra_hor_ver_dist_thres[g_to_bits[width]]; int dist_from_vert_or_hor = MIN(abs(mode - 26), abs(mode - 10)); @@ -738,12 +742,6 @@ void intra_recon_lcu(encoder_state * const encoder_state, int x, int y, int dept intra_recon(encoder, rec_shift, width * 2 + 8, width, recbase_y, rec_stride, cur_cu->intra[pu_index].mode, 0); - // Filter DC-prediction - if (cur_cu->intra[pu_index].mode == 1 && width < 32) { - intra_dc_pred_filtering(rec_shift, width * 2 + 8, recbase_y, - rec_stride, width, width); - } - quantize_lcu_luma_residual(encoder_state, x, y, depth, lcu); quantize_lcu_chroma_residual(encoder_state, x, y, depth, lcu); }