From: Johann Date: Wed, 14 Mar 2018 01:31:26 +0000 (-0700) Subject: spatial svc: set window_size to 15 X-Git-Tag: v1.8.0~803^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b2cc75622770fc9481c216789e0a684d7883e06;p=libvpx spatial svc: set window_size to 15 Static analysis does not recognize that output_rc_stat guards the usage of window_size. Clears this warning: The right operand of '>' is a garbage value if (frame_cnt > (unsigned int)rc.window_size) { set_rate_control_stats sets window_size to 15. Zeroing it just introduces another static analysis warning. Change-Id: Ieee7b81a385f986e42189101cfa39279e519b368 --- diff --git a/examples/vp9_spatial_svc_encoder.c b/examples/vp9_spatial_svc_encoder.c index 745feddb8..5b98ce7af 100644 --- a/examples/vp9_spatial_svc_encoder.c +++ b/examples/vp9_spatial_svc_encoder.c @@ -672,6 +672,7 @@ int main(int argc, const char **argv) { die("Failed to initialize encoder\n"); #if OUTPUT_RC_STATS + rc.window_size = 15; // Silence a static analysis warning. if (svc_ctx.output_rc_stat) { set_rate_control_stats(&rc, &enc_cfg); framerate = enc_cfg.g_timebase.den / enc_cfg.g_timebase.num;