Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use int16 min/max for _mm_set_epi16() calls #395

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, -1, 0, -1, 0, -1, 0, -1));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_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
Loading