1#[repr(C)]
4#[derive(Debug, Copy, Clone)]
5pub struct CUstream_st {
6 _unused: [u8; 0],
7}
8pub type cudaStream_t = *mut CUstream_st;
9pub mod nvtiffTag {
10 pub type Type = i32;
11 pub const NVTIFF_TAG_UNKNOWN: Type = -1;
12 pub const NVTIFF_TAG_MODEL_PIXEL_SCALE: Type = 33550;
13 pub const NVTIFF_TAG_MODEL_TIE_POINT: Type = 33922;
14 pub const NVTIFF_TAG_MODEL_TRANSFORMATION: Type = 34264;
15}
16pub use self::nvtiffTag::Type as nvtiffTag_t;
17pub mod nvtiffStatus_t {
18 pub type Type = u32;
19 pub const NVTIFF_STATUS_SUCCESS: Type = 0;
20 pub const NVTIFF_STATUS_NOT_INITIALIZED: Type = 1;
21 pub const NVTIFF_STATUS_INVALID_PARAMETER: Type = 2;
22 pub const NVTIFF_STATUS_BAD_TIFF: Type = 3;
23 pub const NVTIFF_STATUS_TIFF_NOT_SUPPORTED: Type = 4;
24 pub const NVTIFF_STATUS_ALLOCATOR_FAILURE: Type = 5;
25 pub const NVTIFF_STATUS_EXECUTION_FAILED: Type = 6;
26 pub const NVTIFF_STATUS_ARCH_MISMATCH: Type = 7;
27 pub const NVTIFF_STATUS_INTERNAL_ERROR: Type = 8;
28 pub const NVTIFF_STATUS_NVCOMP_NOT_FOUND: Type = 9;
29 pub const NVTIFF_STATUS_NVJPEG_NOT_FOUND: Type = 10;
30 pub const NVTIFF_STATUS_TAG_NOT_FOUND: Type = 11;
31 pub const NVTIFF_STATUS_PARAMETER_OUT_OF_BOUNDS: Type = 12;
32 pub const NVTIFF_STATUS_NVJPEG2K_NOT_FOUND: Type = 13;
33}
34#[repr(C)]
35#[derive(Debug, Copy, Clone)]
36pub struct nvtiffDecoder {
37 _unused: [u8; 0],
38}
39pub type nvtiffDecoder_t = *mut nvtiffDecoder;
40#[repr(C)]
41#[derive(Debug, Copy, Clone)]
42pub struct nvtiffStream {
43 _unused: [u8; 0],
44}
45pub type nvtiffStream_t = *mut nvtiffStream;
46pub mod nvtiffSampleFormat {
47 pub type Type = u32;
48 pub const NVTIFF_SAMPLEFORMAT_UNKNOWN: Type = 0;
49 pub const NVTIFF_SAMPLEFORMAT_UINT: Type = 1;
50 pub const NVTIFF_SAMPLEFORMAT_INT: Type = 2;
51 pub const NVTIFF_SAMPLEFORMAT_IEEEFP: Type = 3;
52 pub const NVTIFF_SAMPLEFORMAT_VOID: Type = 4;
53 pub const NVTIFF_SAMPLEFORMAT_COMPLEXINT: Type = 5;
54 pub const NVTIFF_SAMPLEFORMAT_COMPLEXIEEEFP: Type = 6;
55}
56pub use self::nvtiffSampleFormat::Type as nvtiffSampleFormat_t;
57pub mod nvtiffPhotometricInt {
58 pub type Type = i32;
59 pub const NVTIFF_PHOTOMETRIC_UNKNOWN: Type = -1;
60 pub const NVTIFF_PHOTOMETRIC_MINISWHITE: Type = 0;
61 pub const NVTIFF_PHOTOMETRIC_MINISBLACK: Type = 1;
62 pub const NVTIFF_PHOTOMETRIC_RGB: Type = 2;
63 pub const NVTIFF_PHOTOMETRIC_PALETTE: Type = 3;
64 pub const NVTIFF_PHOTOMETRIC_MASK: Type = 4;
65 pub const NVTIFF_PHOTOMETRIC_SEPARATED: Type = 5;
66 pub const NVTIFF_PHOTOMETRIC_YCBCR: Type = 6;
67}
68pub use self::nvtiffPhotometricInt::Type as nvtiffPhotometricInt_t;
69pub mod nvtiffPlanarConfig {
70 pub type Type = u32;
71 pub const NVTIFF_PLANARCONFIG_UNKNOWN: Type = 0;
72 pub const NVTIFF_PLANARCONFIG_CONTIG: Type = 1;
73 pub const NVTIFF_PLANARCONFIG_SEPARATE: Type = 2;
74}
75pub use self::nvtiffPlanarConfig::Type as nvtiffPlanarConfig_t;
76pub mod nvtiffCompression {
77 pub type Type = u32;
78 pub const NVTIFF_COMPRESSION_UNKNOWN: Type = 0;
79 pub const NVTIFF_COMPRESSION_NONE: Type = 1;
80 pub const NVTIFF_COMPRESSION_LZW: Type = 5;
81 pub const NVTIFF_COMPRESSION_JPEG: Type = 7;
82 pub const NVTIFF_COMPRESSION_ADOBE_DEFLATE: Type = 8;
83 pub const NVTIFF_COMPRESSION_DEFLATE: Type = 32946;
84 pub const NVTIFF_COMPRESSION_APERIO_JP2000_YCC: Type = 33003;
85 pub const NVTIFF_COMPRESSION_APERIO_JP2000_RGB: Type = 33005;
86 pub const NVTIFF_COMPRESSION_JP2000: Type = 34712;
87}
88pub use self::nvtiffCompression::Type as nvtiffCompression_t;
89pub mod nvtiffImageType {
90 pub type Type = u32;
91 pub const NVTIFF_IMAGETYPE_REDUCED_IMAGE: Type = 1;
92 pub const NVTIFF_IMAGETYPE_PAGE: Type = 2;
93 pub const NVTIFF_IMAGETYPE_MASK: Type = 4;
94 pub const NVTIFF_IMAGETYPE_ENUM_FORCE_UINT32: Type = 4294967295;
95}
96pub type nvtiffImageType_t = u32;
97#[repr(C)]
98#[derive(Debug, Copy, Clone, PartialEq)]
99pub struct nvtiffImageInfo {
100 pub image_type: nvtiffImageType_t,
101 pub image_width: u32,
102 pub image_height: u32,
103 pub compression: nvtiffCompression_t,
104 pub photometric_int: nvtiffPhotometricInt_t,
105 pub planar_config: nvtiffPlanarConfig_t,
106 pub samples_per_pixel: u16,
107 pub bits_per_pixel: u16,
108 pub bits_per_sample: [u16; 16usize],
109 pub sample_format: [nvtiffSampleFormat_t; 16usize],
110}
111#[allow(clippy::unnecessary_operation, clippy::identity_op)]
112const _: () = {
113 ["Size of nvtiffImageInfo"][::std::mem::size_of::<nvtiffImageInfo>() - 124usize];
114 ["Alignment of nvtiffImageInfo"][::std::mem::align_of::<nvtiffImageInfo>() - 4usize];
115 ["Offset of field: nvtiffImageInfo::image_type"]
116 [::std::mem::offset_of!(nvtiffImageInfo, image_type) - 0usize];
117 ["Offset of field: nvtiffImageInfo::image_width"]
118 [::std::mem::offset_of!(nvtiffImageInfo, image_width) - 4usize];
119 ["Offset of field: nvtiffImageInfo::image_height"]
120 [::std::mem::offset_of!(nvtiffImageInfo, image_height) - 8usize];
121 ["Offset of field: nvtiffImageInfo::compression"]
122 [::std::mem::offset_of!(nvtiffImageInfo, compression) - 12usize];
123 ["Offset of field: nvtiffImageInfo::photometric_int"]
124 [::std::mem::offset_of!(nvtiffImageInfo, photometric_int) - 16usize];
125 ["Offset of field: nvtiffImageInfo::planar_config"]
126 [::std::mem::offset_of!(nvtiffImageInfo, planar_config) - 20usize];
127 ["Offset of field: nvtiffImageInfo::samples_per_pixel"]
128 [::std::mem::offset_of!(nvtiffImageInfo, samples_per_pixel) - 24usize];
129 ["Offset of field: nvtiffImageInfo::bits_per_pixel"]
130 [::std::mem::offset_of!(nvtiffImageInfo, bits_per_pixel) - 26usize];
131 ["Offset of field: nvtiffImageInfo::bits_per_sample"]
132 [::std::mem::offset_of!(nvtiffImageInfo, bits_per_sample) - 28usize];
133 ["Offset of field: nvtiffImageInfo::sample_format"]
134 [::std::mem::offset_of!(nvtiffImageInfo, sample_format) - 60usize];
135};
136impl Default for nvtiffImageInfo {
137 fn default() -> Self {
138 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
139 unsafe {
140 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
141 s.assume_init()
142 }
143 }
144}
145pub type nvtiffImageInfo_t = nvtiffImageInfo;
146#[repr(C)]
147#[derive(Debug, Copy, Clone)]
148pub struct nvtiffDecodeParams {
149 _unused: [u8; 0],
150}
151pub type nvtiffDecodeParams_t = *mut nvtiffDecodeParams;
152unsafe extern "C" {
153 pub fn nvtiffStreamCreate(tiff_stream: *mut nvtiffStream_t) -> nvtiffStatus_t::Type;
154}
155unsafe extern "C" {
156 pub fn nvtiffDecoderCreateSimple(
157 decoder: *mut nvtiffDecoder_t,
158 cuda_stream: cudaStream_t,
159 ) -> nvtiffStatus_t::Type;
160}
161unsafe extern "C" {
162 pub fn nvtiffStreamParseFromFile(
163 fname: *const ::std::os::raw::c_char,
164 tiff_stream: nvtiffStream_t,
165 ) -> nvtiffStatus_t::Type;
166}
167unsafe extern "C" {
168 pub fn nvtiffStreamParse(
169 buffer: *const u8,
170 buffer_size: usize,
171 tiff_stream: nvtiffStream_t,
172 ) -> nvtiffStatus_t::Type;
173}
174unsafe extern "C" {
175 pub fn nvtiffStreamGetNumImages(
176 tiff_stream: nvtiffStream_t,
177 num_images: *mut u32,
178 ) -> nvtiffStatus_t::Type;
179}
180unsafe extern "C" {
181 pub fn nvtiffStreamGetImageInfo(
182 tiff_stream: nvtiffStream_t,
183 image_id: u32,
184 image_info: *mut nvtiffImageInfo_t,
185 ) -> nvtiffStatus_t::Type;
186}
187unsafe extern "C" {
188 pub fn nvtiffStreamGetTagValue(
189 tiff_stream: nvtiffStream_t,
190 image_id: u32,
191 tiff_tag: nvtiffTag_t,
192 tag_value: *mut ::std::os::raw::c_void,
193 count: u32,
194 ) -> nvtiffStatus_t::Type;
195}
196unsafe extern "C" {
197 pub fn nvtiffDecodeImage(
198 tiff_stream: nvtiffStream_t,
199 decoder: nvtiffDecoder_t,
200 params: nvtiffDecodeParams_t,
201 image_id: u32,
202 image_out_d: *mut ::std::os::raw::c_void,
203 cuda_stream: cudaStream_t,
204 ) -> nvtiffStatus_t::Type;
205}
206unsafe extern "C" {
207 pub fn nvtiffDecodeCheckSupported(
208 tiff_stream: nvtiffStream_t,
209 decoder: nvtiffDecoder_t,
210 params: nvtiffDecodeParams_t,
211 image_id: u32,
212 ) -> nvtiffStatus_t::Type;
213}