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

Side by Side Diff: media/base/simd/convert_rgb_to_yuv_sse2.cc

Issue 591313008: Add support for Rec709 color space videos in software YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add enum to mojom Created 5 years, 11 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
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/simd/convert_yuv_to_rgb.h » ('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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 #include "media/base/simd/convert_rgb_to_yuv.h" 6 #include "media/base/simd/convert_rgb_to_yuv.h"
7 #include "media/base/simd/yuv_to_rgb_table.h"
8 7
9 #if defined(COMPILER_MSVC) 8 #if defined(COMPILER_MSVC)
10 #include <intrin.h> 9 #include <intrin.h>
11 #else 10 #else
12 #include <mmintrin.h> 11 #include <mmintrin.h>
13 #include <emmintrin.h> 12 #include <emmintrin.h>
14 #endif 13 #endif
15 14
15 #if defined(COMPILER_MSVC)
16 #define SIMD_ALIGNED(var) __declspec(align(16)) var
17 #else
18 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
19 #endif
20
16 namespace media { 21 namespace media {
17 22
18 #define FIX_SHIFT 12 23 #define FIX_SHIFT 12
19 #define FIX(x) ((x) * (1 << FIX_SHIFT)) 24 #define FIX(x) ((x) * (1 << FIX_SHIFT))
20 25
21 // Define a convenient macro to do static cast. 26 // Define a convenient macro to do static cast.
22 #define INT16_FIX(x) static_cast<int16>(FIX(x)) 27 #define INT16_FIX(x) static_cast<int16>(FIX(x))
23 28
24 // Android's pixel layout is RGBA, while other platforms 29 // Android's pixel layout is RGBA, while other platforms
25 // are BGRA. 30 // are BGRA.
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 ++vplane; 408 ++vplane;
404 width -= 2; 409 width -= 2;
405 } 410 }
406 411
407 // Handle the last pixel in the last row. 412 // Handle the last pixel in the last row.
408 if (width) 413 if (width)
409 ConvertRGBToYUV_V1H1(rgbframe, yplane, uplane, vplane); 414 ConvertRGBToYUV_V1H1(rgbframe, yplane, uplane, vplane);
410 } 415 }
411 416
412 } // namespace media 417 } // namespace media
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/simd/convert_yuv_to_rgb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698