OidnWeights

The weights of an Open Image Denoise network, read from a TZA file (rendering-revamp §RVR-7).

In the namespace construct::denoise. Declared in src/libs/libconstruct/construct/denoise/OidnWeights.hpp.

Detailed description

The TZA format, version 2, as OIDN's `core/tza.cpp` reads it (https://github.com/RenderKit/oidn): the magic 0x41D7, a major version of 2 and a minor version, the offset of a table, and in the table each tensor's name, its dimensions, its layout, its data type ('f' or 'h') and the offset of its data. Every number is little-endian. Every offset and size is checked against the file, so a corrupted file gives an error and never a read outside it.

The weights of the denoiser ship with the library: builtIn() reads `rt_hdr_alb_nrm.tza` (OIDN's `rt` filter for HDR color, albedo and normal; Apache-2.0, origin in `construct/denoise/oidn/NOTICE.md`).

In this section