shithub: libvpx

Download patch

ref: bdfdfeb4072c27cd49f3ed14f414b1b6e9036631
parent: bd68f2952050ca303d5915c73f4e750e1af2008b
parent: 6c0565a4cc0ea835a4b92ade5713894fb6c7824a
author: James Zern <jzern@google.com>
date: Tue Mar 18 11:05:00 EDT 2014

Merge "svc_encodeframe: quiet -Warray-bounds warnings"

--- a/vpx/src/svc_encodeframe.c
+++ b/vpx/src/svc_encodeframe.c
@@ -13,6 +13,7 @@
  * VP9 SVC encoding support via libvpx
  */
 
+#include <assert.h>
 #include <math.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -550,6 +551,7 @@
     float total = 0;
     float alloc_ratio[VPX_SS_MAX_LAYERS] = {0};
 
+    assert(si->layers <= VPX_SS_MAX_LAYERS);
     for (i = 0; i < si->layers; ++i) {
       int pos = i + VPX_SS_MAX_LAYERS - svc_ctx->spatial_layers;
       if (pos < VPX_SS_MAX_LAYERS && si->scaling_factor_den[pos] > 0) {
--