Commit 7cfd5343 authored by Joe Young's avatar Joe Young

[intra-edge] Pad intra edge samples to avoid valgrind warning

The SSE4 function filter_intra_edge_sse4_1() reads data slightly
past the initialized part of the array. Those data are discarded
later, but causes a valgrind warning. This change avoids the warning
by initializing the array an extra +16 positions.

BUG=aomedia:868

Change-Id: Ib610492cff91492ae379c5d62895773f8747c4bc
parent 13281d4f
......@@ -32,10 +32,9 @@ void av1_filter_intra_edge_sse4_1(uint8_t *p, int sz, int strength) {
};
// Extend the first and last samples to simplify the loop for the 5-tap case
if (strength == 3) {
p[-1] = p[0];
p[sz] = p[sz - 1];
}
p[-1] = p[0];
__m128i last = _mm_set1_epi8(p[sz - 1]);
_mm_storeu_si128((__m128i *)&p[sz], last);
// Adjust input pointer for filter support area
uint8_t *in = (strength == 3) ? p - 1 : p;
......@@ -127,10 +126,9 @@ void av1_filter_intra_edge_high_sse4_1(uint16_t *p, int sz, int strength) {
v_const[1][8]) = { { 0, 1, 2, 3, 4, 5, 6, 7 } };
// Extend the first and last samples to simplify the loop for the 5-tap case
if (strength == 3) {
p[-1] = p[0];
p[sz] = p[sz - 1];
}
p[-1] = p[0];
__m128i last = _mm_set1_epi16(p[sz - 1]);
_mm_storeu_si128((__m128i *)&p[sz], last);
// Adjust input pointer for filter support area
uint16_t *in = (strength == 3) ? p - 1 : p;
......
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