// Copyright 2015 Google Inc. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the COPYING file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing project authors may // be found in the AUTHORS file in the root of the source tree. // ----------------------------------------------------------------------------- // // SSE4.1 variant of methods for lossless encoder // // Author: Skal ([email protected]) #include "src/dsp/dsp.h" #if defined(WEBP_USE_SSE41) #include <assert.h> #include <smmintrin.h> #include "src/dsp/lossless.h" //------------------------------------------------------------------------------ // Cost operations. static WEBP_INLINE uint32_t HorizontalSum_SSE41(__m128i cost) { … } static uint32_t ExtraCost_SSE41(const uint32_t* const a, int length) { … } static uint32_t ExtraCostCombined_SSE41(const uint32_t* const a, const uint32_t* const b, int length) { … } //------------------------------------------------------------------------------ // Subtract-Green Transform static void SubtractGreenFromBlueAndRed_SSE41(uint32_t* argb_data, int num_pixels) { … } //------------------------------------------------------------------------------ // Color Transform // For sign-extended multiplying constants, pre-shifted by 5: #define CST_5b(X) … #define MK_CST_16 … static void CollectColorBlueTransforms_SSE41(const uint32_t* argb, int stride, int tile_width, int tile_height, int green_to_blue, int red_to_blue, int histo[]) { … } static void CollectColorRedTransforms_SSE41(const uint32_t* argb, int stride, int tile_width, int tile_height, int green_to_red, int histo[]) { … } #undef MK_CST_16 //------------------------------------------------------------------------------ // Entry point extern void VP8LEncDspInitSSE41(void); WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitSSE41(void) { … } #else // !WEBP_USE_SSE41 WEBP_DSP_INIT_STUB(VP8LEncDspInitSSE41) #endif // WEBP_USE_SSE41