spatial svc: set window_size to 15
authorJohann <johannkoenig@google.com>
Wed, 14 Mar 2018 01:31:26 +0000 (18:31 -0700)
committerJohann Koenig <johannkoenig@google.com>
Wed, 14 Mar 2018 19:30:38 +0000 (19:30 +0000)
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

examples/vp9_spatial_svc_encoder.c

index 745fedd..5b98ce7 100644 (file)
@@ -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;