]> granicus.if.org Git - libvpx/commitdiff
vp9_resize.c: assert vp9_highbd_resize_plane conditions
authorJohann <johannkoenig@google.com>
Wed, 14 Mar 2018 21:45:23 +0000 (14:45 -0700)
committerJohann <johannkoenig@google.com>
Wed, 14 Mar 2018 23:42:14 +0000 (16:42 -0700)
Clears static analysis warnings similar to the low bitdepth version:
commit c4367b9b51782969d3b37ead6694d19ef9bfb58c
Author: James Zern <jzern@google.com>
Date:   Wed Mar 18 14:34:30 2015 -0700

    vp9_resize_plane: quiet some static analysis warnings

Change-Id: I5501d0d6ad7c7720d746d53ec07078cb9051d0d7

vp9/encoder/vp9_resize.c

index f6c4aad4d34f93d6ce2acad5f9acb75403a2fb62..6ac77aeef28855c570cd228a0f9e37a2df8778c7 100644 (file)
@@ -720,6 +720,10 @@ void vp9_highbd_resize_plane(const uint8_t *const input, int height, int width,
   uint16_t *arrbuf2 = (uint16_t *)malloc(sizeof(uint16_t) * height2);
   if (intbuf == NULL || tmpbuf == NULL || arrbuf == NULL || arrbuf2 == NULL)
     goto Error;
+  assert(width > 0);
+  assert(height > 0);
+  assert(width2 > 0);
+  assert(height2 > 0);
   for (i = 0; i < height; ++i) {
     highbd_resize_multistep(CONVERT_TO_SHORTPTR(input + in_stride * i), width,
                             intbuf + width2 * i, width2, tmpbuf, bd);