av1_convolve_scale_sse4: mv var decl closer to 1st use
this fixes a couple zero offset of a null pointer warnings under clang
-fsanitize=undefined:
av1_convolve_scale_sse4.c:402:39: runtime error: applying zero offset to
null pointer
Bug: aomedia:3136
Bug: b/229626362
Change-Id: Ie9241f81007ee6ea9afb6f65a0cb5e42b2b53c84
diff --git a/av1/common/x86/av1_convolve_scale_sse4.c b/av1/common/x86/av1_convolve_scale_sse4.c
index 6d27b52..3e17620 100644
--- a/av1/common/x86/av1_convolve_scale_sse4.c
+++ b/av1/common/x86/av1_convolve_scale_sse4.c
@@ -168,11 +168,11 @@
_mm_sra_epi32(_mm_add_epi32(conv, round_shift_add), round_shift);
uint8_t *dst_x = dst + y * dst_stride + x;
- CONV_BUF_TYPE *dst_16_x = dst16 + y * dst16_stride + x;
__m128i result;
__m128i shifted_16 = _mm_packus_epi32(shifted, shifted);
if (conv_params->is_compound) {
+ CONV_BUF_TYPE *dst_16_x = dst16 + y * dst16_stride + x;
if (conv_params->do_average) {
const __m128i p_16 = _mm_loadl_epi64((__m128i *)dst_16_x);
if (conv_params->use_dist_wtd_comp_avg) {
@@ -399,10 +399,10 @@
_mm_sra_epi32(_mm_add_epi32(conv, round_shift_add), round_shift);
uint16_t *dst_x = dst + y * dst_stride + x;
- CONV_BUF_TYPE *dst_16_x = dst16 + y * dst16_stride + x;
__m128i result;
if (conv_params->is_compound) {
+ CONV_BUF_TYPE *dst_16_x = dst16 + y * dst16_stride + x;
if (conv_params->do_average) {
__m128i p_32 =
_mm_cvtepu16_epi32(_mm_loadl_epi64((__m128i *)dst_16_x));