Files
test2/intern/cycles/integrator/denoiser_oidn.h
Brecht Van Lommel d0c2e68e5f Refactor: Cycles: Automated clang-tidy fixups in Cycles
* Use .empty() and .data()
* Use nullptr instead of 0
* No else after return
* Simple class member initialization
* Add override for virtual methods
* Include C++ instead of C headers
* Remove some unused includes
* Use default constructors
* Always use braces
* Consistent names in definition and declaration
* Change typedef to using

Pull Request: https://projects.blender.org/blender/blender/pulls/132361
2025-01-03 10:22:55 +01:00

35 lines
1.0 KiB
C++

/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include "integrator/denoiser.h"
#include "util/thread.h"
CCL_NAMESPACE_BEGIN
/* Implementation of a CPU based denoiser which uses OpenImageDenoise library. */
class OIDNDenoiser : public Denoiser {
public:
/* Forwardly declared state which might be using compile-flag specific fields, such as
* OpenImageDenoise device and filter handles. */
class State;
OIDNDenoiser(Device *denoiser_device, const DenoiseParams &params);
bool denoise_buffer(const BufferParams &buffer_params,
RenderBuffers *render_buffers,
const int num_samples,
bool allow_inplace_modification) override;
protected:
uint get_device_type_mask() const override;
/* We only perform one denoising at a time, since OpenImageDenoise itself is multithreaded.
* Use this mutex whenever images are passed to the OIDN and needs to be denoised. */
static thread_mutex mutex_;
};
CCL_NAMESPACE_END