vp8 mfqe: zero map[]
The loop appears to set map[i] with the intention of running the 'j' loop up to that point. However, without zero'ing map[] first the behavior is unpredictable. Fixes a static analysis warning: warning: Branch condition evaluates to a garbage value for (j = 0; j < 4 && map[j]; ++j) { Change-Id: Ifa39353d8aa5cc47b467a7d3d8cdd3b5319fd997
This commit is contained in:
parent
8276005eba
commit
1f41c0d37f
@ -18,6 +18,7 @@
|
||||
|
||||
#include "./vp8_rtcd.h"
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "vp8/common/common.h"
|
||||
#include "vp8/common/postproc.h"
|
||||
#include "vpx_dsp/variance.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
@ -211,6 +212,7 @@ static int qualify_inter_mb(const MODE_INFO *mode_info_context, int *map) {
|
||||
{ 0, 1, 4, 5 }, { 2, 3, 6, 7 }, { 8, 9, 12, 13 }, { 10, 11, 14, 15 }
|
||||
};
|
||||
int i, j;
|
||||
vp8_zero(*map);
|
||||
for (i = 0; i < 4; ++i) {
|
||||
map[i] = 1;
|
||||
for (j = 0; j < 4 && map[j]; ++j) {
|
||||
|
Loading…
Reference in New Issue
Block a user