OLD | NEW |
1 # Copyright 2014 The LibYuv Project Authors. All rights reserved. | 1 # Copyright 2014 The LibYuv Project Authors. All rights reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
11 | 11 |
12 config("libyuv_config") { | 12 config("libyuv_config") { |
13 include_dirs = [ | 13 include_dirs = [ |
14 ".", | 14 ".", |
15 "include", | 15 "include", |
16 ] | 16 ] |
17 } | 17 } |
18 | 18 |
19 use_neon = current_cpu == "arm64" || (current_cpu == "arm" && (arm_use_neon || a
rm_optionally_use_neon)) | 19 use_neon = current_cpu == "arm64" || (current_cpu == "arm" && (arm_use_neon || a
rm_optionally_use_neon)) |
20 | 20 |
21 source_set("libyuv") { | 21 source_set("libyuv") { |
22 sources = [ | 22 sources = [ |
| 23 # Headers |
23 "include/libyuv.h", | 24 "include/libyuv.h", |
24 "include/libyuv/basic_types.h", | 25 "include/libyuv/basic_types.h", |
25 "include/libyuv/compare.h", | 26 "include/libyuv/compare.h", |
26 "include/libyuv/convert.h", | 27 "include/libyuv/convert.h", |
27 "include/libyuv/convert_argb.h", | 28 "include/libyuv/convert_argb.h", |
28 "include/libyuv/convert_from.h", | 29 "include/libyuv/convert_from.h", |
29 "include/libyuv/convert_from_argb.h", | 30 "include/libyuv/convert_from_argb.h", |
30 "include/libyuv/cpu_id.h", | 31 "include/libyuv/cpu_id.h", |
31 "include/libyuv/mjpeg_decoder.h", | 32 "include/libyuv/mjpeg_decoder.h", |
32 "include/libyuv/planar_functions.h", | 33 "include/libyuv/planar_functions.h", |
33 "include/libyuv/rotate.h", | 34 "include/libyuv/rotate.h", |
34 "include/libyuv/rotate_argb.h", | 35 "include/libyuv/rotate_argb.h", |
35 "include/libyuv/rotate_row.h", | 36 "include/libyuv/rotate_row.h", |
36 "include/libyuv/row.h", | 37 "include/libyuv/row.h", |
37 "include/libyuv/scale.h", | 38 "include/libyuv/scale.h", |
38 "include/libyuv/scale_argb.h", | 39 "include/libyuv/scale_argb.h", |
39 "include/libyuv/scale_row.h", | 40 "include/libyuv/scale_row.h", |
40 "include/libyuv/version.h", | 41 "include/libyuv/version.h", |
41 "include/libyuv/video_common.h", | 42 "include/libyuv/video_common.h", |
42 | 43 |
43 # sources. | 44 # Source Files |
44 "source/compare.cc", | 45 "source/compare.cc", |
45 "source/compare_common.cc", | 46 "source/compare_common.cc", |
46 "source/compare_gcc.cc", | 47 "source/compare_gcc.cc", |
47 "source/compare_win.cc", | 48 "source/compare_win.cc", |
48 "source/convert.cc", | 49 "source/convert.cc", |
49 "source/convert_argb.cc", | 50 "source/convert_argb.cc", |
50 "source/convert_from.cc", | 51 "source/convert_from.cc", |
51 "source/convert_from_argb.cc", | 52 "source/convert_from_argb.cc", |
52 "source/convert_jpeg.cc", | 53 "source/convert_jpeg.cc", |
53 "source/convert_to_argb.cc", | 54 "source/convert_to_argb.cc", |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (is_nacl) { | 107 if (is_nacl) { |
107 # Always enable optimization under NaCl to workaround crbug.com/538243 . | 108 # Always enable optimization under NaCl to workaround crbug.com/538243 . |
108 configs -= [ "//build/config/compiler:default_optimization" ] | 109 configs -= [ "//build/config/compiler:default_optimization" ] |
109 configs += [ "//build/config/compiler:optimize_max" ] | 110 configs += [ "//build/config/compiler:optimize_max" ] |
110 } | 111 } |
111 } | 112 } |
112 | 113 |
113 if (use_neon) { | 114 if (use_neon) { |
114 static_library("libyuv_neon") { | 115 static_library("libyuv_neon") { |
115 sources = [ | 116 sources = [ |
| 117 # ARM Source Files |
116 "source/compare_neon.cc", | 118 "source/compare_neon.cc", |
117 "source/compare_neon64.cc", | 119 "source/compare_neon64.cc", |
118 "source/rotate_neon.cc", | 120 "source/rotate_neon.cc", |
119 "source/rotate_neon64.cc", | 121 "source/rotate_neon64.cc", |
120 "source/row_neon.cc", | 122 "source/row_neon.cc", |
121 "source/row_neon64.cc", | 123 "source/row_neon64.cc", |
122 "source/scale_neon.cc", | 124 "source/scale_neon.cc", |
123 "source/scale_neon64.cc", | 125 "source/scale_neon64.cc", |
124 ] | 126 ] |
125 | 127 |
126 public_configs = [ ":libyuv_config" ] | 128 public_configs = [ ":libyuv_config" ] |
127 | 129 |
128 if (current_cpu != "arm64") { | 130 if (current_cpu != "arm64") { |
129 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 131 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |
130 cflags = [ "-mfpu=neon" ] | 132 cflags = [ "-mfpu=neon" ] |
131 } | 133 } |
132 } | 134 } |
133 } | 135 } |
OLD | NEW |