123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- # Copyright 2014 The LibYuv Project Authors. All rights reserved.
- #
- # Use of this source code is governed by a BSD-style license
- # that can be found in the LICENSE file in the root of the source
- # tree. An additional intellectual property rights grant can be found
- # in the file PATENTS. All contributing project authors may
- # be found in the AUTHORS file in the root of the source tree.
- import("//build/config/arm.gni")
- import("//build/config/sanitizers/sanitizers.gni")
- config("libyuv_config") {
- include_dirs = [
- ".",
- "include",
- ]
- }
- use_neon = current_cpu == "arm64" || (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
- source_set("libyuv") {
- sources = [
- # Headers
- "include/libyuv.h",
- "include/libyuv/basic_types.h",
- "include/libyuv/compare.h",
- "include/libyuv/convert.h",
- "include/libyuv/convert_argb.h",
- "include/libyuv/convert_from.h",
- "include/libyuv/convert_from_argb.h",
- "include/libyuv/cpu_id.h",
- "include/libyuv/mjpeg_decoder.h",
- "include/libyuv/planar_functions.h",
- "include/libyuv/rotate.h",
- "include/libyuv/rotate_argb.h",
- "include/libyuv/rotate_row.h",
- "include/libyuv/row.h",
- "include/libyuv/scale.h",
- "include/libyuv/scale_argb.h",
- "include/libyuv/scale_row.h",
- "include/libyuv/version.h",
- "include/libyuv/video_common.h",
- # Source Files
- "source/compare.cc",
- "source/compare_common.cc",
- "source/compare_gcc.cc",
- "source/compare_win.cc",
- "source/convert.cc",
- "source/convert_argb.cc",
- "source/convert_from.cc",
- "source/convert_from_argb.cc",
- "source/convert_jpeg.cc",
- "source/convert_to_argb.cc",
- "source/convert_to_i420.cc",
- "source/cpu_id.cc",
- "source/mjpeg_decoder.cc",
- "source/mjpeg_validate.cc",
- "source/planar_functions.cc",
- "source/rotate.cc",
- "source/rotate_any.cc",
- "source/rotate_argb.cc",
- "source/rotate_common.cc",
- "source/rotate_mips.cc",
- "source/rotate_gcc.cc",
- "source/rotate_win.cc",
- "source/row_any.cc",
- "source/row_common.cc",
- "source/row_mips.cc",
- "source/row_gcc.cc",
- "source/row_win.cc",
- "source/scale.cc",
- "source/scale_any.cc",
- "source/scale_argb.cc",
- "source/scale_common.cc",
- "source/scale_mips.cc",
- "source/scale_gcc.cc",
- "source/scale_win.cc",
- "source/video_common.cc",
- ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- public_configs = [ ":libyuv_config" ]
- defines = []
- if (!is_ios) {
- defines += [ "HAVE_JPEG" ]
- }
- if (is_msan) {
- # MemorySanitizer does not support assembly code yet.
- # http://crbug.com/344505
- defines += [ "LIBYUV_DISABLE_X86" ]
- }
- deps = [
- "//third_party:jpeg",
- ]
- if (use_neon) {
- deps += [ ":libyuv_neon" ]
- }
- if (is_nacl) {
- # Always enable optimization under NaCl to workaround crbug.com/538243 .
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_max" ]
- }
- }
- if (use_neon) {
- static_library("libyuv_neon") {
- sources = [
- # ARM Source Files
- "source/compare_neon.cc",
- "source/compare_neon64.cc",
- "source/rotate_neon.cc",
- "source/rotate_neon64.cc",
- "source/row_neon.cc",
- "source/row_neon64.cc",
- "source/scale_neon.cc",
- "source/scale_neon64.cc",
- ]
- public_configs = [ ":libyuv_config" ]
- if (current_cpu != "arm64") {
- configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
- cflags = [ "-mfpu=neon" ]
- }
- }
- }
|