From 351817d0082f2418bd4544906827f685c6ca7314 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 8 Oct 2013 12:13:52 +0300 Subject: [PATCH] Fixed intra block selection (always selected 64x64 which was not in search) --- src/search.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 963b3ab8..b905ee4f 100644 --- a/src/search.c +++ b/src/search.c @@ -444,11 +444,12 @@ uint32_t search_best_mode(encoder_control *encoder, cost += search_best_mode(encoder, x_ctb + change, y_ctb + change, depth + 1); // We split if the cost is better (0 cost -> not checked) - if (cost != 0 + if ( (encoder->in.cur_pic->slicetype == SLICE_I && depth < MIN_INTRA_SEARCH_DEPTH) || + (cost != 0 && (best_intra_cost != 0 && cost + lambdaCost < best_intra_cost) && (best_inter_cost != 0 && cost + lambdaCost < best_inter_cost - && encoder->in.cur_pic->slicetype != SLICE_I)) + && encoder->in.cur_pic->slicetype != SLICE_I))) { // Set split to 1 best_cost = cost + lambdaCost;