this quiets a static analysis warning with clang 11:
vpx_dsp/avg.c:353:15: warning: Assigned value is garbage or undefined
[core.uninitialized.Assign]
hbuf[idx] /= norm_factor;
^ ~~~~~~~~~~~
the same fix was applied in libaom:
1ad0889bc aom_int_pro_row_c: add an assert for height
Bug: b/
229626362
Change-Id: Ic8a249f866b33b02ec9f378581e51ac104d97169
* 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_dsp_rtcd.h"
const int ref_stride, const int height) {
int idx;
const int norm_factor = height >> 1;
+ assert(height >= 2);
for (idx = 0; idx < 16; ++idx) {
int i;
hbuf[idx] = 0;