Path: blob/master/thirdparty/libwebp/src/dsp/dec_sse41.c
9913 views
// Copyright 2015 Google Inc. All Rights Reserved.1//2// Use of this source code is governed by a BSD-style license3// that can be found in the COPYING file in the root of the source4// tree. An additional intellectual property rights grant can be found5// in the file PATENTS. All contributing project authors may6// be found in the AUTHORS file in the root of the source tree.7// -----------------------------------------------------------------------------8//9// SSE4 version of some decoding functions.10//11// Author: Skal ([email protected])1213#include "src/dsp/dsp.h"1415#if defined(WEBP_USE_SSE41)1617#include <smmintrin.h>18#include "src/dec/vp8i_dec.h"19#include "src/utils/utils.h"2021static void HE16_SSE41(uint8_t* dst) { // horizontal22int j;23const __m128i kShuffle3 = _mm_set1_epi8(3);24for (j = 16; j > 0; --j) {25const __m128i in = _mm_cvtsi32_si128(WebPMemToInt32(dst - 4));26const __m128i values = _mm_shuffle_epi8(in, kShuffle3);27_mm_storeu_si128((__m128i*)dst, values);28dst += BPS;29}30}3132//------------------------------------------------------------------------------33// Entry point3435extern void VP8DspInitSSE41(void);3637WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE41(void) {38VP8PredLuma16[3] = HE16_SSE41;39}4041#else // !WEBP_USE_SSE414243WEBP_DSP_INIT_STUB(VP8DspInitSSE41)4445#endif // WEBP_USE_SSE41464748