Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: third_party/libwebp/dsp/rescaler_sse2.c

Issue 2149863002: libwebp: update to v0.5.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libwebp/dsp/msa_macro.h ('k') | third_party/libwebp/dsp/upsampling_mips_dsp_r2.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 Google Inc. All Rights Reserved. 1 // Copyright 2015 Google Inc. All Rights Reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license 3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source 4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found 5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may 6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree. 7 // be found in the AUTHORS file in the root of the source tree.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 // 9 //
10 // SSE2 Rescaling functions 10 // SSE2 Rescaling functions
11 // 11 //
12 // Author: Skal (pascal.massimino@gmail.com) 12 // Author: Skal (pascal.massimino@gmail.com)
13 13
14 #include "./dsp.h" 14 #include "./dsp.h"
15 15
16 #if defined(WEBP_USE_SSE2) 16 #if defined(WEBP_USE_SSE2)
17 #include <emmintrin.h> 17 #include <emmintrin.h>
18 18
19 #include <assert.h> 19 #include <assert.h>
20 #include "../utils/rescaler.h" 20 #include "../utils/rescaler.h"
21 #include "../utils/utils.h"
21 22
22 //------------------------------------------------------------------------------ 23 //------------------------------------------------------------------------------
23 // Implementations of critical functions ImportRow / ExportRow 24 // Implementations of critical functions ImportRow / ExportRow
24 25
25 #define ROUNDER (WEBP_RESCALER_ONE >> 1) 26 #define ROUNDER (WEBP_RESCALER_ONE >> 1)
26 #define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX) 27 #define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX)
27 28
28 // input: 8 bytes ABCDEFGH -> output: A0E0B0F0C0G0D0H0 29 // input: 8 bytes ABCDEFGH -> output: A0E0B0F0C0G0D0H0
29 static void LoadTwoPixels(const uint8_t* const src, __m128i* out) { 30 static void LoadTwoPixels(const uint8_t* const src, __m128i* out) {
30 const __m128i zero = _mm_setzero_si128(); 31 const __m128i zero = _mm_setzero_si128();
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 WebPRescalerImportRowShrink = RescalerImportRowShrinkSSE2; 366 WebPRescalerImportRowShrink = RescalerImportRowShrinkSSE2;
366 WebPRescalerExportRowExpand = RescalerExportRowExpandSSE2; 367 WebPRescalerExportRowExpand = RescalerExportRowExpandSSE2;
367 WebPRescalerExportRowShrink = RescalerExportRowShrinkSSE2; 368 WebPRescalerExportRowShrink = RescalerExportRowShrinkSSE2;
368 } 369 }
369 370
370 #else // !WEBP_USE_SSE2 371 #else // !WEBP_USE_SSE2
371 372
372 WEBP_DSP_INIT_STUB(WebPRescalerDspInitSSE2) 373 WEBP_DSP_INIT_STUB(WebPRescalerDspInitSSE2)
373 374
374 #endif // WEBP_USE_SSE2 375 #endif // WEBP_USE_SSE2
OLDNEW
« no previous file with comments | « third_party/libwebp/dsp/msa_macro.h ('k') | third_party/libwebp/dsp/upsampling_mips_dsp_r2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698