| # Copyright 2019 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/arm.gni") |
| import("//third_party/libgav1/options.gni") |
| |
| config("public_libgav1_config") { |
| include_dirs = [ |
| "src", |
| "src/src", |
| ] |
| |
| defines = [ |
| "LIBGAV1_MAX_BITDEPTH=10", |
| "LIBGAV1_THREADPOOL_USE_STD_MUTEX", # to avoid abseil dependency. |
| "LIBGAV1_ENABLE_LOGGING=0", # to avoid debug log of libgav1 in chromium |
| # debug build. |
| |
| # Don't let libgav1 export any symbols. Otherwise the verify_order step on |
| # macOS can fail since these exports end up in the final Chromium binary. |
| "LIBGAV1_PUBLIC=", |
| ] |
| } |
| |
| config("private_libgav1_config") { |
| configs = [] |
| |
| # dsp intrinsics will generate much better code when optimized for speed |
| # rather than size. |
| if (!is_debug) { |
| configs += [ "//build/config/compiler:optimize_max" ] |
| } |
| if (current_cpu == "arm64" || |
| (current_cpu == "arm" && arm_version >= 7 && arm_use_neon)) { |
| # The default thumb mode will impact performance of dsp intrinsics. |
| configs += [ "//build/config/compiler:compiler_arm" ] |
| } |
| } |
| |
| if (use_libgav1_parser) { |
| static_library("libgav1_parser") { |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ "//build/config/compiler:no_chromium_code" ] |
| configs += [ ":private_libgav1_config" ] |
| |
| public_configs = [ ":public_libgav1_config" ] |
| |
| sources = [ |
| "//third_party/libgav1/src/src/buffer_pool.cc", |
| "//third_party/libgav1/src/src/buffer_pool.h", |
| "//third_party/libgav1/src/src/frame_buffer.cc", |
| "//third_party/libgav1/src/src/internal_frame_buffer_list.cc", |
| "//third_party/libgav1/src/src/internal_frame_buffer_list.h", |
| "//third_party/libgav1/src/src/obu_parser.cc", |
| "//third_party/libgav1/src/src/obu_parser.h", |
| "//third_party/libgav1/src/src/quantizer.cc", |
| "//third_party/libgav1/src/src/quantizer.h", |
| "//third_party/libgav1/src/src/status_code.cc", |
| "//third_party/libgav1/src/src/symbol_decoder_context.cc", |
| "//third_party/libgav1/src/src/symbol_decoder_context.h", |
| "//third_party/libgav1/src/src/utils/bit_reader.cc", |
| "//third_party/libgav1/src/src/utils/bit_reader.h", |
| "//third_party/libgav1/src/src/utils/constants.cc", |
| "//third_party/libgav1/src/src/utils/constants.h", |
| "//third_party/libgav1/src/src/utils/logging.cc", |
| "//third_party/libgav1/src/src/utils/logging.h", |
| "//third_party/libgav1/src/src/utils/raw_bit_reader.cc", |
| "//third_party/libgav1/src/src/utils/raw_bit_reader.h", |
| "//third_party/libgav1/src/src/utils/segmentation.cc", |
| "//third_party/libgav1/src/src/utils/segmentation.h", |
| "//third_party/libgav1/src/src/utils/segmentation_map.cc", |
| "//third_party/libgav1/src/src/utils/segmentation_map.h", |
| "//third_party/libgav1/src/src/warp_prediction.cc", |
| "//third_party/libgav1/src/src/warp_prediction.h", |
| "//third_party/libgav1/src/src/yuv_buffer.cc", |
| "//third_party/libgav1/src/src/yuv_buffer.h", |
| ] |
| } |
| } |