mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
remove _mm_set_epi64x(), which is too specific
Change-Id: I4b1035f9c548b804f31c68a00b0a1aa8e13550bb
This commit is contained in:
parent
56668c9fc5
commit
cced974bb2
@ -58,9 +58,8 @@ static WEBP_INLINE void ProcessRow(const __m128i* const A0,
|
||||
const __m128i* const A3,
|
||||
const __m128i* const mult,
|
||||
uint8_t* const dst) {
|
||||
const __m128i rounder = _mm_set_epi64x(ROUNDER, ROUNDER);
|
||||
const __m128i mask = _mm_set_epi64x(0xffffffff00000000ull,
|
||||
0xffffffff00000000ull);
|
||||
const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER);
|
||||
const __m128i mask = _mm_set_epi32(0xffffffffu, 0, 0xffffffffu, 0);
|
||||
const __m128i B0 = _mm_mul_epu32(*A0, *mult);
|
||||
const __m128i B1 = _mm_mul_epu32(*A1, *mult);
|
||||
const __m128i B2 = _mm_mul_epu32(*A2, *mult);
|
||||
@ -86,7 +85,7 @@ static void RescalerExportRowExpandSSE2(WebPRescaler* const wrk) {
|
||||
rescaler_t* const irow = wrk->irow;
|
||||
const int x_out_max = wrk->dst_width * wrk->num_channels;
|
||||
const rescaler_t* const frow = wrk->frow;
|
||||
const __m128i mult = _mm_set_epi64x(wrk->fy_scale, wrk->fy_scale);
|
||||
const __m128i mult = _mm_set_epi32(0, wrk->fy_scale, 0, wrk->fy_scale);
|
||||
|
||||
assert(!WebPRescalerOutputDone(wrk));
|
||||
assert(wrk->y_accum <= 0 && wrk->y_sub + wrk->y_accum >= 0);
|
||||
@ -106,9 +105,9 @@ static void RescalerExportRowExpandSSE2(WebPRescaler* const wrk) {
|
||||
} else {
|
||||
const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub);
|
||||
const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B);
|
||||
const __m128i mA = _mm_set_epi64x(A, A);
|
||||
const __m128i mB = _mm_set_epi64x(B, B);
|
||||
const __m128i rounder = _mm_set_epi64x(ROUNDER, ROUNDER);
|
||||
const __m128i mA = _mm_set_epi32(0, A, 0, A);
|
||||
const __m128i mB = _mm_set_epi32(0, B, 0, B);
|
||||
const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER);
|
||||
for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) {
|
||||
__m128i A0, A1, A2, A3, B0, B1, B2, B3;
|
||||
LoadDispatchAndMult(frow + x_out, &mA, &A0, &A1, &A2, &A3);
|
||||
@ -152,9 +151,9 @@ static void RescalerExportRowShrinkSSE2(WebPRescaler* const wrk) {
|
||||
assert(!wrk->y_expand);
|
||||
if (yscale) {
|
||||
const int scale_xy = wrk->fxy_scale;
|
||||
const __m128i mult_xy = _mm_set_epi64x(scale_xy, scale_xy);
|
||||
const __m128i mult_y = _mm_set_epi64x(yscale, yscale);
|
||||
const __m128i rounder = _mm_set_epi64x(ROUNDER, ROUNDER);
|
||||
const __m128i mult_xy = _mm_set_epi32(0, scale_xy, 0, scale_xy);
|
||||
const __m128i mult_y = _mm_set_epi32(0, yscale, 0, yscale);
|
||||
const __m128i rounder = _mm_set_epi32(0, ROUNDER, 0, ROUNDER);
|
||||
for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) {
|
||||
__m128i A0, A1, A2, A3, B0, B1, B2, B3;
|
||||
LoadDispatchAndMult(irow + x_out, NULL, &A0, &A1, &A2, &A3);
|
||||
@ -190,7 +189,7 @@ static void RescalerExportRowShrinkSSE2(WebPRescaler* const wrk) {
|
||||
}
|
||||
} else if (wrk->fxy_scale) {
|
||||
const uint32_t scale = wrk->fxy_scale;
|
||||
const __m128i mult = _mm_set_epi64x(scale, scale);
|
||||
const __m128i mult = _mm_set_epi32(0, scale, 0, scale);
|
||||
const __m128i zero = _mm_setzero_si128();
|
||||
for (x_out = 0; x_out + 8 <= x_out_max; x_out += 8) {
|
||||
__m128i A0, A1, A2, A3;
|
||||
|
Loading…
Reference in New Issue
Block a user