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

Side by Side Diff: source/libvpx/vp9/encoder/x86/vp9_avg_intrin_sse2.c

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <emmintrin.h> 11 #include <emmintrin.h>
12
13 #include "./vp9_rtcd.h"
12 #include "vpx_ports/mem.h" 14 #include "vpx_ports/mem.h"
13 15
14 void vp9_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, 16 void vp9_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp,
15 int *min, int *max) { 17 int *min, int *max) {
16 __m128i u0, s0, d0, diff, maxabsdiff, minabsdiff, negdiff, absdiff0, absdiff; 18 __m128i u0, s0, d0, diff, maxabsdiff, minabsdiff, negdiff, absdiff0, absdiff;
17 u0 = _mm_setzero_si128(); 19 u0 = _mm_setzero_si128();
18 // Row 0 20 // Row 0
19 s0 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s)), u0); 21 s0 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(s)), u0);
20 d0 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(d)), u0); 22 d0 = _mm_unpacklo_epi8(_mm_loadl_epi64((const __m128i *)(d)), u0);
21 diff = _mm_subs_epi16(s0, d0); 23 diff = _mm_subs_epi16(s0, d0);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 414
413 v1 = _mm_srli_si128(sse, 8); 415 v1 = _mm_srli_si128(sse, 8);
414 sse = _mm_add_epi32(sse, v1); 416 sse = _mm_add_epi32(sse, v1);
415 v1 = _mm_srli_epi64(sse, 32); 417 v1 = _mm_srli_epi64(sse, 32);
416 sse = _mm_add_epi32(sse, v1); 418 sse = _mm_add_epi32(sse, v1);
417 419
418 mean = _mm_extract_epi16(sum, 0); 420 mean = _mm_extract_epi16(sum, 0);
419 421
420 return _mm_cvtsi128_si32(sse) - ((mean * mean) >> (bwl + 2)); 422 return _mm_cvtsi128_si32(sse) - ((mean * mean) >> (bwl + 2));
421 } 423 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_writer.h ('k') | source/libvpx/vp9/encoder/x86/vp9_dct32x32_avx2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698