Apply stride_align to byte count, not pixel count
stride_align is documented to be the "alignment, in bytes, of each row
in the image (stride)."
Change-Id: I4663f2fdf264800a0b8441772749920780248fbe
(cherry picked from commit a38ab61907e7619c6b100a769284505959def53e)
diff --git a/aom/src/aom_image.c b/aom/src/aom_image.c
index e10b8a9..09b6dd4 100644
--- a/aom/src/aom_image.c
+++ b/aom/src/aom_image.c
@@ -119,8 +119,9 @@
assert(d_h <= h);
uint64_t s = (fmt & AOM_IMG_FMT_PLANAR) ? w : (uint64_t)bps * w / bit_depth;
- s = (s + 2 * border + stride_align - 1) & ~((uint64_t)stride_align - 1);
+ s = s + 2 * border;
s = s * bit_depth / 8;
+ s = (s + stride_align - 1) & ~((uint64_t)stride_align - 1);
if (s > INT_MAX) goto fail;
const int stride_in_bytes = (int)s;