Commit 57b700a1 authored by Yaowu Xu's avatar Yaowu Xu

change to 32bit read from 64bit read

This is to avoid out-of-range memory access.

BUG=aomedia:391

Change-Id: I211ba1992d4f51fcf06cf2961d8cb2606b836207
parent 48c10c7d
......@@ -274,9 +274,9 @@ static void selfguided_restoration_2_v(uint8_t *src, int width, int height,
_mm_store_si128((__m128i *)&A[i * buf_stride + j], sum_sq);
x = _mm_cvtepu8_epi32(
_mm_loadl_epi64((__m128i *)&src[(i - 2) * src_stride + j]));
_mm_cvtsi32_si128(*((int *)&src[(i - 2) * src_stride + j])));
y = _mm_cvtepu8_epi32(
_mm_loadl_epi64((__m128i *)&src[(i + 3) * src_stride + j]));
_mm_cvtsi32_si128(*((int *)&src[(i + 3) * src_stride + j])));
sum = _mm_add_epi32(sum, _mm_sub_epi32(y, x));
......@@ -484,9 +484,9 @@ static void selfguided_restoration_3_v(uint8_t *src, int width, int height,
_mm_store_si128((__m128i *)&A[i * buf_stride + j], sum_sq);
x = _mm_cvtepu8_epi32(
_mm_loadl_epi64((__m128i *)&src[(i - 3) * src_stride + j]));
_mm_cvtsi32_si128(*((int *)&src[(i - 3) * src_stride + j])));
y = _mm_cvtepu8_epi32(
_mm_loadl_epi64((__m128i *)&src[(i + 4) * src_stride + j]));
_mm_cvtsi32_si128(*((int *)&src[(i + 4) * src_stride + j])));
sum = _mm_add_epi32(sum, _mm_sub_epi32(y, x));
......
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