Commit fcd795d5 authored by Yaowu Xu's avatar Yaowu Xu

Fix ubsan warnings: test/convolve_test.cc

This ports the change from libvpx to fix ubsan warnings.

Change-Id: I7e0a0ca2508606bba9dd2570b8a6b4e30f84f9e0
parent a91b59bd
...@@ -94,7 +94,8 @@ void filter_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride, ...@@ -94,7 +94,8 @@ void filter_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride,
// and filter_max_width = 16 // and filter_max_width = 16
// //
uint8_t intermediate_buffer[71 * kMaxDimension]; uint8_t intermediate_buffer[71 * kMaxDimension];
const int intermediate_next_stride = 1 - intermediate_height * output_width; const int intermediate_next_stride =
1 - static_cast<int>(intermediate_height * output_width);
// Horizontal pass (src -> transposed intermediate). // Horizontal pass (src -> transposed intermediate).
uint8_t *output_ptr = intermediate_buffer; uint8_t *output_ptr = intermediate_buffer;
...@@ -189,7 +190,8 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr, ...@@ -189,7 +190,8 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
* and filter_max_width = 16 * and filter_max_width = 16
*/ */
uint16_t intermediate_buffer[71 * kMaxDimension]; uint16_t intermediate_buffer[71 * kMaxDimension];
const int intermediate_next_stride = 1 - intermediate_height * output_width; const int intermediate_next_stride =
1 - static_cast<int>(intermediate_height * output_width);
// Horizontal pass (src -> transposed intermediate). // Horizontal pass (src -> transposed intermediate).
{ {
......
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