xref: /aosp_15_r20/frameworks/rs/toolkit/Android.bp (revision e1eccf28f96817838ad6867f7f39d2351ec11f56)
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5// TODO: In later CLs, this build file will be replaced by a stand alone build that's not part of Android.
6
7cc_binary {
8    name: "renderscripttoolkittest",
9    srcs: [
10        "TestTaskProcessor.cpp"
11    ],
12    shared_libs: [
13         "libbase",
14         "librenderscripttoolkit",
15    ],
16}
17
18cc_library_shared {
19    name: "librenderscripttoolkit",
20    defaults: [],
21    vendor_available: false,
22    native_bridge_supported: false,
23    double_loadable: true,
24
25    srcs: [
26        "Blend.cpp",
27        "Blur.cpp",
28        "ColorMatrix.cpp",
29        "Convolve3x3.cpp",
30        "Convolve5x5.cpp",
31        "Histogram.cpp",
32        "Lut.cpp",
33        "Lut3d.cpp",
34	"RenderScriptToolkit.cpp",
35        "Resize.cpp",
36        "TaskProcessor.cpp",
37        "Utils.cpp",
38        "YuvToRgb.cpp",
39    ],
40
41    static_libs: [ "cpufeatures" ],
42
43    arch: {
44        arm64: {
45            cflags: [
46                "-DARCH_ARM_USE_INTRINSICS",
47                "-DARCH_ARM64_USE_INTRINSICS",
48                "-DARCH_ARM64_HAVE_NEON",
49            ],
50
51            srcs: [
52                "Blend_advsimd.S",
53                "Blur_advsimd.S",
54                "ColorMatrix_advsimd.S",
55                "Convolve_advsimd.S",
56                "Lut3d_advsimd.S",
57                "Resize_advsimd.S",
58                "YuvToRgb_advsimd.S",
59            ],
60        },
61
62        arm: {
63            cflags: [
64                "-DARCH_ARM_HAVE_NEON",
65                "-DARCH_ARM_HAVE_VFP",
66                "-DARCH_ARM_USE_INTRINSICS",
67            ],
68
69            srcs: [
70                "Blend_neon.S",
71                "Blur_neon.S",
72                "ColorMatrix_neon.S",
73                "Convolve_neon.S",
74                "Lut3d_neon.S",
75                "Resize_neon.S",
76                "YuvToRgb_neon.S",
77            ],
78        },
79
80        x86: {
81            cflags: ["-DARCH_X86_HAVE_SSSE3"],
82            srcs: ["x86.cpp"],
83        },
84        x86_64: {
85            cflags: ["-DARCH_X86_HAVE_SSSE3"],
86            srcs: ["x86.cpp"],
87        avx2: {
88                cflags: ["-DARCH_X86_HAVE_AVX2", "-mavx2", "-mfma"],
89            },
90        },
91    },
92
93    shared_libs: [
94        "libbase",
95        "liblog",
96	"libnativehelper",
97	"libjnigraphics",
98    ],
99    header_libs: [
100        // TODO Once we compile in the .cpp files, check if any of these libraries are needed.
101        //"libutils_headers",
102        //"libhardware_headers",
103    ],
104
105    include_dirs: [
106    ],
107
108    cflags: [
109        "-Wthread-safety",
110        "-Werror",
111        "-Wall",
112        "-Wextra",
113        "-Wno-unused-parameter",
114        "-Wno-unused-variable",
115    ],
116}
117