From cc980fb8157f98b3895ad7a2ea29ae2abae9eab9 Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Tue, 5 May 2015 09:37:34 +0300 Subject: [PATCH] Fix coverity warning. - False positive for use of uninitialized variable. --- src/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 6949a539..423a6697 100644 --- a/src/search.c +++ b/src/search.c @@ -1601,6 +1601,8 @@ static double search_intra_trdepth(encoder_state_t * const state, cu_info_t *const pred_cu, lcu_t *const lcu) { + assert(depth >= 0 && depth <= MAX_PU_DEPTH); + const int width = LCU_WIDTH >> depth; const int width_c = width > TR_MIN_WIDTH ? width / 2 : width; @@ -1620,8 +1622,6 @@ static double search_intra_trdepth(encoder_state_t * const state, double split_cost = INT32_MAX; double nosplit_cost = INT32_MAX; - assert(width >= TR_MIN_WIDTH); - if (depth > 0) { tr_cu->tr_depth = depth; pred_cu->tr_depth = depth;