shithub: libvpx

Download patch

ref: 6b2cc75622770fc9481c216789e0a684d7883e06
parent: f0a39790630dc842d86ea1b49e948859757371ad
author: Johann <johannkoenig@google.com>
date: Tue Mar 13 14:31:26 EDT 2018

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

--- a/examples/vp9_spatial_svc_encoder.c
+++ b/examples/vp9_spatial_svc_encoder.c
@@ -672,6 +672,7 @@
     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;