Skip to content

Commit

Permalink
Update sse-motion.cc: _mm_set_epi16 use 0, -1
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt authored Nov 13, 2024
1 parent c810500 commit 68ebd95
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions libde265/x86/sse-motion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3527,9 +3527,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -3710,9 +3710,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -3887,9 +3887,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4058,9 +4058,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4241,9 +4241,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4419,9 +4419,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4592,9 +4592,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4778,9 +4778,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4958,9 +4958,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(-32766, 32767, -32766, 32767, -32766, 32767, -32766, 32767));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down

0 comments on commit 68ebd95

Please sign in to comment.