summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDario <dariosamo@gmail.com>2023-09-18 10:05:20 -0300
committerDario <dariosamo@gmail.com>2023-09-25 14:53:45 -0300
commitab65effed015df76b0858df27127f62b3aa94e0e (patch)
treecab7bbbdd2b63235b809560e47c3ac3784fa892b /modules
parent1b2b726502eabaae4a15d544d92735cc2efe35b5 (diff)
downloadredot-engine-ab65effed015df76b0858df27127f62b3aa94e0e.tar.gz
Remove denoise module and thirdparty OIDN.
This is replaced by a much lighter weight and faster JNLM denoiser. OIDN is still much more accurate, and may be provided as an optional backend in the future, but the JNLM denoiser seems good enough for most use cases and removing OIDN reduces the build system complexity, binary size, and build times very significantly.
Diffstat (limited to 'modules')
-rw-r--r--modules/denoise/SCsub138
-rw-r--r--modules/denoise/config.py12
-rw-r--r--modules/denoise/denoise_wrapper.cpp66
-rw-r--r--modules/denoise/denoise_wrapper.h38
-rw-r--r--modules/denoise/lightmap_denoiser.cpp65
-rw-r--r--modules/denoise/lightmap_denoiser.h56
-rw-r--r--modules/denoise/register_types.cpp49
-rw-r--r--modules/denoise/register_types.h39
-rw-r--r--modules/denoise/resource_to_cpp.py68
9 files changed, 0 insertions, 531 deletions
diff --git a/modules/denoise/SCsub b/modules/denoise/SCsub
deleted file mode 100644
index 967a511e1e..0000000000
--- a/modules/denoise/SCsub
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env python
-
-import resource_to_cpp
-
-Import("env")
-Import("env_modules")
-
-env_oidn = env_modules.Clone()
-
-# Thirdparty source files
-
-thirdparty_obj = []
-
-thirdparty_dir = "#thirdparty/oidn/"
-thirdparty_sources = [
- "core/api.cpp",
- "core/device.cpp",
- "core/filter.cpp",
- "core/network.cpp",
- "core/autoencoder.cpp",
- "core/transfer_function.cpp",
- "weights/rtlightmap_hdr.gen.cpp",
- "mkl-dnn/src/common/batch_normalization.cpp",
- "mkl-dnn/src/common/concat.cpp",
- "mkl-dnn/src/common/convolution.cpp",
- "mkl-dnn/src/common/convolution_pd.cpp",
- "mkl-dnn/src/common/deconvolution.cpp",
- "mkl-dnn/src/common/eltwise.cpp",
- "mkl-dnn/src/common/engine.cpp",
- "mkl-dnn/src/common/inner_product.cpp",
- "mkl-dnn/src/common/inner_product_pd.cpp",
- "mkl-dnn/src/common/lrn.cpp",
- "mkl-dnn/src/common/memory.cpp",
- "mkl-dnn/src/common/memory_desc_wrapper.cpp",
- "mkl-dnn/src/common/mkldnn_debug.cpp",
- "mkl-dnn/src/common/mkldnn_debug_autogenerated.cpp",
- "mkl-dnn/src/common/pooling.cpp",
- "mkl-dnn/src/common/primitive.cpp",
- "mkl-dnn/src/common/primitive_attr.cpp",
- "mkl-dnn/src/common/primitive_desc.cpp",
- "mkl-dnn/src/common/primitive_exec_types.cpp",
- "mkl-dnn/src/common/primitive_iterator.cpp",
- "mkl-dnn/src/common/query.cpp",
- "mkl-dnn/src/common/reorder.cpp",
- "mkl-dnn/src/common/rnn.cpp",
- "mkl-dnn/src/common/scratchpad.cpp",
- "mkl-dnn/src/common/shuffle.cpp",
- "mkl-dnn/src/common/softmax.cpp",
- "mkl-dnn/src/common/stream.cpp",
- "mkl-dnn/src/common/sum.cpp",
- "mkl-dnn/src/common/utils.cpp",
- "mkl-dnn/src/common/verbose.cpp",
- "mkl-dnn/src/cpu/cpu_barrier.cpp",
- "mkl-dnn/src/cpu/cpu_concat.cpp",
- "mkl-dnn/src/cpu/cpu_engine.cpp",
- "mkl-dnn/src/cpu/cpu_memory.cpp",
- "mkl-dnn/src/cpu/cpu_reducer.cpp",
- "mkl-dnn/src/cpu/cpu_reorder.cpp",
- "mkl-dnn/src/cpu/cpu_sum.cpp",
- "mkl-dnn/src/cpu/jit_avx2_conv_kernel_f32.cpp",
- "mkl-dnn/src/cpu/jit_avx2_convolution.cpp",
- "mkl-dnn/src/cpu/jit_avx512_common_conv_kernel.cpp",
- "mkl-dnn/src/cpu/jit_avx512_common_conv_winograd_kernel_f32.cpp",
- "mkl-dnn/src/cpu/jit_avx512_common_convolution.cpp",
- "mkl-dnn/src/cpu/jit_avx512_common_convolution_winograd.cpp",
- "mkl-dnn/src/cpu/jit_avx512_core_fp32_wino_conv_2x3.cpp",
- "mkl-dnn/src/cpu/jit_avx512_core_fp32_wino_conv_4x3.cpp",
- "mkl-dnn/src/cpu/jit_avx512_core_fp32_wino_conv_4x3_kernel.cpp",
- "mkl-dnn/src/cpu/jit_sse42_conv_kernel_f32.cpp",
- "mkl-dnn/src/cpu/jit_sse42_convolution.cpp",
- "mkl-dnn/src/cpu/jit_transpose_src_utils.cpp",
- "mkl-dnn/src/cpu/jit_uni_eltwise.cpp",
- "mkl-dnn/src/cpu/jit_uni_pool_kernel_f32.cpp",
- "mkl-dnn/src/cpu/jit_uni_pooling.cpp",
- "mkl-dnn/src/cpu/jit_uni_reorder.cpp",
- "mkl-dnn/src/cpu/jit_uni_reorder_utils.cpp",
- "mkl-dnn/src/cpu/jit_utils/jit_utils.cpp",
- "mkl-dnn/src/cpu/jit_utils/jitprofiling/jitprofiling.c",
- "common/platform.cpp",
- "common/thread.cpp",
- "common/tensor.cpp",
-]
-thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
-
-thirdparty_include_dirs = [
- "",
- "include",
- "mkl-dnn/include",
- "mkl-dnn/src",
- "mkl-dnn/src/common",
- "mkl-dnn/src/cpu/xbyak",
- "mkl-dnn/src/cpu",
-]
-thirdparty_include_dirs = [thirdparty_dir + file for file in thirdparty_include_dirs]
-
-
-env_oidn.Prepend(CPPPATH=thirdparty_include_dirs)
-env_oidn.Append(
- CPPDEFINES=[
- "MKLDNN_THR=MKLDNN_THR_SEQ",
- "OIDN_STATIC_LIB",
- "__STDC_CONSTANT_MACROS",
- "__STDC_LIMIT_MACROS",
- "DISABLE_VERBOSE",
- "MKLDNN_ENABLE_CONCURRENT_EXEC",
- ]
-)
-env_oidn.AppendUnique(CPPDEFINES=["NDEBUG"]) # No assert() even in debug builds.
-
-env_thirdparty = env_oidn.Clone()
-env_thirdparty.disable_warnings()
-
-if env["disable_exceptions"]:
- # OIDN hard-requires exceptions, so we re-enable them here.
- if env.msvc and ("_HAS_EXCEPTIONS", 0) in env_thirdparty["CPPDEFINES"]:
- env_thirdparty["CPPDEFINES"].remove(("_HAS_EXCEPTIONS", 0))
- env_thirdparty.AppendUnique(CCFLAGS=["/EHsc"])
- elif not env.msvc and "-fno-exceptions" in env_thirdparty["CCFLAGS"]:
- env_thirdparty["CCFLAGS"].remove("-fno-exceptions")
-
-env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
-env.modules_sources += thirdparty_obj
-
-weights_in_path = thirdparty_dir + "weights/rtlightmap_hdr.tza"
-weights_out_path = thirdparty_dir + "weights/rtlightmap_hdr.gen.cpp"
-
-env_thirdparty.Depends(weights_out_path, weights_in_path)
-env_thirdparty.CommandNoCache(weights_out_path, weights_in_path, resource_to_cpp.tza_to_cpp)
-
-# Godot source files
-
-module_obj = []
-
-env_oidn.add_source_files(module_obj, "*.cpp")
-env.modules_sources += module_obj
-
-# Needed to force rebuilding the module files when the thirdparty library is updated.
-env.Depends(module_obj, thirdparty_obj)
diff --git a/modules/denoise/config.py b/modules/denoise/config.py
deleted file mode 100644
index 27d2ffbf86..0000000000
--- a/modules/denoise/config.py
+++ /dev/null
@@ -1,12 +0,0 @@
-def can_build(env, platform):
- # Thirdparty dependency OpenImage Denoise includes oneDNN library
- # and the version we use only supports x86_64.
- # It's also only relevant for tools build and desktop platforms,
- # as doing lightmap generation and denoising on Android or Web
- # would be a bit far-fetched.
- desktop_platforms = ["linuxbsd", "macos", "windows"]
- return env.editor_build and platform in desktop_platforms and env["arch"] == "x86_64"
-
-
-def configure(env):
- pass
diff --git a/modules/denoise/denoise_wrapper.cpp b/modules/denoise/denoise_wrapper.cpp
deleted file mode 100644
index 87f02cb4c6..0000000000
--- a/modules/denoise/denoise_wrapper.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/**************************************************************************/
-/* denoise_wrapper.cpp */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#include "denoise_wrapper.h"
-
-#include <OpenImageDenoise/oidn.h>
-
-#include <stdio.h>
-
-void *oidn_denoiser_init() {
- OIDNDeviceImpl *device = oidnNewDevice(OIDN_DEVICE_TYPE_CPU);
- oidnCommitDevice(device);
- return device;
-}
-
-bool oidn_denoise(void *deviceptr, float *p_floats, int p_width, int p_height) {
- OIDNDeviceImpl *device = (OIDNDeviceImpl *)deviceptr;
- OIDNFilter filter = oidnNewFilter(device, "RTLightmap");
- oidnSetSharedFilterImage(filter, "color", (void *)p_floats, OIDN_FORMAT_FLOAT3, p_width, p_height, 0, 0, 0);
- oidnSetSharedFilterImage(filter, "output", (void *)p_floats, OIDN_FORMAT_FLOAT3, p_width, p_height, 0, 0, 0);
- oidnSetFilter1b(filter, "hdr", true);
- //oidnSetFilter1f(filter, "hdrScale", 1.0f);
- oidnCommitFilter(filter);
- oidnExecuteFilter(filter);
-
- const char *msg;
- bool success = true;
- if (oidnGetDeviceError(device, &msg) != OIDN_ERROR_NONE) {
- printf("LightmapDenoiser: %s\n", msg);
- success = false;
- }
-
- oidnReleaseFilter(filter);
- return success;
-}
-
-void oidn_denoiser_finish(void *device) {
- oidnReleaseDevice((OIDNDeviceImpl *)device);
-}
diff --git a/modules/denoise/denoise_wrapper.h b/modules/denoise/denoise_wrapper.h
deleted file mode 100644
index d4bf154a5d..0000000000
--- a/modules/denoise/denoise_wrapper.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/**************************************************************************/
-/* denoise_wrapper.h */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#ifndef DENOISE_WRAPPER_H
-#define DENOISE_WRAPPER_H
-
-void *oidn_denoiser_init();
-bool oidn_denoise(void *device, float *p_floats, int p_width, int p_height);
-void oidn_denoiser_finish(void *device);
-
-#endif // DENOISE_WRAPPER_H
diff --git a/modules/denoise/lightmap_denoiser.cpp b/modules/denoise/lightmap_denoiser.cpp
deleted file mode 100644
index 72764036e1..0000000000
--- a/modules/denoise/lightmap_denoiser.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************/
-/* lightmap_denoiser.cpp */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#include "lightmap_denoiser.h"
-
-#include "denoise_wrapper.h"
-
-#include "core/io/image.h"
-
-LightmapDenoiser *LightmapDenoiserOIDN::create_oidn_denoiser() {
- return memnew(LightmapDenoiserOIDN);
-}
-
-void LightmapDenoiserOIDN::make_default_denoiser() {
- create_function = create_oidn_denoiser;
-}
-
-Ref<Image> LightmapDenoiserOIDN::denoise_image(const Ref<Image> &p_image) {
- Ref<Image> img = p_image->duplicate();
-
- img->convert(Image::FORMAT_RGBF);
-
- Vector<uint8_t> data = img->get_data();
- if (!oidn_denoise(device, (float *)data.ptrw(), img->get_width(), img->get_height())) {
- return p_image;
- }
-
- img->set_data(img->get_width(), img->get_height(), false, img->get_format(), data);
- return img;
-}
-
-LightmapDenoiserOIDN::LightmapDenoiserOIDN() {
- device = oidn_denoiser_init();
-}
-
-LightmapDenoiserOIDN::~LightmapDenoiserOIDN() {
- oidn_denoiser_finish(device);
-}
diff --git a/modules/denoise/lightmap_denoiser.h b/modules/denoise/lightmap_denoiser.h
deleted file mode 100644
index 8f658ab096..0000000000
--- a/modules/denoise/lightmap_denoiser.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/**************************************************************************/
-/* lightmap_denoiser.h */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#ifndef LIGHTMAP_DENOISER_H
-#define LIGHTMAP_DENOISER_H
-
-#include "core/object/class_db.h"
-#include "scene/3d/lightmapper.h"
-
-struct OIDNDeviceImpl;
-
-class LightmapDenoiserOIDN : public LightmapDenoiser {
- GDCLASS(LightmapDenoiserOIDN, LightmapDenoiser);
-
-protected:
- void *device = nullptr;
-
-public:
- static LightmapDenoiser *create_oidn_denoiser();
-
- Ref<Image> denoise_image(const Ref<Image> &p_image) override;
-
- static void make_default_denoiser();
-
- LightmapDenoiserOIDN();
- ~LightmapDenoiserOIDN();
-};
-
-#endif // LIGHTMAP_DENOISER_H
diff --git a/modules/denoise/register_types.cpp b/modules/denoise/register_types.cpp
deleted file mode 100644
index a4264b07c5..0000000000
--- a/modules/denoise/register_types.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/**************************************************************************/
-/* register_types.cpp */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#include "register_types.h"
-
-#include "lightmap_denoiser.h"
-
-#include "core/config/engine.h"
-
-void initialize_denoise_module(ModuleInitializationLevel p_level) {
- if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
- return;
- }
-
- LightmapDenoiserOIDN::make_default_denoiser();
-}
-
-void uninitialize_denoise_module(ModuleInitializationLevel p_level) {
- if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
- return;
- }
-}
diff --git a/modules/denoise/register_types.h b/modules/denoise/register_types.h
deleted file mode 100644
index 239877a5c7..0000000000
--- a/modules/denoise/register_types.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**************************************************************************/
-/* register_types.h */
-/**************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/**************************************************************************/
-/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
-/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/**************************************************************************/
-
-#ifndef DENOISE_REGISTER_TYPES_H
-#define DENOISE_REGISTER_TYPES_H
-
-#include "modules/register_module_types.h"
-
-void initialize_denoise_module(ModuleInitializationLevel p_level);
-void uninitialize_denoise_module(ModuleInitializationLevel p_level);
-
-#endif // DENOISE_REGISTER_TYPES_H
diff --git a/modules/denoise/resource_to_cpp.py b/modules/denoise/resource_to_cpp.py
deleted file mode 100644
index a89eda9117..0000000000
--- a/modules/denoise/resource_to_cpp.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env python
-
-## ======================================================================== ##
-## Copyright 2009-2019 Intel Corporation ##
-## ##
-## Licensed under the Apache License, Version 2.0 (the "License"); ##
-## you may not use this file except in compliance with the License. ##
-## You may obtain a copy of the License at ##
-## ##
-## http://www.apache.org/licenses/LICENSE-2.0 ##
-## ##
-## Unless required by applicable law or agreed to in writing, software ##
-## distributed under the License is distributed on an "AS IS" BASIS, ##
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ##
-## See the License for the specific language governing permissions and ##
-## limitations under the License. ##
-## ======================================================================== ##
-
-import os
-from array import array
-
-
-# Generates a C++ file from the specified binary resource file
-def generate(in_path, out_path):
- namespace = "oidn::weights"
- scopes = namespace.split("::")
-
- file_name = os.path.basename(in_path)
- var_name = os.path.splitext(file_name)[0]
-
- with open(in_path, "rb") as in_file, open(out_path, "w") as out_file:
- # Header
- out_file.write("// Generated from: %s\n" % file_name)
- out_file.write("#include <cstddef>\n\n")
-
- # Open the namespaces
- for s in scopes:
- out_file.write("namespace %s {\n" % s)
- if scopes:
- out_file.write("\n")
-
- # Read the file
- in_data = array("B", in_file.read())
-
- # Write the size
- out_file.write("//const size_t %s_size = %d;\n\n" % (var_name, len(in_data)))
-
- # Write the data
- out_file.write("unsigned char %s[] = {" % var_name)
- for i in range(len(in_data)):
- c = in_data[i]
- if i > 0:
- out_file.write(",")
- if (i + 1) % 20 == 1:
- out_file.write("\n")
- out_file.write("%d" % c)
- out_file.write("\n};\n")
-
- # Close the namespaces
- if scopes:
- out_file.write("\n")
- for scope in reversed(scopes):
- out_file.write("} // namespace %s\n" % scope)
-
-
-def tza_to_cpp(target, source, env):
- for x in zip(source, target):
- generate(str(x[0]), str(x[1]))