summaryrefslogtreecommitdiffstats
path: root/media/media.gyp
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 01:08:22 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 01:08:22 +0000
commit3227bd548c98f90ecabfcd4e3ccc3785ee9409d8 (patch)
tree4a06e64c741c94e8665bc1c25ffd142a75fd39f4 /media/media.gyp
parent7758c234c30291995c01b79887b52a471362fcc3 (diff)
downloadchromium_src-3227bd548c98f90ecabfcd4e3ccc3785ee9409d8.zip
chromium_src-3227bd548c98f90ecabfcd4e3ccc3785ee9409d8.tar.gz
chromium_src-3227bd548c98f90ecabfcd4e3ccc3785ee9409d8.tar.bz2
Revert 100915 - Rewrite color space conversions suite using YASM
Failed on official Linux 32 builder. (x486?) http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux/builds/11240/steps/compile/logs/stdio In file included from media/base/yuv_convert.cc:33: /usr/lib/gcc/i486-linux-gnu/4.4.3/include/emmintrin.h:32:3:error: #error "SSE2 instruction set not enabled" make: *** [out/Release/obj.target/yuv_convert/media/base/yuv_convert.o] Error 1 Besides rewrite assembly code in YASM, this change also do runtime selection of routine depending processor support. There are couple advantages in this YASM version. 1. Performance improvement Using YASM we can push less to the stack, this results in ~5% improvement on 32-bits system. 2. MMX and SSE versions are separate SSE version use movntq while MMX version use movq. 3. 64-bits version works universally This means that 64-bits YASM code compile and run on 64-bits windows, mac and linux. While previously it only runs on linux 64. 4. Handling PIC much better PIC code runs and build on 32-bits and 64-bits system. This is better than before which only works on 32-bits mac. 5. Easier maintenance This code uses x86asm.inc for a bunch of nice macros. Having just one YASM verion is better than having inline VC assembly and don't have to worry inline assemly has different register names on mac and linux. I tested on linux 32-bits, linux 32-bits PIC and linux 64-bits that this code is at least as fast as before. BUG=None TEST=media_unittests runs and all passing Review URL: http://codereview.chromium.org/7858003 TBR=hclam@chromium.org Review URL: http://codereview.chromium.org/7887025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/media.gyp')
-rw-r--r--media/media.gyp55
1 files changed, 6 insertions, 49 deletions
diff --git a/media/media.gyp b/media/media.gyp
index 60a192ab..8be1290 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -345,12 +345,7 @@
'conditions': [
[ 'target_arch == "ia32" or target_arch == "x64"', {
'dependencies': [
- 'yuv_convert_simd_x86',
- ],
- }],
- [ 'target_arch == "arm"', {
- 'dependencies': [
- 'yuv_convert_simd_arm',
+ 'yuv_convert_sse2',
],
}],
],
@@ -366,45 +361,15 @@
],
},
{
- 'target_name': 'yuv_convert_simd_x86',
+ 'target_name': 'yuv_convert_sse2',
'type': 'static_library',
'include_dirs': [
'..',
],
- 'sources': [
- 'base/yuv_convert_sse2.cc',
- 'base/simd/convert_rgb_to_yuv_x86.cc',
- 'base/simd/convert_rgb_to_yuv_ssse3.asm',
- 'base/simd/convert_rgb_to_yuv_ssse3.inc',
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/convert_yuv_to_rgb_x86.cc',
- 'base/simd/convert_yuv_to_rgb_mmx.asm',
- 'base/simd/convert_yuv_to_rgb_mmx.inc',
- 'base/simd/convert_yuv_to_rgb_sse.asm',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- 'base/simd/filter_yuv_mmx.cc',
- 'base/simd/filter_yuv_sse2.cc',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.asm',
- 'base/simd/linear_scale_yuv_to_rgb_mmx.inc',
- 'base/simd/linear_scale_yuv_to_rgb_sse.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.asm',
- 'base/simd/scale_yuv_to_rgb_mmx.inc',
- 'base/simd/scale_yuv_to_rgb_sse.asm',
- ],
'conditions': [
- [ 'target_arch == "x64"', {
- # Source files optimized for X64 systems.
- 'sources': [
- 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm',
- 'base/simd/scale_yuv_to_rgb_sse2_x64.asm',
- ],
- }],
[ 'os_posix == 1 and OS != "mac"', {
'cflags': [
'-msse2',
- '-msse3',
- '-mssse3',
],
}],
[ 'OS == "mac"', {
@@ -467,6 +432,10 @@
},
}],
],
+ 'sources': [
+ 'base/yuv_convert_sse2.cc',
+ 'base/simd/convert_rgb_to_yuv.cc',
+ ],
'variables': {
'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media',
},
@@ -475,18 +444,6 @@
],
},
{
- 'target_name': 'yuv_convert_simd_arm',
- 'type': 'static_library',
- 'include_dirs': [
- '..',
- ],
- 'sources': [
- 'base/simd/convert_yuv_to_rgb_c.cc',
- 'base/simd/filter_yuv.h',
- 'base/simd/filter_yuv_c.cc',
- ],
- },
- {
'target_name': 'ffmpeg_unittests',
'type': 'executable',
'dependencies': [