nvtt
Loading...
Searching...
No Matches
nvtt_lowlevel.h
Go to the documentation of this file.
1// Copyright (c) 2015 ~ 2019 NVIDIA Corporation
2//
3// Permission is hereby granted, free of charge, to any person
4// obtaining a copy of this software and associated documentation
5// files (the "Software"), to deal in the Software without
6// restriction, including without limitation the rights to use,
7// copy, modify, merge, publish, distribute, sublicense, and/or sell
8// copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following
10// conditions:
11//
12// The above copyright notice and this permission notice shall be
13// included in all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22// OTHER DEALINGS IN THE SOFTWARE.
23
47
48#ifndef nvtt_lowlevel_h
49#define nvtt_lowlevel_h
50
51#include <stddef.h>
52#include <stdint.h>
53
54#ifdef _DOXYGEN_
56#define NVTT_API
60#define NVTT_DEPRECATED_API
61#endif
62
63// Function linkage
64#if NVTT_SHARED
65
66#if defined _WIN32 || defined WIN32 || defined __NT__ || defined __WIN32__ || defined __MINGW32__
67# ifdef NVTT_EXPORTS
68# define NVTT_API __declspec(dllexport)
69# else
70# define NVTT_API __declspec(dllimport)
71# endif
72#endif
73
74#if defined __GNUC__ >= 4
75# ifdef NVTT_EXPORTS
76# define NVTT_API __attribute__((visibility("default")))
77# endif
78#endif
79
80#endif // NVTT_SHARED
81
82#if !defined NVTT_API
83# define NVTT_API
84#endif
85
86#if !defined NVTT_DEPRECATED_API
87# define NVTT_DEPRECATED_API [[deprecated]] NVTT_API
88#endif
89
90namespace nvtt
91{
94
109
110 struct TimingContext;
111
121
124 {
125 Red = 0,
126 Green = 1,
127 Blue = 2,
128 Alpha = 3,
129 Zero = 4,
130 One = 5
131 };
132
134 struct RefImage
135 {
136 const void *data;
137 int width = 0;
138 int height = 0;
139 int depth = 1;
140 int num_channels = 4;
141 ChannelOrder channel_swizzle[4] = { Red,Green,Blue,Alpha };
142 bool channel_interleave = true;
143 };
144
148 {
154 NVTT_API CPUInputBuffer(const RefImage* images, ValueType value_type, int numImages=1, int tile_w=4, int tile_h=4,
155 float WeightR=1.0f, float WeightG=1.0f, float WeightB=1.0f, float WeightA=1.0f, nvtt::TimingContext *tc = nullptr, unsigned* num_tiles = nullptr);
156
159
161 NVTT_API int NumTiles() const;
162
164 NVTT_API void TileSize(int& tile_w, int& tile_h) const;
165
168
170 NVTT_API void* GetTile(int i, int& vw, int& vh) const;
171
172 struct Private;
173 Private *m;
174 };
175
179 {
185 NVTT_API GPUInputBuffer(const RefImage* images, ValueType value_type, int numImages = 1, int tile_w = 4, int tile_h = 4,
186 float WeightR = 1.0f, float WeightG = 1.0f, float WeightB = 1.0f, float WeightA = 1.0f, nvtt::TimingContext *tc = nullptr, unsigned* num_tiles = nullptr);
187
192 NVTT_API GPUInputBuffer(const CPUInputBuffer& cpu_buf, int begin = 0, int end = -1, nvtt::TimingContext *tc = nullptr);
193
196
198 NVTT_API int NumTiles() const;
199
201 NVTT_API void TileSize(int& tile_w, int& tile_h) const;
202
205
206 struct Private;
207 Private *m;
208 };
209
211 // @@ I wish I had distinguished between "formats" and compressors.
216 // @@ Having multiple enums for the same ids only creates confusion. Clean this up.
295
311
329 {
330 Quality_Fastest,
331 Quality_Normal,
332 Quality_Production,
333 Quality_Highest,
334 };
335
338 static const uint32_t EncodeSettings_Version_1 = 1;
339
341 enum EncodeFlags : uint32_t
342 {
343 EncodeFlags_None = 0,
353 EncodeFlags_Opaque = 1 << 2
354 };
355
388 {
393 uint32_t sType = EncodeSettings_Version_1;
397 Quality quality = Quality_Normal;
407
411 NVTT_API EncodeSettings& SetQuality(Quality _quality);
412 NVTT_API EncodeSettings& SetRGBPixelType(PixelType _rgb_pixel_type);
413 NVTT_API EncodeSettings& SetTimingContext(TimingContext *_timing_context);
420 };
421
451 NVTT_API bool nvtt_encode(const CPUInputBuffer& input, void* output, const EncodeSettings& settings);
452
486 NVTT_API bool nvtt_encode(const GPUInputBuffer& input, void* output, const EncodeSettings& settings);
487
494
496
518 NVTT_DEPRECATED_API void nvtt_encode_bc1(const CPUInputBuffer& input, bool fast_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
519
539 NVTT_DEPRECATED_API void nvtt_encode_bc1(const GPUInputBuffer& input, bool fast_mode, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
540
542
544
569 NVTT_DEPRECATED_API void nvtt_encode_bc1a(const CPUInputBuffer& input, bool fast_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
570
587 NVTT_DEPRECATED_API void nvtt_encode_bc1a(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
588
590
592
617 NVTT_DEPRECATED_API void nvtt_encode_bc2(const CPUInputBuffer& input, bool fast_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
618
635 NVTT_DEPRECATED_API void nvtt_encode_bc2(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
636
638
640
665 NVTT_DEPRECATED_API void nvtt_encode_bc3(const CPUInputBuffer& input, bool fast_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
666
683 NVTT_DEPRECATED_API void nvtt_encode_bc3(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
684
686
688
705 NVTT_DEPRECATED_API void nvtt_encode_bc3n(const CPUInputBuffer& input, int qualityLevel, void* output, nvtt::TimingContext *tc = nullptr);
706
708
710
723 NVTT_DEPRECATED_API void nvtt_encode_bc3_rgbm(const CPUInputBuffer& input, void* output, nvtt::TimingContext *tc = nullptr);
724
726
728
752 NVTT_DEPRECATED_API void nvtt_encode_bc4(const CPUInputBuffer& input, bool slow_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
753
770 NVTT_DEPRECATED_API void nvtt_encode_bc4(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
771
773
775
799 NVTT_DEPRECATED_API void nvtt_encode_bc4s(const CPUInputBuffer& input, bool slow_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
800
817 NVTT_DEPRECATED_API void nvtt_encode_bc4s(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
818
820
822
846 NVTT_DEPRECATED_API void nvtt_encode_ati2(const CPUInputBuffer& input, bool slow_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
847
864 NVTT_DEPRECATED_API void nvtt_encode_ati2(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
865
867
869
893 NVTT_DEPRECATED_API void nvtt_encode_bc5(const CPUInputBuffer& input, bool slow_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
894
911 NVTT_DEPRECATED_API void nvtt_encode_bc5(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
912
914
916
940 NVTT_DEPRECATED_API void nvtt_encode_bc5s(const CPUInputBuffer& input, bool slow_mode, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
941
958 NVTT_DEPRECATED_API void nvtt_encode_bc5s(const GPUInputBuffer& input, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
959
961
963
994 NVTT_DEPRECATED_API void nvtt_encode_bc7(const CPUInputBuffer& input, bool slow_mode, bool imageHasAlpha, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
995
1016 NVTT_DEPRECATED_API void nvtt_encode_bc7(const GPUInputBuffer& input, bool imageHasAlpha, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
1017
1019
1021
1047 NVTT_DEPRECATED_API void nvtt_encode_bc6h(const CPUInputBuffer& input, bool slow_mode, bool is_signed, void* output, bool useGpu = false, bool to_device_mem = false, nvtt::TimingContext *tc = nullptr);
1048
1067 NVTT_DEPRECATED_API void nvtt_encode_bc6h(const GPUInputBuffer& input, bool is_signed, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
1068
1070
1072
1098 NVTT_DEPRECATED_API void nvtt_encode_astc(const CPUInputBuffer& input, int qualityLevel, bool imageHasAlpha, void* output, bool useGpu = false, bool to_device_mem= false, nvtt::TimingContext *tc = nullptr);
1099
1122 NVTT_DEPRECATED_API void nvtt_encode_astc(const GPUInputBuffer& input, int qualityLevel, bool imageHasAlpha, void* output, bool to_device_mem = true, nvtt::TimingContext *tc = nullptr);
1123
1125}
1126
1127#endif // nvtt_lowlevel_h
Namespace for all public non-macro NVTT fields.
Definition nvtt.h:52
NVTT_DEPRECATED_API void nvtt_encode_bc3_rgbm(const CPUInputBuffer &input, void *output, nvtt::TimingContext *tc=nullptr)
ChannelOrder
Name of channels for defining a swizzling.
Definition nvtt_lowlevel.h:124
NVTT_API bool isCudaSupported()
Check if CUDA is supported by the run-time environment.
NVTT_DEPRECATED_API void nvtt_encode_bc2(const CPUInputBuffer &input, bool fast_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc4(const CPUInputBuffer &input, bool slow_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc5(const CPUInputBuffer &input, bool slow_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_API void useCurrentDevice()
Tells NVTT to always use an application-set device rather than selecting its own.
Quality
Quality modes.
Definition nvtt_lowlevel.h:329
NVTT_DEPRECATED_API void nvtt_encode_bc3n(const CPUInputBuffer &input, int qualityLevel, void *output, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc3(const CPUInputBuffer &input, bool fast_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
Format
Supported block-compression formats, including compressor variants.
Definition nvtt_lowlevel.h:218
@ Format_BC2
DX10 - BC2 (DXT3) format.
Definition nvtt_lowlevel.h:233
@ Format_RGBA
Linear RGBA format.
Definition nvtt_lowlevel.h:221
@ Format_BC3_RGBM
Definition nvtt_lowlevel.h:270
@ Format_ASTC_LDR_8x5
ASTC - LDR - format, tile size 8x5.
Definition nvtt_lowlevel.h:279
@ Format_ASTC_LDR_10x8
ASTC - LDR - format, tile size 10x8.
Definition nvtt_lowlevel.h:284
@ Format_BC6U
DX10 - BC6 format (three-channel HDR, unsigned)
Definition nvtt_lowlevel.h:245
@ Format_BC6S
DX10 - BC6 format (three-channel HDR, signed)
Definition nvtt_lowlevel.h:246
@ Format_ASTC_LDR_10x5
ASTC - LDR - format, tile size 10x5.
Definition nvtt_lowlevel.h:282
@ Format_ASTC_LDR_5x5
ASTC - LDR - format, tile size 5x5.
Definition nvtt_lowlevel.h:276
@ Format_BC7
DX10 - BC7 format (four channels, UNORM)
Definition nvtt_lowlevel.h:248
@ Format_ASTC_LDR_10x6
ASTC - LDR - format, tile size 10x6.
Definition nvtt_lowlevel.h:283
@ Format_BC5
DX10 - BC5U format (two channels, unsigned)
Definition nvtt_lowlevel.h:239
@ Format_ASTC_LDR_6x6
ASTC - LDR - format, tile size 6x6.
Definition nvtt_lowlevel.h:278
@ Format_BC1
DX10 - BC1 (DXT1) format.
Definition nvtt_lowlevel.h:231
@ Format_BC3n
DX10 - BC3 (DXT5) normal format for improved compression, storing a normal (x, y, z) as (1,...
Definition nvtt_lowlevel.h:235
@ Format_ASTC_LDR_12x10
ASTC - LDR - format, tile size 12x10.
Definition nvtt_lowlevel.h:286
@ Format_DXT1
DX9 - DXT1 format.
Definition nvtt_lowlevel.h:224
@ Format_DXT5
DX9 - DXT5 format.
Definition nvtt_lowlevel.h:227
@ Format_ASTC_LDR_5x4
ASTC - LDR - format, tile size 5x4.
Definition nvtt_lowlevel.h:275
@ Format_ATI2
DX10 - ATI2 format, similar to BC5U, channel order GR instead of RG.
Definition nvtt_lowlevel.h:238
@ Format_ASTC_LDR_8x6
ASTC - LDR - format, tile size 8x6.
Definition nvtt_lowlevel.h:280
@ Format_DXT1n
Not supported.
Definition nvtt_lowlevel.h:242
@ Format_ASTC_LDR_12x12
ASTC - LDR - format, tile size 12x12.
Definition nvtt_lowlevel.h:287
@ Format_DXT3
DX9 - DXT3 format.
Definition nvtt_lowlevel.h:226
@ Format_BC3
DX10 - BC3 (DXT5) format.
Definition nvtt_lowlevel.h:234
@ Format_ASTC_LDR_4x4
ASTC - LDR - format, tile size 4x4.
Definition nvtt_lowlevel.h:274
@ Format_DXT1a
DX9 - DXT1 with binary alpha.
Definition nvtt_lowlevel.h:225
@ Format_BC1a
DX10 - BC1 (DXT1) format.
Definition nvtt_lowlevel.h:232
@ Format_RGB
Linear RGB format.
Definition nvtt_lowlevel.h:220
@ Format_Unset
Definition nvtt_lowlevel.h:293
@ Format_BC4
DX10 - BC4U (ATI1) format (one channel, unsigned)
Definition nvtt_lowlevel.h:236
@ Format_BC5S
DX10 - BC5S format (two channels, signed)
Definition nvtt_lowlevel.h:240
@ Format_DXT5n
DX9 - DXT5 normal format. Stores a normal (x, y, z) as (R, G, B, A) = (1, y, 0, x).
Definition nvtt_lowlevel.h:228
@ Format_ASTC_LDR_6x5
ASTC - LDR - format, tile size 6x5.
Definition nvtt_lowlevel.h:277
@ Format_ASTC_LDR_8x8
ASTC - LDR - format, tile size 8x8.
Definition nvtt_lowlevel.h:281
@ Format_BC4S
DX10 - BC4S format (one channel, signed)
Definition nvtt_lowlevel.h:237
@ Format_ASTC_LDR_10x10
ASTC - LDR - format, tile size 10x10.
Definition nvtt_lowlevel.h:285
@ Format_CTX1
Not supported.
Definition nvtt_lowlevel.h:243
NVTT_DEPRECATED_API void nvtt_encode_astc(const CPUInputBuffer &input, int qualityLevel, bool imageHasAlpha, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc4s(const CPUInputBuffer &input, bool slow_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
EncodeFlags
Encode flags for EncodeSettings.
Definition nvtt_lowlevel.h:342
@ EncodeFlags_OutputToGPUMem
Definition nvtt_lowlevel.h:349
@ EncodeFlags_Opaque
Definition nvtt_lowlevel.h:353
@ EncodeFlags_UseGPU
Compress on the GPU if CUDA is available, instead of the CPU.
Definition nvtt_lowlevel.h:345
NVTT_DEPRECATED_API void nvtt_encode_bc7(const CPUInputBuffer &input, bool slow_mode, bool imageHasAlpha, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc1a(const CPUInputBuffer &input, bool fast_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_DEPRECATED_API void nvtt_encode_bc5s(const CPUInputBuffer &input, bool slow_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
PixelType
Pixel value types.
Definition nvtt_lowlevel.h:302
@ PixelType_UnsignedNorm
Used to indicate a DXGI_..._UNORM format.
Definition nvtt_lowlevel.h:303
@ PixelType_UnsignedInt
Not supported yet.
Definition nvtt_lowlevel.h:305
@ PixelType_Float
Used to indicate a DXGI_..._FLOAT format.
Definition nvtt_lowlevel.h:307
@ PixelType_SignedInt
Not supported yet.
Definition nvtt_lowlevel.h:306
@ PixelType_UnsignedFloat
Used to indicate a DXGI_..._UF16 format. Unused.
Definition nvtt_lowlevel.h:308
@ PixelType_SharedExp
Shared exponent. Only supported for DXGI_FORMAT_R9G9B9E5_SHAREDEXP.
Definition nvtt_lowlevel.h:309
@ PixelType_SignedNorm
Not supported yet.
Definition nvtt_lowlevel.h:304
NVTT_DEPRECATED_API void nvtt_encode_bc6h(const CPUInputBuffer &input, bool slow_mode, bool is_signed, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
ValueType
Definition nvtt_lowlevel.h:115
@ SINT8
8-bit signed integer. Can be casted to float by dividing by 127, with the exception that both -128 an...
Definition nvtt_lowlevel.h:117
@ UINT8
8-bit unsigned integer.
Definition nvtt_lowlevel.h:116
@ FLOAT16
IEEE 754 half-precision floating-point: 1 sign bit, 5 exponent bits, and 10 mantissa bits.
Definition nvtt_lowlevel.h:119
@ FLOAT32
IEEE 754 single-precision floating-point: 1 sign bit, 8 exponent bits, and 23 mantissa bits.
Definition nvtt_lowlevel.h:118
NVTT_DEPRECATED_API void nvtt_encode_ati2(const CPUInputBuffer &input, bool slow_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
NVTT_API bool nvtt_encode(const CPUInputBuffer &input, void *output, const EncodeSettings &settings)
NVTT_DEPRECATED_API void nvtt_encode_bc1(const CPUInputBuffer &input, bool fast_mode, void *output, bool useGpu=false, bool to_device_mem=false, nvtt::TimingContext *tc=nullptr)
#define NVTT_DEPRECATED_API
These functions are accessible via the NVTT DLL, but there are better replacements for them,...
Definition nvtt_lowlevel.h:60
#define NVTT_API
Functions with this macro are accessible via the NVTT DLL.
Definition nvtt_lowlevel.h:56
Structure containing all the input images from host memory. The image data is reordered by tiles.
Definition nvtt_lowlevel.h:148
NVTT_API void * GetTile(int i, int &vw, int &vh) const
Get a pointer to the i-th tile. Mainly used internally.
NVTT_API int NumTiles() const
The total number of tiles of the input buffer.
NVTT_API CPUInputBuffer(const RefImage *images, ValueType value_type, int numImages=1, int tile_w=4, int tile_h=4, float WeightR=1.0f, float WeightG=1.0f, float WeightB=1.0f, float WeightA=1.0f, nvtt::TimingContext *tc=nullptr, unsigned *num_tiles=nullptr)
Construct a CPUInputBuffer from 1 or more RefImage structs.
NVTT_API void TileSize(int &tile_w, int &tile_h) const
Tile Size.
NVTT_API ValueType Type() const
Value type. The same as the input images used for creating this object.
NVTT_API ~CPUInputBuffer()
Destructor.
Definition nvtt_lowlevel.h:388
Format format
The desired compression format.
Definition nvtt_lowlevel.h:395
TimingContext * timing_context
Definition nvtt_lowlevel.h:402
NVTT_API EncodeSettings & SetFormat(Format _format)
NVTT_API EncodeSettings & SetOutputToGPUMem(bool _to_device_mem)
Quality quality
The desired compression quality.
Definition nvtt_lowlevel.h:397
uint32_t sType
Definition nvtt_lowlevel.h:393
uint32_t encode_flags
Definition nvtt_lowlevel.h:406
NVTT_API EncodeSettings & SetIsOpaque(bool _is_opaque)
NVTT_API EncodeSettings & SetUseGPU(bool _use_gpu)
PixelType rgb_pixel_type
Definition nvtt_lowlevel.h:400
Structure containing all the input images from device memory. The image data is reordered by tiles.
Definition nvtt_lowlevel.h:179
NVTT_API GPUInputBuffer(const RefImage *images, ValueType value_type, int numImages=1, int tile_w=4, int tile_h=4, float WeightR=1.0f, float WeightG=1.0f, float WeightB=1.0f, float WeightA=1.0f, nvtt::TimingContext *tc=nullptr, unsigned *num_tiles=nullptr)
Construct a GPUInputBuffer from 1 or more RefImage structs.
NVTT_API void TileSize(int &tile_w, int &tile_h) const
Tile Size.
NVTT_API ~GPUInputBuffer()
Destructor.
NVTT_API int NumTiles() const
The total number of tiles of the input buffer.
NVTT_API ValueType Type() const
Value type. The same as the input images of the CPUInputBuffer used for creating this object.
NVTT_API GPUInputBuffer(const CPUInputBuffer &cpu_buf, int begin=0, int end=-1, nvtt::TimingContext *tc=nullptr)
Construct a GPUInputBuffer from a CPUInputBuffer.
Use this structure to reference each of the input images.
Definition nvtt_lowlevel.h:135
bool channel_interleave
Whether the rgba channels are interleaved (r0, g0, b0, a0, r1, g1, b1, a1, ...)
Definition nvtt_lowlevel.h:142
const void * data
For CPUInputBuffer, this should point to host memory; for GPUInputBuffer, this should point to device...
Definition nvtt_lowlevel.h:136
int num_channels
Number of channels the image has.
Definition nvtt_lowlevel.h:140
int width
Width of the image. This can be arbitrary, up to 65535.
Definition nvtt_lowlevel.h:137
int height
Height of the image. This can be arbitrary, up to 65535.
Definition nvtt_lowlevel.h:138
ChannelOrder channel_swizzle[4]
Channels order how the image is stored.
Definition nvtt_lowlevel.h:141
int depth
Z-dimension of the images, usually 1.
Definition nvtt_lowlevel.h:139
A TimingContext is a way to collect timing data from a number of functions, and report how much time ...
Definition nvtt.h:1722