Fix coverity warning.

- False positive for use of uninitialized variable.
This commit is contained in:
Ari Koivula 2015-05-05 09:37:34 +03:00
parent cf2a406aba
commit cc980fb815

View file

@ -1601,6 +1601,8 @@ static double search_intra_trdepth(encoder_state_t * const state,
cu_info_t *const pred_cu, cu_info_t *const pred_cu,
lcu_t *const lcu) lcu_t *const lcu)
{ {
assert(depth >= 0 && depth <= MAX_PU_DEPTH);
const int width = LCU_WIDTH >> depth; const int width = LCU_WIDTH >> depth;
const int width_c = width > TR_MIN_WIDTH ? width / 2 : width; 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 split_cost = INT32_MAX;
double nosplit_cost = INT32_MAX; double nosplit_cost = INT32_MAX;
assert(width >= TR_MIN_WIDTH);
if (depth > 0) { if (depth > 0) {
tr_cu->tr_depth = depth; tr_cu->tr_depth = depth;
pred_cu->tr_depth = depth; pred_cu->tr_depth = depth;