1// Copyright 2022 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 default_applicable_licenses: [ 18 "external_libultrahdr_license", 19 "adobe_hdr_gain_map_license", 20 ], 21} 22 23license { 24 name: "external_libultrahdr_license", 25 visibility: [":__subpackages__"], 26 license_kinds: [ 27 "SPDX-license-identifier-Apache-2.0", 28 ], 29 license_text: [ 30 "LICENSE", 31 ], 32} 33 34cc_library { 35 name: "libultrahdr", 36 host_supported: true, 37 vendor_available: true, 38 export_include_dirs: [ 39 ".", 40 "lib/include", 41 ], 42 local_include_dirs: ["lib/include"], 43 cflags: ["-DUHDR_ENABLE_INTRINSICS"], 44 45 srcs: [ 46 "lib/src/icc.cpp", 47 "lib/src/jpegr.cpp", 48 "lib/src/gainmapmath.cpp", 49 "lib/src/gainmapmetadata.cpp", 50 "lib/src/jpegrutils.cpp", 51 "lib/src/multipictureformat.cpp", 52 "lib/src/editorhelper.cpp", 53 "lib/src/ultrahdr_api.cpp", 54 ], 55 56 shared_libs: [ 57 "libimage_io", 58 "libjpeg", 59 "libjpegencoder", 60 "libjpegdecoder", 61 "liblog", 62 ], 63 rtti: true, 64 65 target: { 66 windows: { 67 enabled: true, 68 }, 69 }, 70 71 arch: { 72 arm: { 73 srcs: [ 74 "lib/src/dsp/arm/editorhelper_neon.cpp", 75 ], 76 }, 77 arm64: { 78 srcs: [ 79 "lib/src/dsp/arm/editorhelper_neon.cpp", 80 "lib/src/dsp/arm/gainmapmath_neon.cpp", 81 ], 82 }, 83 }, 84} 85 86cc_library { 87 name: "libjpegencoder", 88 host_supported: true, 89 vendor_available: true, 90 91 shared_libs: [ 92 "libjpeg", 93 "liblog", 94 ], 95 96 export_include_dirs: ["lib/include"], 97 98 srcs: [ 99 "lib/src/jpegencoderhelper.cpp", 100 ], 101 102 target: { 103 windows: { 104 enabled: true, 105 }, 106 }, 107} 108 109cc_library { 110 name: "libjpegdecoder", 111 host_supported: true, 112 vendor_available: true, 113 114 shared_libs: [ 115 "libjpeg", 116 "liblog", 117 ], 118 119 export_include_dirs: ["lib/include"], 120 121 srcs: [ 122 "lib/src/jpegdecoderhelper.cpp", 123 ], 124 125 target: { 126 windows: { 127 enabled: true, 128 }, 129 }, 130} 131