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

Side by Side Diff: media/base/yuv_convert.h

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 readability nit 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 | « media/base/simd/empty_register_state_mmx.asm ('k') | media/base/yuv_convert.cc » ('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 #ifndef MEDIA_BASE_YUV_CONVERT_H_ 5 #ifndef MEDIA_BASE_YUV_CONVERT_H_
6 #define MEDIA_BASE_YUV_CONVERT_H_ 6 #define MEDIA_BASE_YUV_CONVERT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 // Visual Studio 2010 does not support MMX intrinsics on x64.
13 // Some win64 yuv_convert code paths use SSE+MMX yasm, so without rewriting
14 // them, we use yasm EmptyRegisterState_MMX in place of _mm_empty() or
15 // hide the versions implemented with heavy use of MMX intrinsics.
16 // TODO(wolenetz): (crbug.com/173450) Use MMX intrinsics when compiling win64
scherkus (not reviewing) 2013/01/31 23:55:27 nit: we typically format our todos w/ the bug at t
wolenetz 2013/02/01 00:57:26 Done.
17 // with Visual Studio 2012?
18 #if defined(ARCH_CPU_X86_64) && defined(COMPILER_MSVC)
19 #define MEDIA_DO_NOT_USE_MMX_INTRINSICS
20 #endif
21
12 // Type of YUV surface. 22 // Type of YUV surface.
13 // The value of these enums matter as they are used to shift vertical indices. 23 // The value of these enums matter as they are used to shift vertical indices.
14 enum YUVType { 24 enum YUVType {
15 YV16 = 0, // YV16 is half width and full height chroma channels. 25 YV16 = 0, // YV16 is half width and full height chroma channels.
16 YV12 = 1, // YV12 is half width and half height chroma channels. 26 YV12 = 1, // YV12 is half width and half height chroma channels.
17 }; 27 };
18 28
19 // Mirror means flip the image horizontally, as in looking in a mirror. 29 // Mirror means flip the image horizontally, as in looking in a mirror.
20 // Rotate happens after mirroring. 30 // Rotate happens after mirroring.
21 enum Rotate { 31 enum Rotate {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 int height); 124 int height);
115 125
116 void ConvertNV21ToYUV(const uint8* src, 126 void ConvertNV21ToYUV(const uint8* src,
117 uint8* yplane, 127 uint8* yplane,
118 uint8* uplane, 128 uint8* uplane,
119 uint8* vplane, 129 uint8* vplane,
120 int width, 130 int width,
121 int height); 131 int height);
122 132
123 // Empty SIMD register state after calling optimized scaler functions. 133 // Empty SIMD register state after calling optimized scaler functions.
124 // This method is only used in unit test after calling SIMD functions. 134 // This method is only used in unit test after calling SIMD functions.
scherkus (not reviewing) 2013/01/31 23:55:27 might want to update this comment ;)
wolenetz 2013/02/01 00:57:26 Done.
125 void EmptyRegisterState(); 135 void EmptyRegisterState();
126 136
127 } // namespace media 137 } // namespace media
128 138
129 #endif // MEDIA_BASE_YUV_CONVERT_H_ 139 #endif // MEDIA_BASE_YUV_CONVERT_H_
OLDNEW
« no previous file with comments | « media/base/simd/empty_register_state_mmx.asm ('k') | media/base/yuv_convert.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698