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