From f75b0b11c373c7672f5ad5521be64da443a73af2 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Thu, 13 Sep 2018 09:57:33 +0300 Subject: [PATCH] Simplify intra filtered ref pixel selection --- src/intra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intra.c b/src/intra.c index 5b116a78..a7e4f1d1 100644 --- a/src/intra.c +++ b/src/intra.c @@ -310,8 +310,8 @@ void kvz_intra_predict( } else { // Angular modes use smoothed reference pixels, unless the mode is close // to being either vertical or horizontal. - static const int kvz_intra_hor_ver_dist_thres[2][8] = { { 20, 20, 20, 14, 2, 0, 20, 0 }, {40, 40, 40, 28, 4, 0, 40, 0} }; - int filter_threshold = kvz_intra_hor_ver_dist_thres[color == COLOR_Y ? 0 : 1][kvz_math_floor_log2(width)]; + static const int kvz_intra_hor_ver_dist_thres[6] = {20, 14, 2, 0, 20, 0 }; + int filter_threshold = kvz_intra_hor_ver_dist_thres[kvz_math_floor_log2(width)-2]; int dist_from_vert_or_hor = MIN(abs(mode - 50), abs(mode - 18)); if (dist_from_vert_or_hor > filter_threshold) { used_ref = &refs->filtered_ref;