diff options
author | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 01:04:13 +0000 |
---|---|---|
committer | fbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 01:04:13 +0000 |
commit | 24267bb2ef971593b3b11178320dc4d248940b56 (patch) | |
tree | 40f1c0da0e0f0fcc8ac6406bbb82ff1ecfc44126 /media/base/yuv_row.h | |
parent | 4be85a0d5e0f68724f4e44eb560fcd95c21b40e8 (diff) | |
download | chromium_src-24267bb2ef971593b3b11178320dc4d248940b56.zip chromium_src-24267bb2ef971593b3b11178320dc4d248940b56.tar.gz chromium_src-24267bb2ef971593b3b11178320dc4d248940b56.tar.bz2 |
mmx for linux yuv convert function.
BUG=18449,20718
TEST=play a video on linux without scaling and it should go 4 times faster than with scaling.
Review URL: http://codereview.chromium.org/174442
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/yuv_row.h')
-rw-r--r-- | media/base/yuv_row.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/media/base/yuv_row.h b/media/base/yuv_row.h index b8651f5..bb06722 100644 --- a/media/base/yuv_row.h +++ b/media/base/yuv_row.h @@ -5,13 +5,14 @@ // yuv_row internal functions to handle YUV conversion and scaling to RGB. // These functions are used from both yuv_convert.cc and yuv_scale.cc. +// TODO(fbarchard): Write function that can handle rotation and scaling. + #ifndef MEDIA_BASE_YUV_ROW_H_ #define MEDIA_BASE_YUV_ROW_H_ #include "base/basictypes.h" -namespace media { - +extern "C" { // Can only do 1x. // This is the second fastest of the scalers. void FastConvertYUVToRGB32Row(const uint8* y_buf, @@ -59,11 +60,13 @@ void ScaleYUVToRGB32Row(const uint8* y_buf, uint8* rgb_buf, int width, int scaled_dx); +} // extern "C" -// MMX for Windows; C++ for other platforms. -#ifndef USE_MMX +#if !defined(USE_MMX) #if defined(_MSC_VER) #define USE_MMX 1 +#elif defined(OS_LINUX) && !defined(ARCH_CPU_X86_64) +#define USE_MMX 1 #else #define USE_MMX 0 #endif @@ -79,7 +82,5 @@ void ScaleYUVToRGB32Row(const uint8* y_buf, #define EMMS() #endif -} // namespace media - #endif // MEDIA_BASE_YUV_ROW_H_ |