| OLD | NEW |
| 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 |
| 11 // | 11 // |
| 12 // YV12 is a full plane of Y and a half height, half width chroma planes | 12 // YV12 is a full plane of Y and a half height, half width chroma planes |
| 13 // YV16 is a full plane of Y and a full height, half width chroma planes | 13 // YV16 is a full plane of Y and a full height, half width chroma planes |
| 14 // | 14 // |
| 15 // ARGB pixel format is output, which on little endian is stored as BGRA. | 15 // ARGB pixel format is output, which on little endian is stored as BGRA. |
| 16 // The alpha is set to 255, allowing the application to use RGBA or RGB32. | 16 // The alpha is set to 255, allowing the application to use RGBA or RGB32. |
| 17 | 17 |
| 18 #include "media/base/yuv_convert.h" | 18 #include "media/base/yuv_convert.h" |
| 19 | 19 |
| 20 #include <stddef.h> | 20 #include <stddef.h> |
| 21 | 21 |
| 22 #include <algorithm> | 22 #include <algorithm> |
| 23 | 23 |
| 24 #include "base/cpu.h" | 24 #include "base/cpu.h" |
| 25 #include "base/lazy_instance.h" | 25 #include "base/lazy_instance.h" |
| 26 #include "base/logging.h" | 26 #include "base/logging.h" |
| 27 #include "base/macros.h" | 27 #include "base/macros.h" |
| 28 #include "base/memory/aligned_memory.h" | 28 #include "base/memory/aligned_memory.h" |
| 29 #include "base/memory/scoped_ptr.h" | |
| 30 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" | 29 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" |
| 31 #include "build/build_config.h" | 30 #include "build/build_config.h" |
| 32 #include "media/base/simd/convert_rgb_to_yuv.h" | 31 #include "media/base/simd/convert_rgb_to_yuv.h" |
| 33 #include "media/base/simd/convert_yuv_to_rgb.h" | 32 #include "media/base/simd/convert_yuv_to_rgb.h" |
| 34 #include "media/base/simd/filter_yuv.h" | 33 #include "media/base/simd/filter_yuv.h" |
| 35 | 34 |
| 36 #if defined(ARCH_CPU_X86_FAMILY) | 35 #if defined(ARCH_CPU_X86_FAMILY) |
| 37 #if defined(COMPILER_MSVC) | 36 #if defined(COMPILER_MSVC) |
| 38 #include <intrin.h> | 37 #include <intrin.h> |
| 39 #else | 38 #else |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 width, | 735 width, |
| 737 height, | 736 height, |
| 738 ystride, | 737 ystride, |
| 739 uvstride, | 738 uvstride, |
| 740 astride, | 739 astride, |
| 741 rgbstride, | 740 rgbstride, |
| 742 yuv_type); | 741 yuv_type); |
| 743 } | 742 } |
| 744 | 743 |
| 745 } // namespace media | 744 } // namespace media |
| OLD | NEW |