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

Side by Side Diff: media/base/simd/convert_yuv_to_rgb_x86.cc

Issue 12082087: Replace or exclude MMX intrinsics in yuv_convert_simd_x86 due to lack of VS2010 support for them in… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more nits Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/simd/empty_register_state_mmx.asm » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if defined(_MSC_VER) 5 #if defined(_MSC_VER)
6 #include <intrin.h> 6 #include <intrin.h>
7 #else 7 #else
8 #include <mmintrin.h> 8 #include <mmintrin.h>
9 #endif 9 #endif
10 10
(...skipping 19 matching lines...) Expand all
30 const uint8* u_ptr = uplane + (y >> y_shift) * uvstride; 30 const uint8* u_ptr = uplane + (y >> y_shift) * uvstride;
31 const uint8* v_ptr = vplane + (y >> y_shift) * uvstride; 31 const uint8* v_ptr = vplane + (y >> y_shift) * uvstride;
32 32
33 ConvertYUVToRGB32Row_MMX(y_ptr, 33 ConvertYUVToRGB32Row_MMX(y_ptr,
34 u_ptr, 34 u_ptr,
35 v_ptr, 35 v_ptr,
36 rgb_row, 36 rgb_row,
37 width); 37 width);
38 } 38 }
39 39
40 _mm_empty(); 40 EmptyRegisterState();
41 } 41 }
42 42
43 void ConvertYUVToRGB32_SSE(const uint8* yplane, 43 void ConvertYUVToRGB32_SSE(const uint8* yplane,
44 const uint8* uplane, 44 const uint8* uplane,
45 const uint8* vplane, 45 const uint8* vplane,
46 uint8* rgbframe, 46 uint8* rgbframe,
47 int width, 47 int width,
48 int height, 48 int height,
49 int ystride, 49 int ystride,
50 int uvstride, 50 int uvstride,
51 int rgbstride, 51 int rgbstride,
52 YUVType yuv_type) { 52 YUVType yuv_type) {
53 unsigned int y_shift = yuv_type; 53 unsigned int y_shift = yuv_type;
54 for (int y = 0; y < height; ++y) { 54 for (int y = 0; y < height; ++y) {
55 uint8* rgb_row = rgbframe + y * rgbstride; 55 uint8* rgb_row = rgbframe + y * rgbstride;
56 const uint8* y_ptr = yplane + y * ystride; 56 const uint8* y_ptr = yplane + y * ystride;
57 const uint8* u_ptr = uplane + (y >> y_shift) * uvstride; 57 const uint8* u_ptr = uplane + (y >> y_shift) * uvstride;
58 const uint8* v_ptr = vplane + (y >> y_shift) * uvstride; 58 const uint8* v_ptr = vplane + (y >> y_shift) * uvstride;
59 59
60 ConvertYUVToRGB32Row_SSE(y_ptr, 60 ConvertYUVToRGB32Row_SSE(y_ptr,
61 u_ptr, 61 u_ptr,
62 v_ptr, 62 v_ptr,
63 rgb_row, 63 rgb_row,
64 width); 64 width);
65 } 65 }
66 66
67 _mm_empty(); 67 EmptyRegisterState();
68 } 68 }
69 69
70 } // namespace media 70 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/simd/empty_register_state_mmx.asm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698