diff options
author | Angie Chiang <angiebird@google.com> | 2018-11-20 16:39:53 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2018-11-21 11:24:09 -0800 |
commit | 6234256646fe5f02defdc57a48bb8a81a7d4a6d6 (patch) | |
tree | e2758fb8d9fb7e38413c701db5f3dc53f3ae68d4 /tools | |
parent | 49b6b99f5c0805a8b7961b0cccec03cabdedb209 (diff) | |
download | libvpx-6234256646fe5f02defdc57a48bb8a81a7d4a6d6.tar.gz libvpx-6234256646fe5f02defdc57a48bb8a81a7d4a6d6.tar.bz2 libvpx-6234256646fe5f02defdc57a48bb8a81a7d4a6d6.zip |
Fix scan_build warnings in tiny_ssim.c
BUG=webm:1575
Change-Id: I022794054b494512903d912bdbf3e85461f31665
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tiny_ssim.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/tiny_ssim.c b/tools/tiny_ssim.c index 75ef569ce..36961b355 100644 --- a/tools/tiny_ssim.c +++ b/tools/tiny_ssim.c @@ -34,6 +34,10 @@ static uint64_t calc_plane_error16(uint16_t *orig, int orig_stride, unsigned int row, col; uint64_t total_sse = 0; int diff; + if (orig == NULL || recon == NULL) { + assert(0); + return 0; + } for (row = 0; row < rows; row++) { for (col = 0; col < cols; col++) { @@ -195,7 +199,7 @@ void ssim_parms_8x8(const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_sq_r, uint32_t *sum_sxr) { int i, j; if (s == NULL || r == NULL || sum_s == NULL || sum_r == NULL || - sum_sq_s == NULL || sum_sq_r || sum_sxr == NULL) { + sum_sq_s == NULL || sum_sq_r == NULL || sum_sxr == NULL) { assert(0); return; } @@ -214,6 +218,11 @@ void highbd_ssim_parms_8x8(const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr) { int i, j; + if (s == NULL || r == NULL || sum_s == NULL || sum_r == NULL || + sum_sq_s == NULL || sum_sq_r == NULL || sum_sxr == NULL) { + assert(0); + return; + } for (i = 0; i < 8; i++, s += sp, r += rp) { for (j = 0; j < 8; j++) { *sum_s += s[j]; |