shithub: libvpx

Download patch

ref: 1545bbcccb1b42b77fe9cf97054d1f3abf4f2d3e
parent: 65e5ba89b3c15c2fdbad35808bc91c1838754270
author: James Zern <jzern@google.com>
date: Mon Apr 1 10:54:44 EDT 2019

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

--- a/vp8/encoder/rdopt.c
+++ b/vp8/encoder/rdopt.c
@@ -1944,6 +1944,7 @@
         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 @@
         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;