diff options
author | Angie Chiang <angiebird@google.com> | 2018-11-19 11:31:25 -0800 |
---|---|---|
committer | Angie Chiang <angiebird@google.com> | 2018-11-19 18:48:34 -0800 |
commit | cf6a57692058dc3f1b15668ab613970ed376d2b3 (patch) | |
tree | 9ad04316dd2fc9a10500a1beae33c07af4a99301 /test/comp_avg_pred_test.cc | |
parent | 9a848af54d6921ea9d9a13af96aac270a88a500f (diff) | |
download | libvpx-cf6a57692058dc3f1b15668ab613970ed376d2b3.tar libvpx-cf6a57692058dc3f1b15668ab613970ed376d2b3.tar.gz libvpx-cf6a57692058dc3f1b15668ab613970ed376d2b3.tar.bz2 libvpx-cf6a57692058dc3f1b15668ab613970ed376d2b3.zip |
Fix scan_build_warnings in comp_avg_pred_test.cc
BUG=webm:1575
Change-Id: I9b5f8b08d23fd62ff6400605023f33e3890b0f2d
Diffstat (limited to 'test/comp_avg_pred_test.cc')
-rw-r--r-- | test/comp_avg_pred_test.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/comp_avg_pred_test.cc b/test/comp_avg_pred_test.cc index 110e06583..6d658cbec 100644 --- a/test/comp_avg_pred_test.cc +++ b/test/comp_avg_pred_test.cc @@ -29,6 +29,11 @@ uint8_t avg_with_rounding(uint8_t a, uint8_t b) { return (a + b + 1) >> 1; } void reference_pred(const Buffer<uint8_t> &pred, const Buffer<uint8_t> &ref, int width, int height, Buffer<uint8_t> *avg) { + if (avg->TopLeftPixel() == NULL || pred.TopLeftPixel() == NULL || + ref.TopLeftPixel() == NULL) { + assert(0); + return; + } for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { avg->TopLeftPixel()[y * avg->stride() + x] = |