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 srcs: [ 45 "lib/src/icc.cpp", 46 "lib/src/jpegr.cpp", 47 "lib/src/gainmapmath.cpp", 48 "lib/src/gainmapmetadata.cpp", 49 "lib/src/jpegrutils.cpp", 50 "lib/src/multipictureformat.cpp", 51 "lib/src/editorhelper.cpp", 52 "lib/src/ultrahdr_api.cpp", 53 ], 54 shared_libs: [ 55 "libimage_io", 56 "libjpeg", 57 "libjpegencoder", 58 "libjpegdecoder", 59 "liblog", 60 ], 61 rtti: true, 62 target: { 63 windows: { 64 enabled: true, 65 }, 66 android: { 67 srcs: [ 68 "lib/src/gpu/applygainmap_gl.cpp", 69 "lib/src/gpu/editorhelper_gl.cpp", 70 "lib/src/gpu/uhdr_gl_utils.cpp", 71 ], 72 cflags: ["-DUHDR_ENABLE_GLES"], 73 shared_libs: [ 74 "libEGL", 75 "libGLESv3", 76 ], 77 }, 78 }, 79 arch: { 80 arm: { 81 srcs: [ 82 "lib/src/dsp/arm/editorhelper_neon.cpp", 83 "lib/src/dsp/arm/gainmapmath_neon.cpp", 84 ], 85 }, 86 arm64: { 87 srcs: [ 88 "lib/src/dsp/arm/editorhelper_neon.cpp", 89 "lib/src/dsp/arm/gainmapmath_neon.cpp", 90 ], 91 }, 92 }, 93} 94 95cc_library { 96 name: "libjpegencoder", 97 host_supported: true, 98 vendor_available: true, 99 shared_libs: [ 100 "libjpeg", 101 "liblog", 102 ], 103 export_include_dirs: ["lib/include"], 104 srcs: [ 105 "lib/src/jpegencoderhelper.cpp", 106 ], 107 target: { 108 windows: { 109 enabled: true, 110 }, 111 }, 112} 113 114cc_library { 115 name: "libjpegdecoder", 116 host_supported: true, 117 vendor_available: true, 118 shared_libs: [ 119 "libjpeg", 120 "liblog", 121 ], 122 export_include_dirs: ["lib/include"], 123 srcs: [ 124 "lib/src/jpegdecoderhelper.cpp", 125 ], 126 target: { 127 windows: { 128 enabled: true, 129 }, 130 }, 131} 132