diff options
author | Johann <johannkoenig@google.com> | 2018-03-14 13:25:05 -0700 |
---|---|---|
committer | Johann <johannkoenig@google.com> | 2018-03-14 13:56:39 -0700 |
commit | f9a13a1786e3ab2a35f9f5a97731ec6d05421dda (patch) | |
tree | 3b97792f55b5ea747c01867d458bd298c5f25588 /vp8 | |
parent | 1f41c0d37f59d3099260b435a87a6f89de404695 (diff) | |
download | libvpx-f9a13a1786e3ab2a35f9f5a97731ec6d05421dda.tar libvpx-f9a13a1786e3ab2a35f9f5a97731ec6d05421dda.tar.gz libvpx-f9a13a1786e3ab2a35f9f5a97731ec6d05421dda.tar.bz2 libvpx-f9a13a1786e3ab2a35f9f5a97731ec6d05421dda.zip |
vp8 rdopt.c: zero rd.[rate_uv|distortion_uv]
These values are not consistently set before calling update_best_mode.
In vp9_rdopt.c they are individual values instead of a struct and are
zero'd at declaration.
Clears a static analysis warning:
warning: The right operand of '-' is a garbage value
RDCOST(x->rdmult, x->rddiv, (rd->rate2 - rd->rate_uv - other_cost),
warning: The right operand of '-' is a garbage value
(rd->distortion2 - rd->distortion_uv));
Change-Id: I19895d062e7c0ac67937126ebc5dcb0afd3a2931
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/encoder/rdopt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index fa5dde15d..2951ca4fd 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1779,6 +1779,10 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, best_rd_sse = UINT_MAX; #endif + // _uv variables are not set consistantly before calling update_best_mode. + rd.rate_uv = 0; + rd.distortion_uv = 0; + mode_mv = mode_mv_sb[sign_bias]; best_ref_mv.as_int = 0; best_mode.rd = INT_MAX; |