From: Johann Date: Tue, 31 Jan 2017 23:05:51 +0000 (-0800) Subject: deblock: annotate postproc parameters X-Git-Tag: v1.7.0~762^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32f68cc58c1f3b7a5cb102e55b9987336a1c2770;p=libvpx 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 --- diff --git a/vpx_dsp/deblock.c b/vpx_dsp/deblock.c index 6c2748497..a0db1e40c 100644 --- 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 #include #include "vpx/vpx_integer.h" @@ -48,6 +49,9 @@ void vpx_post_proc_down_and_across_mb_row_c(unsigned char *src_ptr, 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 */ p_src = src_ptr;