From 1545bbcccb1b42b77fe9cf97054d1f3abf4f2d3e Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 1 Apr 2019 14:54:44 -0700 Subject: [PATCH] vp8_rd_pick_inter_mode: clear static analysis warning uv_intra_rate is undefined by default, it is safe to use if uv_intra_done is true. BUG=webm:1616 Change-Id: I02e5f6c9e5cc6ed0b41619b4a59e55ea398bad41 --- vp8/encoder/rdopt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 679d66bbf..5252e9ee4 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1944,6 +1944,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, rd.distortion2 += distortion; if (tmp_rd < best_mode.yrd) { + assert(uv_intra_done); rd.rate2 += uv_intra_rate; rd.rate_uv = uv_intra_rate_tokenonly; rd.distortion2 += uv_intra_distortion; @@ -2004,6 +2005,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, rd.distortion2 += distortion; rd.rate2 += x->mbmode_cost[x->e_mbd.frame_type] [x->e_mbd.mode_info_context->mbmi.mode]; + assert(uv_intra_done); rd.rate2 += uv_intra_rate; rd.rate_uv = uv_intra_rate_tokenonly; rd.distortion2 += uv_intra_distortion; -- 2.40.0