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

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

Issue 12213029: Lift MEDIA_MMX_INTRINSICS_AVAILABLE definition to header and use it to condition media_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Completely exclude FilterYUVRows_MMX tests on win64 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/yuv_convert.h ('k') | media/base/yuv_convert_unittest.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 // This webpage shows layout of YV12 and other YUV formats 5 // This webpage shows layout of YV12 and other YUV formats
6 // http://www.fourcc.org/yuv.php 6 // http://www.fourcc.org/yuv.php
7 // The actual conversion is best described here 7 // The actual conversion is best described here
8 // http://en.wikipedia.org/wiki/YUV 8 // http://en.wikipedia.org/wiki/YUV
9 // An article on optimizing YUV conversion using tables instead of multiplies 9 // An article on optimizing YUV conversion using tables instead of multiplies
10 // http://lestourtereaux.free.fr/papers/data/yuvrgb.pdf 10 // http://lestourtereaux.free.fr/papers/data/yuvrgb.pdf
(...skipping 15 matching lines...) Expand all
26 #include "media/base/simd/filter_yuv.h" 26 #include "media/base/simd/filter_yuv.h"
27 27
28 #if defined(ARCH_CPU_X86_FAMILY) 28 #if defined(ARCH_CPU_X86_FAMILY)
29 #if defined(COMPILER_MSVC) 29 #if defined(COMPILER_MSVC)
30 #include <intrin.h> 30 #include <intrin.h>
31 #else 31 #else
32 #include <mmintrin.h> 32 #include <mmintrin.h>
33 #endif 33 #endif
34 #endif 34 #endif
35 35
36 // Visual Studio 2010 does not support MMX intrinsics on x64.
37 // Some win64 yuv_convert code paths use SSE+MMX yasm, so without rewriting
38 // them, we use yasm EmptyRegisterState_MMX in place of _mm_empty() or
39 // hide the versions implemented with heavy use of MMX intrinsics.
40 // TODO(wolenetz): Use MMX intrinsics when compiling win64 with Visual
41 // Studio 2012? http://crbug.com/173450
42 #if !(defined(ARCH_CPU_X86_64) && defined(COMPILER_MSVC))
43 #define MEDIA_MMX_INTRINSICS_AVAILABLE
44 #endif
45
46 // Assembly functions are declared without namespace. 36 // Assembly functions are declared without namespace.
47 extern "C" { 37 extern "C" {
48 void EmptyRegisterState_MMX(); 38 void EmptyRegisterState_MMX();
49 } // extern "C" 39 } // extern "C"
50 40
51 namespace media { 41 namespace media {
52 42
53 static FilterYUVRowsProc ChooseFilterYUVRowsProc() { 43 static FilterYUVRowsProc ChooseFilterYUVRowsProc() {
54 #if defined(ARCH_CPU_X86_FAMILY) 44 #if defined(ARCH_CPU_X86_FAMILY)
55 base::CPU cpu; 45 base::CPU cpu;
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 else 597 else
608 convert_proc = &ConvertYUVToRGB32_C; 598 convert_proc = &ConvertYUVToRGB32_C;
609 } 599 }
610 600
611 convert_proc(yplane, uplane, vplane, rgbframe, 601 convert_proc(yplane, uplane, vplane, rgbframe,
612 width, height, ystride, uvstride, rgbstride, yuv_type); 602 width, height, ystride, uvstride, rgbstride, yuv_type);
613 #endif 603 #endif
614 } 604 }
615 605
616 } // namespace media 606 } // namespace media
OLDNEW
« no previous file with comments | « media/base/yuv_convert.h ('k') | media/base/yuv_convert_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698