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

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

Issue 208030: Mac YUV assembly (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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/yuv_row_mac.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // yuv_row internal functions to handle YUV conversion and scaling to RGB. 5 // yuv_row internal functions to handle YUV conversion and scaling to RGB.
6 // These functions are used from both yuv_convert.cc and yuv_scale.cc. 6 // These functions are used from both yuv_convert.cc and yuv_scale.cc.
7 7
8 // TODO(fbarchard): Write function that can handle rotation and scaling. 8 // TODO(fbarchard): Write function that can handle rotation and scaling.
9 9
10 #ifndef MEDIA_BASE_YUV_ROW_H_ 10 #ifndef MEDIA_BASE_YUV_ROW_H_
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // This is the slowest of the scalers. 56 // This is the slowest of the scalers.
57 void ScaleYUVToRGB32Row(const uint8* y_buf, 57 void ScaleYUVToRGB32Row(const uint8* y_buf,
58 const uint8* u_buf, 58 const uint8* u_buf,
59 const uint8* v_buf, 59 const uint8* v_buf,
60 uint8* rgb_buf, 60 uint8* rgb_buf,
61 int width, 61 int width,
62 int scaled_dx); 62 int scaled_dx);
63 } // extern "C" 63 } // extern "C"
64 64
65 #if !defined(USE_MMX) 65 #if !defined(USE_MMX)
66 #if defined(_MSC_VER) 66 // Windows, Mac and Linux x86 use MMX; x64 and other CPUs do not.
67 #define USE_MMX 1 67 #if defined(OS_WIN) || defined(ARCH_CPU_X86)
68 #elif defined(OS_LINUX) && defined(ARCH_CPU_X86)
69 #define USE_MMX 1 68 #define USE_MMX 1
70 #else 69 #else
71 #define USE_MMX 0 70 #define USE_MMX 0
72 #endif 71 #endif
73 #endif 72 #endif
74 73
75 #if USE_MMX 74 #if USE_MMX
76 #if defined(_MSC_VER) 75 #if defined(_MSC_VER)
77 #define EMMS() __asm emms 76 #define EMMS() __asm emms
78 #else 77 #else
79 #define EMMS() asm("emms") 78 #define EMMS() asm("emms")
80 #endif 79 #endif
81 #else 80 #else
82 #define EMMS() 81 #define EMMS()
83 #endif 82 #endif
84 83
85 #endif // MEDIA_BASE_YUV_ROW_H_ 84 #endif // MEDIA_BASE_YUV_ROW_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/yuv_row_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698