this fixes a segfault when scaling is enabled; in some cases depending on the ratio offsets may become odd. vpx_int_pro_row_sse2 was updated previously, though the reason wasn't listed: 54eda13f8 Apply fast motion search to golden reference frame BUG=webm:1600
Unified · Split
| @@ -515,14 +515,14 @@ void vpx_int_pro_row_sse2(int16_t *hbuf, const uint8_t *ref, · 514 unmodified lines | |||
| 515 | 515 | ||
| 516 | int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width) { | 516 | int16_t vpx_int_pro_col_sse2(const uint8_t *ref, const int width) { |
| 517 | __m128i zero = _mm_setzero_si128(); | 517 | __m128i zero = _mm_setzero_si128(); |
| 518 | __m128i src_line = _mm_load_si128((const __m128i *)ref); | 518 | __m128i src_line = _mm_loadu_si128((const __m128i *)ref); |
| 519 | __m128i s0 = _mm_sad_epu8(src_line, zero); | 519 | __m128i s0 = _mm_sad_epu8(src_line, zero); |
| 520 | __m128i s1; | 520 | __m128i s1; |
| 521 | int i; | 521 | int i; |
| 522 | 522 | ||
| 523 | for (i = 16; i < width; i += 16) { | 523 | for (i = 16; i < width; i += 16) { |
| 524 | ref += 16; | 524 | ref += 16; |
| 525 | src_line = _mm_load_si128((const __m128i *)ref); | 525 | src_line = _mm_loadu_si128((const __m128i *)ref); |
| 526 | s1 = _mm_sad_epu8(src_line, zero); | 526 | s1 = _mm_sad_epu8(src_line, zero); |
| 527 | s0 = _mm_adds_epu16(s0, s1); | 527 | s0 = _mm_adds_epu16(s0, s1); |
| 528 | } | 528 | } |