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

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

Issue 1657313003: Make dynamic_annotations build with -Wconstant-conversion from newer clangs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/README.chromium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 Google Inc. All Rights Reserved. 1 // Copyright 2014 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 // YUV->RGB conversion functions 10 // YUV->RGB conversion functions
(...skipping 15 matching lines...) Expand all
26 // B = (19077 * y + 33050 * u - 17685) >> 6 26 // B = (19077 * y + 33050 * u - 17685) >> 6
27 static void ConvertYUV444ToRGB(const __m128i* const Y0, 27 static void ConvertYUV444ToRGB(const __m128i* const Y0,
28 const __m128i* const U0, 28 const __m128i* const U0,
29 const __m128i* const V0, 29 const __m128i* const V0,
30 __m128i* const R, 30 __m128i* const R,
31 __m128i* const G, 31 __m128i* const G,
32 __m128i* const B) { 32 __m128i* const B) {
33 const __m128i k19077 = _mm_set1_epi16(19077); 33 const __m128i k19077 = _mm_set1_epi16(19077);
34 const __m128i k26149 = _mm_set1_epi16(26149); 34 const __m128i k26149 = _mm_set1_epi16(26149);
35 const __m128i k14234 = _mm_set1_epi16(14234); 35 const __m128i k14234 = _mm_set1_epi16(14234);
36 const __m128i k33050 = _mm_set1_epi16(33050); 36 // 33050 doesn't fit in a signed short: only use this with unsigned arithmetic
37 const __m128i k33050 = _mm_set1_epi16((short)33050);
37 const __m128i k17685 = _mm_set1_epi16(17685); 38 const __m128i k17685 = _mm_set1_epi16(17685);
38 const __m128i k6419 = _mm_set1_epi16(6419); 39 const __m128i k6419 = _mm_set1_epi16(6419);
39 const __m128i k13320 = _mm_set1_epi16(13320); 40 const __m128i k13320 = _mm_set1_epi16(13320);
40 const __m128i k8708 = _mm_set1_epi16(8708); 41 const __m128i k8708 = _mm_set1_epi16(8708);
41 42
42 const __m128i Y1 = _mm_mulhi_epu16(*Y0, k19077); 43 const __m128i Y1 = _mm_mulhi_epu16(*Y0, k19077);
43 44
44 const __m128i R0 = _mm_mulhi_epu16(*V0, k26149); 45 const __m128i R0 = _mm_mulhi_epu16(*V0, k26149);
45 const __m128i R1 = _mm_sub_epi16(Y1, k14234); 46 const __m128i R1 = _mm_sub_epi16(Y1, k14234);
46 const __m128i R2 = _mm_add_epi16(R1, R0); 47 const __m128i R2 = _mm_add_epi16(R1, R0);
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 766
766 WebPConvertRGBA32ToUV = ConvertRGBA32ToUV; 767 WebPConvertRGBA32ToUV = ConvertRGBA32ToUV;
767 } 768 }
768 769
769 #else // !WEBP_USE_SSE2 770 #else // !WEBP_USE_SSE2
770 771
771 WEBP_DSP_INIT_STUB(WebPInitSamplersSSE2) 772 WEBP_DSP_INIT_STUB(WebPInitSamplersSSE2)
772 WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVSSE2) 773 WEBP_DSP_INIT_STUB(WebPInitConvertARGBToYUVSSE2)
773 774
774 #endif // WEBP_USE_SSE2 775 #endif // WEBP_USE_SSE2
OLDNEW
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698