Blender
V5.3
source
blender
compositor
utilities
COM_utilities_oidn.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#ifdef WITH_OPENIMAGEDENOISE
8
9
# include "
COM_context.hh
"
10
11
# include <OpenImageDenoise/oidn.hpp>
12
13
namespace
blender::compositor
{
14
15
/* Create an appropriate device based on the device preferences in the given context. Special
16
* attention is given to GPU devices, as multiple GPUs could exist, so the same GPU device used in
17
* the active GPU context is chosen. If no GPU context is active, OIDN chooses the best device,
18
* which is typically the fastest in the system. Such device selection makes execution more
19
* predictable and allows interoperability across APIs. */
20
oidn::DeviceRef create_oidn_device(
const
Context
&context);
21
22
/* Creates a buffer on the given device that represents the given image. If the device can access
23
* host-side data, the returned buffer is a simple wrapper around the data, otherwise, the data is
24
* copied to a device-only buffer. It is thus expected that the given image data will outlive the
25
* returned buffer. */
26
oidn::BufferRef create_oidn_buffer(
const
oidn::DeviceRef &device,
Result
&image);
27
28
}
// namespace blender::compositor
29
30
#endif
COM_context.hh
blender::compositor::Context
Definition
COM_context.hh:53
blender::compositor::Result
Definition
COM_result.hh:125
blender::compositor
Definition
BKE_node.hh:77
Generated on
for Blender by
doxygen
1.18.0