1pub const __bool_true_false_are_defined: u32 = 1;
4pub const true_: u32 = 1;
5pub const false_: u32 = 0;
6pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1;
7pub const _SAL_VERSION: u32 = 20;
8pub const __SAL_H_VERSION: u32 = 180000000;
9pub const _USE_DECLSPECS_FOR_SAL: u32 = 0;
10pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0;
11pub const _CRT_PACKING: u32 = 8;
12pub const _HAS_EXCEPTIONS: u32 = 1;
13pub const _STL_LANG: u32 = 0;
14pub const _HAS_CXX17: u32 = 0;
15pub const _HAS_CXX20: u32 = 0;
16pub const _HAS_CXX23: u32 = 0;
17pub const _HAS_CXX26: u32 = 0;
18pub const _HAS_NODISCARD: u32 = 0;
19pub const WCHAR_MIN: u32 = 0;
20pub const WCHAR_MAX: u32 = 65535;
21pub const WINT_MIN: u32 = 0;
22pub const WINT_MAX: u32 = 65535;
23pub const GPUJPEG_MAX_COMPONENT_COUNT: u32 = 4;
24pub const GPUJPEG_INIT_DEV_VERBOSE: u32 = 1;
25pub const GPUJPEG_OPENGL_INTEROPERABILITY: u32 = 2;
26pub const GPUJPEG_VERBOSE: u32 = 1;
27pub const GPUJPEG_MAX_SEGMENT_INFO_HEADER_COUNT: u32 = 100;
28pub const GPUJPEG_NOERR: u32 = 0;
29pub const GPUJPEG_ERROR: i32 = -1;
30pub const GPUJPEG_ERR_RESTART_CHANGE: i32 = -2;
31pub const GPUJPEG_VAL_TRUE: &[u8; 2] = b"1\0";
32pub const GPUJPEG_VAL_FALSE: &[u8; 2] = b"0\0";
33pub const GPUJPEG_MAX_DEVICE_COUNT: u32 = 10;
34pub const GPUJPEG_SUBSAMPLING_UNKNOWN: u32 = 0;
35pub const GPUJPEG_ENCODER_OPT_OUT_PINNED: &[u8; 15] = b"enc_out_pinned\0";
36pub const GPUJPEG_ENC_OPT_OUT: &[u8; 12] = b"enc_opt_out\0";
37pub const GPUJPEG_ENC_OUT_VAL_PAGEABLE: &[u8; 21] = b"enc_out_val_pageable\0";
38pub const GPUJPEG_ENC_OUT_VAL_PINNED: &[u8; 19] = b"enc_out_val_pinned\0";
39pub const GPUJPEG_DEC_OPT_TGA_RLE_BOOL: &[u8; 16] = b"dec_opt_tga_rle\0";
40pub type wchar_t = ::std::os::raw::c_ushort;
41pub type max_align_t = f64;
42pub type va_list = *mut ::std::os::raw::c_char;
43unsafe extern "C" {
44 pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
45}
46pub type __vcrt_bool = bool;
47unsafe extern "C" {
48 pub fn __security_init_cookie();
49}
50unsafe extern "C" {
51 pub fn __security_check_cookie(_StackCookie: usize);
52}
53unsafe extern "C" {
54 pub fn __report_gsfailure(_StackCookie: usize) -> !;
55}
56unsafe extern "C" {
57 pub static mut __security_cookie: usize;
58}
59pub type int_least8_t = ::std::os::raw::c_schar;
60pub type int_least16_t = ::std::os::raw::c_short;
61pub type int_least32_t = ::std::os::raw::c_int;
62pub type int_least64_t = ::std::os::raw::c_longlong;
63pub type uint_least8_t = ::std::os::raw::c_uchar;
64pub type uint_least16_t = ::std::os::raw::c_ushort;
65pub type uint_least32_t = ::std::os::raw::c_uint;
66pub type uint_least64_t = ::std::os::raw::c_ulonglong;
67pub type int_fast8_t = ::std::os::raw::c_schar;
68pub type int_fast16_t = ::std::os::raw::c_int;
69pub type int_fast32_t = ::std::os::raw::c_int;
70pub type int_fast64_t = ::std::os::raw::c_longlong;
71pub type uint_fast8_t = ::std::os::raw::c_uchar;
72pub type uint_fast16_t = ::std::os::raw::c_uint;
73pub type uint_fast32_t = ::std::os::raw::c_uint;
74pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
75pub type intmax_t = ::std::os::raw::c_longlong;
76pub type uintmax_t = ::std::os::raw::c_ulonglong;
77pub const gpujpeg_color_space_GPUJPEG_NONE: gpujpeg_color_space = 0;
78pub const gpujpeg_color_space_GPUJPEG_RGB: gpujpeg_color_space = 1;
79
80pub const gpujpeg_color_space_GPUJPEG_YCBCR_BT601: gpujpeg_color_space = 2;
82
83pub const gpujpeg_color_space_GPUJPEG_YCBCR_BT601_256LVLS: gpujpeg_color_space = 3;
85pub const gpujpeg_color_space_GPUJPEG_YCBCR_JPEG: gpujpeg_color_space = 3;
87pub const gpujpeg_color_space_GPUJPEG_YCBCR_BT709: gpujpeg_color_space = 4;
90pub const gpujpeg_color_space_GPUJPEG_YCBCR: gpujpeg_color_space = 4;
93pub const gpujpeg_color_space_GPUJPEG_YUV: gpujpeg_color_space = 5;
96pub type gpujpeg_color_space = ::std::os::raw::c_int;
98pub const gpujpeg_pixel_format_GPUJPEG_PIXFMT_NONE: gpujpeg_pixel_format = -1;
99pub const gpujpeg_pixel_format_GPUJPEG_U8: gpujpeg_pixel_format = 0;
101pub const gpujpeg_pixel_format_GPUJPEG_444_U8_P012: gpujpeg_pixel_format = 1;
104pub const gpujpeg_pixel_format_GPUJPEG_444_U8_P0P1P2: gpujpeg_pixel_format = 2;
106pub const gpujpeg_pixel_format_GPUJPEG_422_U8_P1020: gpujpeg_pixel_format = 3;
109pub const gpujpeg_pixel_format_GPUJPEG_422_U8_P0P1P2: gpujpeg_pixel_format = 4;
111pub const gpujpeg_pixel_format_GPUJPEG_420_U8_P0P1P2: gpujpeg_pixel_format = 5;
113pub const gpujpeg_pixel_format_GPUJPEG_4444_U8_P0123: gpujpeg_pixel_format = 6;
116pub type gpujpeg_pixel_format = ::std::os::raw::c_int;
118#[repr(C)]
120#[derive(Debug, Copy, Clone)]
121pub struct gpujpeg_component_sampling_factor {
122 pub horizontal: u8,
123 pub vertical: u8,
124}
125#[allow(clippy::unnecessary_operation, clippy::identity_op)]
126const _: () = {
127 ["Size of gpujpeg_component_sampling_factor"]
128 [::std::mem::size_of::<gpujpeg_component_sampling_factor>() - 2usize];
129 ["Alignment of gpujpeg_component_sampling_factor"]
130 [::std::mem::align_of::<gpujpeg_component_sampling_factor>() - 1usize];
131 ["Offset of field: gpujpeg_component_sampling_factor::horizontal"]
132 [::std::mem::offset_of!(gpujpeg_component_sampling_factor, horizontal) - 0usize];
133 ["Offset of field: gpujpeg_component_sampling_factor::vertical"]
134 [::std::mem::offset_of!(gpujpeg_component_sampling_factor, vertical) - 1usize];
135};
136#[repr(C)]
137#[derive(Debug, Copy, Clone)]
138pub struct CUstream_st {
139 _unused: [u8; 0],
140}
141pub type cudaStream_t = *mut CUstream_st;
142unsafe extern "C" {
143 pub fn gpujpeg_version() -> ::std::os::raw::c_int;
146}
147
148unsafe extern "C" {
149 pub fn gpujpeg_version_to_string(
152 version: ::std::os::raw::c_int,
153 ) -> *const ::std::os::raw::c_char;
154}
155unsafe extern "C" {
156 pub fn gpujpeg_get_time() -> f64;
159}
160#[repr(C)]
162#[derive(Debug, Copy, Clone)]
163pub struct gpujpeg_device_info {
164 pub id: ::std::os::raw::c_int,
166 pub name: [::std::os::raw::c_char; 256usize],
168 pub cc_major: ::std::os::raw::c_int,
170 pub cc_minor: ::std::os::raw::c_int,
172 pub global_memory: usize,
174 pub constant_memory: usize,
176 pub shared_memory: usize,
178 pub register_count: ::std::os::raw::c_int,
180 pub multiprocessor_count: ::std::os::raw::c_int,
182}
183#[allow(clippy::unnecessary_operation, clippy::identity_op)]
184const _: () = {
185 ["Size of gpujpeg_device_info"][::std::mem::size_of::<gpujpeg_device_info>() - 304usize];
186 ["Alignment of gpujpeg_device_info"][::std::mem::align_of::<gpujpeg_device_info>() - 8usize];
187 ["Offset of field: gpujpeg_device_info::id"]
188 [::std::mem::offset_of!(gpujpeg_device_info, id) - 0usize];
189 ["Offset of field: gpujpeg_device_info::name"]
190 [::std::mem::offset_of!(gpujpeg_device_info, name) - 4usize];
191 ["Offset of field: gpujpeg_device_info::cc_major"]
192 [::std::mem::offset_of!(gpujpeg_device_info, cc_major) - 260usize];
193 ["Offset of field: gpujpeg_device_info::cc_minor"]
194 [::std::mem::offset_of!(gpujpeg_device_info, cc_minor) - 264usize];
195 ["Offset of field: gpujpeg_device_info::global_memory"]
196 [::std::mem::offset_of!(gpujpeg_device_info, global_memory) - 272usize];
197 ["Offset of field: gpujpeg_device_info::constant_memory"]
198 [::std::mem::offset_of!(gpujpeg_device_info, constant_memory) - 280usize];
199 ["Offset of field: gpujpeg_device_info::shared_memory"]
200 [::std::mem::offset_of!(gpujpeg_device_info, shared_memory) - 288usize];
201 ["Offset of field: gpujpeg_device_info::register_count"]
202 [::std::mem::offset_of!(gpujpeg_device_info, register_count) - 296usize];
203 ["Offset of field: gpujpeg_device_info::multiprocessor_count"]
204 [::std::mem::offset_of!(gpujpeg_device_info, multiprocessor_count) - 300usize];
205};
206#[repr(C)]
208#[derive(Debug, Copy, Clone)]
209pub struct gpujpeg_devices_info {
210 pub device_count: ::std::os::raw::c_int,
212 pub device: [gpujpeg_device_info; 10usize],
214}
215#[allow(clippy::unnecessary_operation, clippy::identity_op)]
216const _: () = {
217 ["Size of gpujpeg_devices_info"][::std::mem::size_of::<gpujpeg_devices_info>() - 3048usize];
218 ["Alignment of gpujpeg_devices_info"][::std::mem::align_of::<gpujpeg_devices_info>() - 8usize];
219 ["Offset of field: gpujpeg_devices_info::device_count"]
220 [::std::mem::offset_of!(gpujpeg_devices_info, device_count) - 0usize];
221 ["Offset of field: gpujpeg_devices_info::device"]
222 [::std::mem::offset_of!(gpujpeg_devices_info, device) - 8usize];
223};
224unsafe extern "C" {
225 pub fn gpujpeg_get_devices_info() -> gpujpeg_devices_info;
230}
231unsafe extern "C" {
232 pub fn gpujpeg_print_devices_info() -> ::std::os::raw::c_int;
239}
240unsafe extern "C" {
241 pub fn gpujpeg_init_device(
249 device_id: ::std::os::raw::c_int,
250 flags: ::std::os::raw::c_int,
251 ) -> ::std::os::raw::c_int;
252}
253pub const restart_int_RESTART_AUTO: restart_int = -1;
255pub const restart_int_RESTART_NONE: restart_int = 0;
257pub type restart_int = ::std::os::raw::c_int;
258pub const verbosity_GPUJPEG_LL_QUIET: verbosity = -1;
260pub const verbosity_GPUJPEG_LL_INFO: verbosity = 0;
262pub const verbosity_GPUJPEG_LL_STATUS: verbosity = 1;
264pub const verbosity_GPUJPEG_LL_VERBOSE: verbosity = 2;
266pub const verbosity_GPUJPEG_LL_DEBUG: verbosity = 3;
268pub const verbosity_GPUJPEG_LL_DEBUG2: verbosity = 4;
270pub type verbosity = ::std::os::raw::c_int;
271#[repr(C)]
275#[derive(Debug, Copy, Clone)]
276pub struct gpujpeg_parameters {
277 pub verbose: ::std::os::raw::c_int,
280 pub perf_stats: ::std::os::raw::c_int,
281 pub quality: ::std::os::raw::c_int,
283 pub restart_interval: ::std::os::raw::c_int,
286 pub interleaved: ::std::os::raw::c_int,
290 pub segment_info: ::std::os::raw::c_int,
296 pub comp_count: ::std::os::raw::c_int,
299 pub sampling_factor: [gpujpeg_component_sampling_factor; 4usize],
301 pub color_space_internal: gpujpeg_color_space,
308}
309#[allow(clippy::unnecessary_operation, clippy::identity_op)]
310const _: () = {
311 ["Size of gpujpeg_parameters"][::std::mem::size_of::<gpujpeg_parameters>() - 40usize];
312 ["Alignment of gpujpeg_parameters"][::std::mem::align_of::<gpujpeg_parameters>() - 4usize];
313 ["Offset of field: gpujpeg_parameters::verbose"]
314 [::std::mem::offset_of!(gpujpeg_parameters, verbose) - 0usize];
315 ["Offset of field: gpujpeg_parameters::perf_stats"]
316 [::std::mem::offset_of!(gpujpeg_parameters, perf_stats) - 4usize];
317 ["Offset of field: gpujpeg_parameters::quality"]
318 [::std::mem::offset_of!(gpujpeg_parameters, quality) - 8usize];
319 ["Offset of field: gpujpeg_parameters::restart_interval"]
320 [::std::mem::offset_of!(gpujpeg_parameters, restart_interval) - 12usize];
321 ["Offset of field: gpujpeg_parameters::interleaved"]
322 [::std::mem::offset_of!(gpujpeg_parameters, interleaved) - 16usize];
323 ["Offset of field: gpujpeg_parameters::segment_info"]
324 [::std::mem::offset_of!(gpujpeg_parameters, segment_info) - 20usize];
325 ["Offset of field: gpujpeg_parameters::comp_count"]
326 [::std::mem::offset_of!(gpujpeg_parameters, comp_count) - 24usize];
327 ["Offset of field: gpujpeg_parameters::sampling_factor"]
328 [::std::mem::offset_of!(gpujpeg_parameters, sampling_factor) - 28usize];
329 ["Offset of field: gpujpeg_parameters::color_space_internal"]
330 [::std::mem::offset_of!(gpujpeg_parameters, color_space_internal) - 36usize];
331};
332unsafe extern "C" {
333 pub fn gpujpeg_set_default_parameters(param: *mut gpujpeg_parameters);
340}
341unsafe extern "C" {
342 pub fn gpujpeg_default_parameters() -> gpujpeg_parameters;
345}
346pub type gpujpeg_sampling_factor_t = u32;
348unsafe extern "C" {
349 pub fn gpujpeg_parameters_chroma_subsampling(
353 param: *mut gpujpeg_parameters,
354 subsampling: gpujpeg_sampling_factor_t,
355 );
356}
357unsafe extern "C" {
358 pub fn gpujpeg_subsampling_get_name(
361 comp_count: ::std::os::raw::c_int,
362 sampling_factor: *const gpujpeg_component_sampling_factor,
363 ) -> *const ::std::os::raw::c_char;
364}
365unsafe extern "C" {
366 pub fn gpujpeg_subsampling_from_name(
370 subsampling: *const ::std::os::raw::c_char,
371 ) -> gpujpeg_sampling_factor_t;
372}
373#[repr(C)]
377#[derive(Debug, Copy, Clone)]
378pub struct gpujpeg_image_parameters {
379 pub width: ::std::os::raw::c_int,
381 pub height: ::std::os::raw::c_int,
383 pub color_space: gpujpeg_color_space,
385 pub pixel_format: gpujpeg_pixel_format,
387 pub width_padding: ::std::os::raw::c_int,
389}
390#[allow(clippy::unnecessary_operation, clippy::identity_op)]
391const _: () = {
392 ["Size of gpujpeg_image_parameters"]
393 [::std::mem::size_of::<gpujpeg_image_parameters>() - 20usize];
394 ["Alignment of gpujpeg_image_parameters"]
395 [::std::mem::align_of::<gpujpeg_image_parameters>() - 4usize];
396 ["Offset of field: gpujpeg_image_parameters::width"]
397 [::std::mem::offset_of!(gpujpeg_image_parameters, width) - 0usize];
398 ["Offset of field: gpujpeg_image_parameters::height"]
399 [::std::mem::offset_of!(gpujpeg_image_parameters, height) - 4usize];
400 ["Offset of field: gpujpeg_image_parameters::color_space"]
401 [::std::mem::offset_of!(gpujpeg_image_parameters, color_space) - 8usize];
402 ["Offset of field: gpujpeg_image_parameters::pixel_format"]
403 [::std::mem::offset_of!(gpujpeg_image_parameters, pixel_format) - 12usize];
404 ["Offset of field: gpujpeg_image_parameters::width_padding"]
405 [::std::mem::offset_of!(gpujpeg_image_parameters, width_padding) - 16usize];
406};
407unsafe extern "C" {
408 pub fn gpujpeg_image_set_default_parameters(param: *mut gpujpeg_image_parameters);
414}
415unsafe extern "C" {
416 pub fn gpujpeg_default_image_parameters() -> gpujpeg_image_parameters;
419}
420pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_UNKNOWN: gpujpeg_image_file_format = 0;
422pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_JPEG: gpujpeg_image_file_format = 1;
424pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_RAW: gpujpeg_image_file_format = 2;
427pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_GRAY: gpujpeg_image_file_format = 3;
429pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_RGB: gpujpeg_image_file_format = 4;
431pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_RGBA: gpujpeg_image_file_format = 5;
433pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_BMP: gpujpeg_image_file_format = 6;
435pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_GIF: gpujpeg_image_file_format = 7;
437pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_PNG: gpujpeg_image_file_format = 8;
439pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_TGA: gpujpeg_image_file_format = 9;
441pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_PGM: gpujpeg_image_file_format = 10;
443pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_PPM: gpujpeg_image_file_format = 11;
445pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_PNM: gpujpeg_image_file_format = 12;
447pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_PAM: gpujpeg_image_file_format = 13;
449pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_Y4M: gpujpeg_image_file_format = 14;
451pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_YUV: gpujpeg_image_file_format = 15;
454pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_YUVA: gpujpeg_image_file_format = 16;
456pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_UYVY: gpujpeg_image_file_format = 17;
458pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_I420: gpujpeg_image_file_format = 18;
460pub const gpujpeg_image_file_format_GPUJPEG_IMAGE_FILE_TST: gpujpeg_image_file_format = 19;
462pub type gpujpeg_image_file_format = ::std::os::raw::c_int;
466#[repr(C)]
473#[derive(Debug, Copy, Clone)]
474pub struct gpujpeg_duration_stats {
475 pub duration_memory_to: f64,
476 pub duration_memory_from: f64,
477 pub duration_memory_map: f64,
478 pub duration_memory_unmap: f64,
479 pub duration_preprocessor: f64,
480 pub duration_dct_quantization: f64,
481 pub duration_huffman_coder: f64,
482 pub duration_stream: f64,
483 pub duration_in_gpu: f64,
484}
485#[allow(clippy::unnecessary_operation, clippy::identity_op)]
486const _: () = {
487 ["Size of gpujpeg_duration_stats"][::std::mem::size_of::<gpujpeg_duration_stats>() - 72usize];
488 ["Alignment of gpujpeg_duration_stats"]
489 [::std::mem::align_of::<gpujpeg_duration_stats>() - 8usize];
490 ["Offset of field: gpujpeg_duration_stats::duration_memory_to"]
491 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_memory_to) - 0usize];
492 ["Offset of field: gpujpeg_duration_stats::duration_memory_from"]
493 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_memory_from) - 8usize];
494 ["Offset of field: gpujpeg_duration_stats::duration_memory_map"]
495 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_memory_map) - 16usize];
496 ["Offset of field: gpujpeg_duration_stats::duration_memory_unmap"]
497 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_memory_unmap) - 24usize];
498 ["Offset of field: gpujpeg_duration_stats::duration_preprocessor"]
499 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_preprocessor) - 32usize];
500 ["Offset of field: gpujpeg_duration_stats::duration_dct_quantization"]
501 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_dct_quantization) - 40usize];
502 ["Offset of field: gpujpeg_duration_stats::duration_huffman_coder"]
503 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_huffman_coder) - 48usize];
504 ["Offset of field: gpujpeg_duration_stats::duration_stream"]
505 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_stream) - 56usize];
506 ["Offset of field: gpujpeg_duration_stats::duration_in_gpu"]
507 [::std::mem::offset_of!(gpujpeg_duration_stats, duration_in_gpu) - 64usize];
508};
509unsafe extern "C" {
510 pub fn gpujpeg_image_get_file_format(
516 filename: *const ::std::os::raw::c_char,
517 ) -> gpujpeg_image_file_format;
518}
519unsafe extern "C" {
520 pub fn gpujpeg_set_device(index: ::std::os::raw::c_int);
524}
525unsafe extern "C" {
526 pub fn gpujpeg_image_calculate_size(param: *mut gpujpeg_image_parameters) -> usize;
532}
533unsafe extern "C" {
534 pub fn gpujpeg_image_load_from_file(
544 filename: *const ::std::os::raw::c_char,
545 image: *mut *mut u8,
546 image_size: *mut usize,
547 ) -> ::std::os::raw::c_int;
548}
549unsafe extern "C" {
550 pub fn gpujpeg_image_save_to_file(
567 filename: *const ::std::os::raw::c_char,
568 image: *const u8,
569 image_size: usize,
570 param_image: *const gpujpeg_image_parameters,
571 ) -> ::std::os::raw::c_int;
572}
573unsafe extern "C" {
574 pub fn gpujpeg_image_get_properties(
582 filename: *const ::std::os::raw::c_char,
583 param_image: *mut gpujpeg_image_parameters,
584 file_exists: ::std::os::raw::c_int,
585 ) -> ::std::os::raw::c_int;
586}
587unsafe extern "C" {
588 pub fn gpujpeg_image_destroy(image: *mut u8) -> ::std::os::raw::c_int;
594}
595unsafe extern "C" {
596 pub fn gpujpeg_image_range_info(
603 filename: *const ::std::os::raw::c_char,
604 width: ::std::os::raw::c_int,
605 height: ::std::os::raw::c_int,
606 sampling_factor: gpujpeg_pixel_format,
607 );
608}
609unsafe extern "C" {
610 pub fn gpujpeg_image_convert(
622 input: *const ::std::os::raw::c_char,
623 output: *const ::std::os::raw::c_char,
624 param_image_from: gpujpeg_image_parameters,
625 param_image_to: gpujpeg_image_parameters,
626 ) -> ::std::os::raw::c_int;
627}
628#[repr(C)]
629#[derive(Debug, Copy, Clone)]
630pub struct gpujpeg_opengl_context {
631 _unused: [u8; 0],
632}
633unsafe extern "C" {
634 pub fn gpujpeg_opengl_init(ctx: *mut *mut gpujpeg_opengl_context) -> ::std::os::raw::c_int;
650}
651unsafe extern "C" {
652 pub fn gpujpeg_opengl_destroy(arg1: *mut gpujpeg_opengl_context);
657}
658unsafe extern "C" {
659 pub fn gpujpeg_opengl_texture_create(
667 width: ::std::os::raw::c_int,
668 height: ::std::os::raw::c_int,
669 data: *mut u8,
670 ) -> ::std::os::raw::c_int;
671}
672unsafe extern "C" {
673 pub fn gpujpeg_opengl_texture_set_data(
680 texture_id: ::std::os::raw::c_int,
681 data: *mut u8,
682 ) -> ::std::os::raw::c_int;
683}
684unsafe extern "C" {
685 pub fn gpujpeg_opengl_texture_get_data(
693 texture_id: ::std::os::raw::c_int,
694 data: *mut u8,
695 data_size: *mut usize,
696 ) -> ::std::os::raw::c_int;
697}
698unsafe extern "C" {
699 pub fn gpujpeg_opengl_texture_destroy(texture_id: ::std::os::raw::c_int);
703}
704pub const gpujpeg_opengl_texture_type_GPUJPEG_OPENGL_TEXTURE_READ: gpujpeg_opengl_texture_type = 1;
705pub const gpujpeg_opengl_texture_type_GPUJPEG_OPENGL_TEXTURE_WRITE: gpujpeg_opengl_texture_type = 2;
706pub type gpujpeg_opengl_texture_type = ::std::os::raw::c_int;
708#[repr(C)]
711#[derive(Debug, Copy, Clone)]
712pub struct gpujpeg_opengl_texture {
713 pub texture_id: ::std::os::raw::c_int,
715 pub texture_type: gpujpeg_opengl_texture_type,
717 pub texture_width: ::std::os::raw::c_int,
719 pub texture_height: ::std::os::raw::c_int,
721 pub texture_pbo_type: ::std::os::raw::c_int,
723 pub texture_pbo_id: ::std::os::raw::c_int,
725 pub texture_pbo_resource: *mut cudaGraphicsResource,
727 pub texture_callback_param: *mut ::std::os::raw::c_void,
729 pub texture_callback_attach_opengl:
731 ::std::option::Option<unsafe extern "C" fn(param: *mut ::std::os::raw::c_void)>,
732 pub texture_callback_detach_opengl:
734 ::std::option::Option<unsafe extern "C" fn(param: *mut ::std::os::raw::c_void)>,
735}
736#[allow(clippy::unnecessary_operation, clippy::identity_op)]
737const _: () = {
738 ["Size of gpujpeg_opengl_texture"][::std::mem::size_of::<gpujpeg_opengl_texture>() - 56usize];
739 ["Alignment of gpujpeg_opengl_texture"]
740 [::std::mem::align_of::<gpujpeg_opengl_texture>() - 8usize];
741 ["Offset of field: gpujpeg_opengl_texture::texture_id"]
742 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_id) - 0usize];
743 ["Offset of field: gpujpeg_opengl_texture::texture_type"]
744 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_type) - 4usize];
745 ["Offset of field: gpujpeg_opengl_texture::texture_width"]
746 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_width) - 8usize];
747 ["Offset of field: gpujpeg_opengl_texture::texture_height"]
748 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_height) - 12usize];
749 ["Offset of field: gpujpeg_opengl_texture::texture_pbo_type"]
750 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_pbo_type) - 16usize];
751 ["Offset of field: gpujpeg_opengl_texture::texture_pbo_id"]
752 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_pbo_id) - 20usize];
753 ["Offset of field: gpujpeg_opengl_texture::texture_pbo_resource"]
754 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_pbo_resource) - 24usize];
755 ["Offset of field: gpujpeg_opengl_texture::texture_callback_param"]
756 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_callback_param) - 32usize];
757 ["Offset of field: gpujpeg_opengl_texture::texture_callback_attach_opengl"]
758 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_callback_attach_opengl) - 40usize];
759 ["Offset of field: gpujpeg_opengl_texture::texture_callback_detach_opengl"]
760 [::std::mem::offset_of!(gpujpeg_opengl_texture, texture_callback_detach_opengl) - 48usize];
761};
762unsafe extern "C" {
763 pub fn gpujpeg_opengl_texture_register(
769 texture_id: ::std::os::raw::c_int,
770 texture_type: gpujpeg_opengl_texture_type,
771 ) -> *mut gpujpeg_opengl_texture;
772}
773unsafe extern "C" {
774 pub fn gpujpeg_opengl_texture_unregister(texture: *mut gpujpeg_opengl_texture);
779}
780unsafe extern "C" {
781 pub fn gpujpeg_opengl_texture_map(
789 texture: *mut gpujpeg_opengl_texture,
790 data_size: *mut usize,
791 ) -> *mut u8;
792}
793unsafe extern "C" {
794 pub fn gpujpeg_opengl_texture_unmap(texture: *mut gpujpeg_opengl_texture);
801}
802unsafe extern "C" {
803 pub fn gpujpeg_color_space_get_name(
807 color_space: gpujpeg_color_space,
808 ) -> *const ::std::os::raw::c_char;
809}
810unsafe extern "C" {
811 pub fn gpujpeg_pixel_format_by_name(
813 name: *const ::std::os::raw::c_char,
814 ) -> gpujpeg_pixel_format;
815}
816unsafe extern "C" {
817 pub fn gpujpeg_print_pixel_formats();
818}
819unsafe extern "C" {
820 pub fn gpujpeg_color_space_by_name(name: *const ::std::os::raw::c_char) -> gpujpeg_color_space;
822}
823unsafe extern "C" {
824 pub fn gpujpeg_pixel_format_get_comp_count(
826 pixel_format: gpujpeg_pixel_format,
827 ) -> ::std::os::raw::c_int;
828}
829unsafe extern "C" {
830 pub fn gpujpeg_pixel_format_get_name(
832 pixel_format: gpujpeg_pixel_format,
833 ) -> *const ::std::os::raw::c_char;
834}
835unsafe extern "C" {
836 pub fn gpujpeg_pixel_format_is_planar(
838 pixel_format: gpujpeg_pixel_format,
839 ) -> ::std::os::raw::c_int;
840}
841unsafe extern "C" {
842 pub fn gpujpeg_device_reset();
843}
844#[repr(C)]
845#[derive(Debug, Copy, Clone)]
846pub struct gpujpeg_encoder {
847 _unused: [u8; 0],
848}
849pub const gpujpeg_encoder_input_type_GPUJPEG_ENCODER_INPUT_IMAGE: gpujpeg_encoder_input_type = 0;
851pub const gpujpeg_encoder_input_type_GPUJPEG_ENCODER_INPUT_OPENGL_TEXTURE:
853 gpujpeg_encoder_input_type = 1;
854pub const gpujpeg_encoder_input_type_GPUJPEG_ENCODER_INPUT_GPU_IMAGE: gpujpeg_encoder_input_type =
856 2;
857pub type gpujpeg_encoder_input_type = ::std::os::raw::c_int;
859#[repr(C)]
861#[derive(Debug, Copy, Clone)]
862pub struct gpujpeg_encoder_input {
863 pub type_: gpujpeg_encoder_input_type,
865 pub image: *mut u8,
867 pub texture: *mut gpujpeg_opengl_texture,
869}
870#[allow(clippy::unnecessary_operation, clippy::identity_op)]
871const _: () = {
872 ["Size of gpujpeg_encoder_input"][::std::mem::size_of::<gpujpeg_encoder_input>() - 24usize];
873 ["Alignment of gpujpeg_encoder_input"]
874 [::std::mem::align_of::<gpujpeg_encoder_input>() - 8usize];
875 ["Offset of field: gpujpeg_encoder_input::type_"]
876 [::std::mem::offset_of!(gpujpeg_encoder_input, type_) - 0usize];
877 ["Offset of field: gpujpeg_encoder_input::image"]
878 [::std::mem::offset_of!(gpujpeg_encoder_input, image) - 8usize];
879 ["Offset of field: gpujpeg_encoder_input::texture"]
880 [::std::mem::offset_of!(gpujpeg_encoder_input, texture) - 16usize];
881};
882unsafe extern "C" {
883 pub fn gpujpeg_encoder_input_set_image(input: *mut gpujpeg_encoder_input, image: *mut u8);
891}
892unsafe extern "C" {
893 pub fn gpujpeg_encoder_input_set_gpu_image(input: *mut gpujpeg_encoder_input, image: *mut u8);
901}
902unsafe extern "C" {
903 pub fn gpujpeg_encoder_input_set_texture(
911 input: *mut gpujpeg_encoder_input,
912 texture: *mut gpujpeg_opengl_texture,
913 );
914}
915unsafe extern "C" {
916 pub fn gpujpeg_encoder_input_image(image: *mut u8) -> gpujpeg_encoder_input;
918}
919unsafe extern "C" {
920 pub fn gpujpeg_encoder_input_gpu_image(image: *mut u8) -> gpujpeg_encoder_input;
922}
923unsafe extern "C" {
924 pub fn gpujpeg_encoder_input_texture(
926 texture: *mut gpujpeg_opengl_texture,
927 ) -> gpujpeg_encoder_input;
928}
929unsafe extern "C" {
930 pub fn gpujpeg_encoder_create(stream: cudaStream_t) -> *mut gpujpeg_encoder;
936}
937unsafe extern "C" {
938 pub fn gpujpeg_encoder_max_pixels(
949 param: *mut gpujpeg_parameters,
950 param_image: *mut gpujpeg_image_parameters,
951 image_input_type: gpujpeg_encoder_input_type,
952 memory_size: usize,
953 max_pixels: *mut ::std::os::raw::c_int,
954 ) -> usize;
955}
956unsafe extern "C" {
957 pub fn gpujpeg_encoder_max_memory(
967 param: *mut gpujpeg_parameters,
968 param_image: *mut gpujpeg_image_parameters,
969 image_input_type: gpujpeg_encoder_input_type,
970 max_pixels: ::std::os::raw::c_int,
971 ) -> usize;
972}
973unsafe extern "C" {
974 pub fn gpujpeg_encoder_allocate(
983 encoder: *mut gpujpeg_encoder,
984 param: *const gpujpeg_parameters,
985 param_image: *const gpujpeg_image_parameters,
986 image_input_type: gpujpeg_encoder_input_type,
987 ) -> ::std::os::raw::c_int;
988}
989unsafe extern "C" {
990 pub fn gpujpeg_encoder_encode(
1003 encoder: *mut gpujpeg_encoder,
1004 param: *const gpujpeg_parameters,
1005 param_image: *const gpujpeg_image_parameters,
1006 input: *const gpujpeg_encoder_input,
1007 image_compressed: *mut *mut u8,
1008 image_compressed_size: *mut usize,
1009 ) -> ::std::os::raw::c_int;
1010}
1011unsafe extern "C" {
1012 pub fn gpujpeg_encoder_get_stats(
1022 encoder: *mut gpujpeg_encoder,
1023 stats: *mut gpujpeg_duration_stats,
1024 ) -> ::std::os::raw::c_int;
1025}
1026pub const gpujpeg_header_type_GPUJPEG_HEADER_DEFAULT: gpujpeg_header_type = 0;
1029pub const gpujpeg_header_type_GPUJPEG_HEADER_JFIF: gpujpeg_header_type = 1;
1030pub const gpujpeg_header_type_GPUJPEG_HEADER_SPIFF: gpujpeg_header_type = 2;
1031pub const gpujpeg_header_type_GPUJPEG_HEADER_ADOBE: gpujpeg_header_type = 4;
1033pub type gpujpeg_header_type = ::std::os::raw::c_int;
1034unsafe extern "C" {
1035 pub fn gpujpeg_encoder_set_jpeg_header(
1040 encoder: *mut gpujpeg_encoder,
1041 header_type: gpujpeg_header_type,
1042 );
1043}
1044unsafe extern "C" {
1045 pub fn gpujpeg_encoder_suggest_restart_interval(
1049 param_image: *const gpujpeg_image_parameters,
1050 subsampling: gpujpeg_sampling_factor_t,
1051 interleaved: bool,
1052 verbose: ::std::os::raw::c_int,
1053 ) -> ::std::os::raw::c_int;
1054}
1055unsafe extern "C" {
1056 pub fn gpujpeg_encoder_set_option(
1060 encoder: *mut gpujpeg_encoder,
1061 opt: *const ::std::os::raw::c_char,
1062 val: *const ::std::os::raw::c_char,
1063 ) -> ::std::os::raw::c_int;
1064}
1065unsafe extern "C" {
1066 pub fn gpujpeg_encoder_destroy(encoder: *mut gpujpeg_encoder) -> ::std::os::raw::c_int;
1072}
1073#[repr(C)]
1074#[derive(Debug, Copy, Clone)]
1075pub struct gpujpeg_decoder {
1076 _unused: [u8; 0],
1077}
1078pub const gpujpeg_decoder_output_type_GPUJPEG_DECODER_OUTPUT_INTERNAL_BUFFER:
1080 gpujpeg_decoder_output_type = 0;
1081pub const gpujpeg_decoder_output_type_GPUJPEG_DECODER_OUTPUT_CUSTOM_BUFFER:
1083 gpujpeg_decoder_output_type = 1;
1084pub const gpujpeg_decoder_output_type_GPUJPEG_DECODER_OUTPUT_OPENGL_TEXTURE:
1086 gpujpeg_decoder_output_type = 2;
1087pub const gpujpeg_decoder_output_type_GPUJPEG_DECODER_OUTPUT_CUDA_BUFFER:
1089 gpujpeg_decoder_output_type = 3;
1090pub const gpujpeg_decoder_output_type_GPUJPEG_DECODER_OUTPUT_CUSTOM_CUDA_BUFFER:
1092 gpujpeg_decoder_output_type = 4;
1093pub type gpujpeg_decoder_output_type = ::std::os::raw::c_int;
1095#[repr(C)]
1097#[derive(Debug, Copy, Clone)]
1098pub struct gpujpeg_decoder_output {
1099 pub type_: gpujpeg_decoder_output_type,
1101 pub data: *mut u8,
1103 pub data_size: usize,
1105 pub param_image: gpujpeg_image_parameters,
1107 pub texture: *mut gpujpeg_opengl_texture,
1109}
1110#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1111const _: () = {
1112 ["Size of gpujpeg_decoder_output"][::std::mem::size_of::<gpujpeg_decoder_output>() - 56usize];
1113 ["Alignment of gpujpeg_decoder_output"]
1114 [::std::mem::align_of::<gpujpeg_decoder_output>() - 8usize];
1115 ["Offset of field: gpujpeg_decoder_output::type_"]
1116 [::std::mem::offset_of!(gpujpeg_decoder_output, type_) - 0usize];
1117 ["Offset of field: gpujpeg_decoder_output::data"]
1118 [::std::mem::offset_of!(gpujpeg_decoder_output, data) - 8usize];
1119 ["Offset of field: gpujpeg_decoder_output::data_size"]
1120 [::std::mem::offset_of!(gpujpeg_decoder_output, data_size) - 16usize];
1121 ["Offset of field: gpujpeg_decoder_output::param_image"]
1122 [::std::mem::offset_of!(gpujpeg_decoder_output, param_image) - 24usize];
1123 ["Offset of field: gpujpeg_decoder_output::texture"]
1124 [::std::mem::offset_of!(gpujpeg_decoder_output, texture) - 48usize];
1125};
1126#[repr(C)]
1129#[derive(Debug, Copy, Clone)]
1130pub struct gpujpeg_decoder_init_parameters {
1131 pub stream: cudaStream_t,
1133 pub verbose: ::std::os::raw::c_int,
1135 pub perf_stats: bool,
1137 pub ff_cs_itu601_is_709: bool,
1140}
1141#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1142const _: () = {
1143 ["Size of gpujpeg_decoder_init_parameters"]
1144 [::std::mem::size_of::<gpujpeg_decoder_init_parameters>() - 16usize];
1145 ["Alignment of gpujpeg_decoder_init_parameters"]
1146 [::std::mem::align_of::<gpujpeg_decoder_init_parameters>() - 8usize];
1147 ["Offset of field: gpujpeg_decoder_init_parameters::stream"]
1148 [::std::mem::offset_of!(gpujpeg_decoder_init_parameters, stream) - 0usize];
1149 ["Offset of field: gpujpeg_decoder_init_parameters::verbose"]
1150 [::std::mem::offset_of!(gpujpeg_decoder_init_parameters, verbose) - 8usize];
1151 ["Offset of field: gpujpeg_decoder_init_parameters::perf_stats"]
1152 [::std::mem::offset_of!(gpujpeg_decoder_init_parameters, perf_stats) - 12usize];
1153 ["Offset of field: gpujpeg_decoder_init_parameters::ff_cs_itu601_is_709"]
1154 [::std::mem::offset_of!(gpujpeg_decoder_init_parameters, ff_cs_itu601_is_709) - 13usize];
1155};
1156unsafe extern "C" {
1157 pub fn gpujpeg_decoder_output_set_default(output: *mut gpujpeg_decoder_output);
1163}
1164unsafe extern "C" {
1165 pub fn gpujpeg_decoder_output_set_custom(
1172 output: *mut gpujpeg_decoder_output,
1173 custom_buffer: *mut u8,
1174 );
1175}
1176unsafe extern "C" {
1177 pub fn gpujpeg_decoder_output_set_texture(
1183 output: *mut gpujpeg_decoder_output,
1184 texture: *mut gpujpeg_opengl_texture,
1185 );
1186}
1187unsafe extern "C" {
1188 pub fn gpujpeg_decoder_output_set_cuda_buffer(output: *mut gpujpeg_decoder_output);
1192}
1193unsafe extern "C" {
1194 pub fn gpujpeg_decoder_output_set_custom_cuda(
1201 output: *mut gpujpeg_decoder_output,
1202 d_custom_buffer: *mut u8,
1203 );
1204}
1205unsafe extern "C" {
1206 pub fn gpujpeg_decoder_create(stream: cudaStream_t) -> *mut gpujpeg_decoder;
1213}
1214unsafe extern "C" {
1215 pub fn gpujpeg_decoder_default_init_parameters() -> gpujpeg_decoder_init_parameters;
1216}
1217
1218unsafe extern "C" {
1219 pub fn gpujpeg_decoder_create_with_params(
1229 params: *const gpujpeg_decoder_init_parameters,
1230 ) -> *mut gpujpeg_decoder;
1231}
1232unsafe extern "C" {
1233 pub fn gpujpeg_decoder_init(
1251 decoder: *mut gpujpeg_decoder,
1252 param: *const gpujpeg_parameters,
1253 param_image: *const gpujpeg_image_parameters,
1254 ) -> ::std::os::raw::c_int;
1255}
1256unsafe extern "C" {
1257 pub fn gpujpeg_decoder_decode(
1267 decoder: *mut gpujpeg_decoder,
1268 image: *mut u8,
1269 image_size: usize,
1270 output: *mut gpujpeg_decoder_output,
1271 ) -> ::std::os::raw::c_int;
1272}
1273unsafe extern "C" {
1274 pub fn gpujpeg_decoder_get_stats(
1284 decoder: *mut gpujpeg_decoder,
1285 stats: *mut gpujpeg_duration_stats,
1286 ) -> ::std::os::raw::c_int;
1287}
1288unsafe extern "C" {
1289 pub fn gpujpeg_decoder_destroy(decoder: *mut gpujpeg_decoder) -> ::std::os::raw::c_int;
1295}
1296unsafe extern "C" {
1297 pub fn gpujpeg_decoder_set_output_format(
1310 decoder: *mut gpujpeg_decoder,
1311 color_space: gpujpeg_color_space,
1312 pixel_format: gpujpeg_pixel_format,
1313 );
1314}
1315unsafe extern "C" {
1316 pub fn gpujpeg_decoder_get_image_info(
1318 image: *mut u8,
1319 image_size: usize,
1320 param_image: *mut gpujpeg_image_parameters,
1321 param: *mut gpujpeg_parameters,
1322 segment_count: *mut ::std::os::raw::c_int,
1323 ) -> ::std::os::raw::c_int;
1324}
1325unsafe extern "C" {
1326 pub fn gpujpeg_decoder_set_option(
1330 decoder: *mut gpujpeg_decoder,
1331 opt: *const ::std::os::raw::c_char,
1332 val: *const ::std::os::raw::c_char,
1333 ) -> ::std::os::raw::c_int;
1334}
1335#[repr(C)]
1337#[derive(Debug, Copy, Clone)]
1338pub struct cudaGraphicsResource {
1339 pub _address: u8,
1340}