shithub: libvpx

Download patch

ref: 32f68cc58c1f3b7a5cb102e55b9987336a1c2770
parent: 9efc42f4f89eeb05aba384e9179281ece3be6429
author: Johann <[email protected]>
date: Tue Jan 31 10:05:51 EST 2017

deblock: annotate postproc parameters

Clears a clang static analyzer warning where 'cols' is assumed to be
less than 0, preventing the for loop from executing.

The assembly already requires that the size be 8 or 16 (U/V or Y plane)
and cols is a multiple of 8.

Change-Id: Ica4612690ead1638c94cfe56b306e87f8ce644f9

--- a/vpx_dsp/deblock.c
+++ b/vpx_dsp/deblock.c
@@ -7,6 +7,7 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
+#include <assert.h>
 #include <stdlib.h>
 #include "vpx/vpx_integer.h"
 
@@ -47,6 +48,9 @@
   int col;
   unsigned char v;
   unsigned char d[4];
+
+  assert(size >= 8);
+  assert(cols >= 8);
 
   for (row = 0; row < size; row++) {
     /* post_proc_down for one row */