Commit ee810273 authored by Yushin Cho's avatar Yushin Cho

Fix a static analyzer warning

Also fix asan warnings.

Change-Id: I21fe3150635540abacb5b1b8928c6470db605035
parent 74acf004
......@@ -802,8 +802,7 @@ static double od_compute_dist_common(int activity_masking, uint16_t *x,
static double od_compute_dist(uint16_t *x, uint16_t *y, int bsize_w,
int bsize_h, int qindex) {
int i;
double sum;
sum = 0;
double sum = 0;
assert(bsize_w >= 8 && bsize_h >= 8);
......@@ -841,8 +840,7 @@ static double od_compute_dist(uint16_t *x, uint16_t *y, int bsize_w,
static double od_compute_dist_diff(uint16_t *x, int16_t *e, int bsize_w,
int bsize_h, int qindex) {
int i;
double sum;
sum = 0;
double sum = 0;
assert(bsize_w >= 8 && bsize_h >= 8);
......@@ -888,11 +886,13 @@ int64_t av1_dist_8x8(const AV1_COMP *const cpi, const MACROBLOCK *x,
DECLARE_ALIGNED(16, uint16_t, orig[MAX_TX_SQUARE]);
DECLARE_ALIGNED(16, uint16_t, rec[MAX_TX_SQUARE]);
assert(bsw >= 8);
assert(bsh >= 8);
assert((bsw & 0x07) == 0);
assert((bsh & 0x07) == 0);
if (x->tune_metric == AOM_TUNE_CDEF_DIST ||
x->tune_metric == AOM_TUNE_DAALA_DIST) {
assert((bsw & 0x07) == 0);
assert((bsh & 0x07) == 0);
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < bsh; j++)
......@@ -987,11 +987,13 @@ static int64_t av1_dist_8x8_diff(const MACROBLOCK *x, const uint8_t *src,
DECLARE_ALIGNED(16, uint16_t, orig[MAX_TX_SQUARE]);
DECLARE_ALIGNED(16, int16_t, diff16[MAX_TX_SQUARE]);
assert(bsw >= 8);
assert(bsh >= 8);
assert((bsw & 0x07) == 0);
assert((bsh & 0x07) == 0);
if (x->tune_metric == AOM_TUNE_CDEF_DIST ||
x->tune_metric == AOM_TUNE_DAALA_DIST) {
assert((bsw & 0x07) == 0);
assert((bsh & 0x07) == 0);
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < bsh; j++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment