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

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

Issue 99365: Lands http://codereview.chromium.org/99349 for Ryan.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « build/build_config.h ('k') | no next file » | 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 // 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 // excerpt from wiki: 9 // excerpt from wiki:
10 // These formulae are based on the NTSC standard; 10 // These formulae are based on the NTSC standard;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #ifdef _DEBUG 70 #ifdef _DEBUG
71 #include "base/logging.h" 71 #include "base/logging.h"
72 #else 72 #else
73 #define DCHECK(a) 73 #define DCHECK(a)
74 #endif 74 #endif
75 75
76 // MMX for Windows, Linux and Mac. 76 // MMX for Windows, Linux and Mac.
77 // C++ code provided as a fall back. 77 // C++ code provided as a fall back.
78 // Compile with /DUSE_MMX=0 78 // Compile with /DUSE_MMX=0
79 #ifndef USE_MMX 79 #ifndef USE_MMX
80
81 #ifdef ARCH_CPU_ARM_FAMILY
82 #define USE_MMX 0
83 #else
80 #define USE_MMX 1 84 #define USE_MMX 1
81 #endif 85 #endif
86 #endif
82 87
83 namespace media { 88 namespace media {
84 89
85 #if USE_MMX 90 #if USE_MMX
86 91
87 #define RGBY(i) { \ 92 #define RGBY(i) { \
88 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \ 93 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
89 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \ 94 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
90 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \ 95 static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
91 0 \ 96 0 \
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 (clip(C298b + cr) << 16) | 668 (clip(C298b + cr) << 16) |
664 0xff000000; 669 0xff000000;
665 670
666 rgb_buf += 8; // Advance 2 pixels. 671 rgb_buf += 8; // Advance 2 pixels.
667 } 672 }
668 } 673 }
669 #endif 674 #endif
670 675
671 676
672 } // namespace media 677 } // namespace media
673
OLDNEW
« no previous file with comments | « build/build_config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698