diff --git a/Cargo.lock b/Cargo.lock index 2b18f07..7fe1ab4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,6 +52,28 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "bindgen" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -64,7 +86,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" dependencies = [ - "clap", + "clap 3.2.6", "heck 0.4.0", "indexmap", "log", @@ -83,12 +105,32 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "clang-sys" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "3.2.6" @@ -97,13 +139,41 @@ checksum = "9f1fe12880bae935d142c8702d500c63a4e8634b6c3c57ad72bf978fc7b6249a" dependencies = [ "atty", "bitflags", - "clap_lex", + "clap_lex 0.2.3", "indexmap", "strsim", "termcolor", "textwrap", ] +[[package]] +name = "clap" +version = "4.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2148adefda54e14492fb9bddcc600b4344c5d1a3123bd666dcb939c6f0e0e57e" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "clap_lex 0.3.0", + "once_cell", + "strsim", + "termcolor", +] + +[[package]] +name = "clap_derive" +version = "4.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "clap_lex" version = "0.2.3" @@ -113,6 +183,15 @@ dependencies = [ "os_str_bytes", ] +[[package]] +name = "clap_lex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "ctrlc" version = "3.2.2" @@ -135,6 +214,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + [[package]] name = "env_logger" version = "0.9.0" @@ -157,6 +242,12 @@ dependencies = [ "instant", ] +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + [[package]] name = "hashbrown" version = "0.12.1" @@ -218,12 +309,34 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + [[package]] name = "libc" version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + [[package]] name = "log" version = "0.4.17" @@ -248,6 +361,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "nix" version = "0.20.0" @@ -272,6 +391,16 @@ dependencies = [ "memoffset", ] +[[package]] +name = "nom" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "once_cell" version = "1.12.0" @@ -284,11 +413,41 @@ version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -337,6 +496,20 @@ dependencies = [ "winapi", ] +[[package]] +name = "runbindgen" +version = "0.1.0" +dependencies = [ + "bindgen", + "clap 4.0.26", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "ryu" version = "1.0.10" @@ -374,6 +547,12 @@ dependencies = [ "serde", ] +[[package]] +name = "shlex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" + [[package]] name = "strsim" version = "0.10.0" @@ -400,9 +579,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.98" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", @@ -496,7 +675,7 @@ version = "0.0.1" dependencies = [ "anyhow", "bitflags", - "clap", + "clap 3.2.6", "ctrlc", "env_logger", "log", @@ -518,6 +697,23 @@ dependencies = [ "v4l2r", ] +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "which" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +dependencies = [ + "either", + "libc", + "once_cell", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index edfe681..51991ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,4 +2,5 @@ members = [ "lib", "ffi", + "lib/src/bindings/runbindgen", ] diff --git a/lib/Cargo.toml b/lib/Cargo.toml index aea010d..3831028 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -26,4 +26,11 @@ utils = { path = "../utils" } # For convenience we are building the bindings manually and integrating them with # the crate. They are generated as follows: # bindgen /usr/include/linux/videodev2.h --output src/bindings/videodev2_64.rs -# bindgen /usr/include/linux/videodev2.h --output src/bindings/videodev2_32.rs -- --target=i686-unknown-linux-gnu \ No newline at end of file +# bindgen /usr/include/linux/videodev2.h --output src/bindings/videodev2_32.rs -- --target=i686-unknown-linux-gnu +# +# In case we want to use locally installed headers (make headers_install in kernel source directory) we need to pass clang args: +# bindgen usr/include/linux/videodev2.h --output videodev2_64.rs -- -Iusr/include +# otherwise clang will mix up system-wide headers with locally installed ones resulting in inconsistent output. +# +# For 32-bit headers you might need to install libc6-dev-i386-cross or a similar package, and then +# bindgen usr/include/linux/videodev2.h --output videodev2_32.rs -- --sysroot=/usr/i686-linux-gnu/ --target=i686-linux-gnu -Iusr/include \ No newline at end of file diff --git a/lib/src/bindings/runbindgen/Cargo.toml b/lib/src/bindings/runbindgen/Cargo.toml new file mode 100644 index 0000000..6ca16bf --- /dev/null +++ b/lib/src/bindings/runbindgen/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "runbindgen" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +bindgen = "0.63.0" +clap = { version = "4.0", features = ["derive"]} \ No newline at end of file diff --git a/lib/src/bindings/runbindgen/fix753.h b/lib/src/bindings/runbindgen/fix753.h new file mode 100644 index 0000000..c180750 --- /dev/null +++ b/lib/src/bindings/runbindgen/fix753.h @@ -0,0 +1,17 @@ +#undef V4L2_FWHT_FL_COMPONENTS_NUM_MSK +#undef V4L2_FWHT_FL_PIXENC_MSK + +MARK_FIX_753(V4L2_FWHT_FL_IS_INTERLACED); +MARK_FIX_753(V4L2_FWHT_FL_IS_BOTTOM_FIRST); +MARK_FIX_753(V4L2_FWHT_FL_IS_ALTERNATE); +MARK_FIX_753(V4L2_FWHT_FL_IS_BOTTOM_FIELD); +MARK_FIX_753(V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED); +MARK_FIX_753(V4L2_FWHT_FL_CB_IS_UNCOMPRESSED); +MARK_FIX_753(V4L2_FWHT_FL_CR_IS_UNCOMPRESSED); +MARK_FIX_753(V4L2_FWHT_FL_CHROMA_FULL_HEIGHT); +MARK_FIX_753(V4L2_FWHT_FL_CHROMA_FULL_WIDTH); +MARK_FIX_753(V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED); +MARK_FIX_753(V4L2_FWHT_FL_I_FRAME); + +#define V4L2_FWHT_FL_COMPONENTS_NUM_MSK (7 << V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET) +#define V4L2_FWHT_FL_PIXENC_MSK (3 << V4L2_FWHT_FL_PIXENC_OFFSET) diff --git a/lib/src/bindings/runbindgen/src/main.rs b/lib/src/bindings/runbindgen/src/main.rs new file mode 100644 index 0000000..d83d5cd --- /dev/null +++ b/lib/src/bindings/runbindgen/src/main.rs @@ -0,0 +1,105 @@ +use clap::Parser; +use std::fs; + +#[derive(Parser)] +struct Cli { + /// Sets a custom input file + #[arg(short, long, value_name = "INPUT FILE", default_value = "fix753.h")] + input_file: String, + + /// Sets a custom output file + #[arg(short, long, value_name = "OUTPUT FILE", default_value = "bindings.rs")] + output_file: String, + + /// Sets the include file for which to generate bindings + #[arg( + short, + long, + value_name = "BINDINGS FOR", + default_value = "linux/videodev2.h" + )] + bindings_for: String, + + /// Flag to keep the actual input presented to bindgen + #[arg(short, long, default_value_t = false)] + keep_actual_input: bool, + + /// Sets include path for clang + #[arg( + short = 'I', + long, + value_name = "INCLUDE PATH", + default_value = "/usr/include" + )] + include_path: String, + + /// Sets sysroot for clang + #[arg(short, long, value_name = "SYSROOT PATH", default_value = "/")] + sysroot: String, + + /// Sets target for clang + #[arg(short = 't', long, value_name = "CLANG TARGET")] + clang_target: Option, +} + +#[derive(Debug)] +pub struct Fix753; +impl bindgen::callbacks::ParseCallbacks for Fix753 { + fn item_name(&self, original_item_name: &str) -> Option { + Some(original_item_name.trim_start_matches("Fix753_").to_owned()) + } +} + +const ACTUAL_BINDGEN_INPUT_FILE: &str = "actual_bindgen_input.h"; + +fn main() { + let cli = Cli::parse(); + + let mut include_path = "-I".to_owned(); + include_path.push_str(&cli.include_path); + + let mut sysroot = "--sysroot=".to_owned(); + sysroot.push_str(&cli.sysroot); + + let mut clang_args = vec![include_path, sysroot]; + if let Some(clang_target) = cli.clang_target { + let mut target = "--target=".to_owned(); + target.push_str(&clang_target); + clang_args.push(target); + } + + println!("input file:{}", cli.input_file); + println!("output file:{}", cli.output_file); + println!("bindings for:{}", cli.bindings_for); + println!("clang args:{:?}", clang_args); + + let fix_file = fs::read_to_string(cli.input_file).expect("Unable to read file"); + + let mut actual_input = "#include \"".to_owned(); + actual_input.push_str(&cli.include_path); + actual_input.push('/'); + actual_input.push_str(&cli.bindings_for); + actual_input.push('"'); + actual_input.push('\n'); + actual_input + .push_str("#define MARK_FIX_753(name) const unsigned long int Fix753_##name = name;"); + actual_input.push('\n'); + actual_input.push_str(&fix_file); + + fs::write(ACTUAL_BINDGEN_INPUT_FILE, actual_input).expect("Unable to write to file"); + + let bindings = bindgen::Builder::default() + .header(ACTUAL_BINDGEN_INPUT_FILE) + .parse_callbacks(Box::new(Fix753 {})) + .clang_args(clang_args) + .generate() + .expect("Unable to generate bindings"); + + bindings + .write_to_file(cli.output_file) + .expect("Couldn't write bindings"); + + if !cli.keep_actual_input { + fs::remove_file(ACTUAL_BINDGEN_INPUT_FILE).expect("Unable to remove actual bindgen input"); + } +} diff --git a/lib/src/bindings/videodev2_32.rs b/lib/src/bindings/videodev2_32.rs index e1d72b1..a35fac6 100644 --- a/lib/src/bindings/videodev2_32.rs +++ b/lib/src/bindings/videodev2_32.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.1 */ +/* automatically generated by rust-bindgen 0.63.0 */ pub const _SYS_TIME_H: u32 = 1; pub const _FEATURES_H: u32 = 1; @@ -28,26 +28,26 @@ pub const __STDC_IEC_559_COMPLEX__: u32 = 1; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 33; +pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __WORDSIZE: u32 = 32; pub const __WORDSIZE32_SIZE_ULONG: u32 = 0; pub const __WORDSIZE32_PTRDIFF_LONG: u32 = 0; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 0; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const _BITS_TYPES_H: u32 = 1; pub const __TIMESIZE: u32 = 32; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 0; pub const __STATFS_MATCHES_STATFS64: u32 = 0; -pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 0; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const __time_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6usize] = b"stosl\0"; pub const __sigset_t_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; pub const _BITS_ENDIAN_H: u32 = 1; @@ -112,6 +112,7 @@ pub const V4L2_CTRL_CLASS_FM_RX: u32 = 10551296; pub const V4L2_CTRL_CLASS_RF_TUNER: u32 = 10616832; pub const V4L2_CTRL_CLASS_DETECT: u32 = 10682368; pub const V4L2_CTRL_CLASS_CODEC_STATELESS: u32 = 10747904; +pub const V4L2_CTRL_CLASS_COLORIMETRY: u32 = 10813440; pub const V4L2_CID_BASE: u32 = 9963776; pub const V4L2_CID_USER_BASE: u32 = 9963776; pub const V4L2_CID_USER_CLASS: u32 = 9961473; @@ -156,7 +157,8 @@ pub const V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: u32 = 9963815; pub const V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: u32 = 9963816; pub const V4L2_CID_ALPHA_COMPONENT: u32 = 9963817; pub const V4L2_CID_COLORFX_CBCR: u32 = 9963818; -pub const V4L2_CID_LASTP1: u32 = 9963819; +pub const V4L2_CID_COLORFX_RGB: u32 = 9963819; +pub const V4L2_CID_LASTP1: u32 = 9963820; pub const V4L2_CID_USER_MEYE_BASE: u32 = 9967872; pub const V4L2_CID_USER_BTTV_BASE: u32 = 9967888; pub const V4L2_CID_USER_S2255_BASE: u32 = 9967920; @@ -170,6 +172,9 @@ pub const V4L2_CID_USER_IMX_BASE: u32 = 9968048; pub const V4L2_CID_USER_ATMEL_ISC_BASE: u32 = 9968064; pub const V4L2_CID_USER_CODA_BASE: u32 = 9968096; pub const V4L2_CID_USER_CCS_BASE: u32 = 9968112; +pub const V4L2_CID_USER_ALLEGRO_BASE: u32 = 9968240; +pub const V4L2_CID_USER_ISL7998X_BASE: u32 = 9968256; +pub const V4L2_CID_USER_DW100_BASE: u32 = 9968272; pub const V4L2_CID_CODEC_BASE: u32 = 10029312; pub const V4L2_CID_CODEC_CLASS: u32 = 10027009; pub const V4L2_CID_MPEG_STREAM_TYPE: u32 = 10029312; @@ -225,6 +230,13 @@ pub const V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: u32 = 10029539; pub const V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: u32 = 10029540; pub const V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME: u32 = 10029541; pub const V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID: u32 = 10029542; +pub const V4L2_CID_MPEG_VIDEO_AU_DELIMITER: u32 = 10029543; +pub const V4L2_CID_MPEG_VIDEO_LTR_COUNT: u32 = 10029544; +pub const V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX: u32 = 10029545; +pub const V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES: u32 = 10029546; +pub const V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR: u32 = 10029547; +pub const V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD: u32 = 10029548; +pub const V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE: u32 = 10029549; pub const V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL: u32 = 10029582; pub const V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE: u32 = 10029583; pub const V4L2_CID_FWHT_I_FRAME_QP: u32 = 10029602; @@ -358,6 +370,8 @@ pub const V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP: u32 = 10029961; pub const V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP: u32 = 10029962; pub const V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP: u32 = 10029963; pub const V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP: u32 = 10029964; +pub const V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: u32 = 10029965; +pub const V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: u32 = 10029966; pub const V4L2_CID_CODEC_CX2341X_BASE: u32 = 10031104; pub const V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: u32 = 10031104; pub const V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: u32 = 10031105; @@ -506,6 +520,7 @@ pub const V4L2_CID_TEST_PATTERN_GREENR: u32 = 10356997; pub const V4L2_CID_TEST_PATTERN_BLUE: u32 = 10356998; pub const V4L2_CID_TEST_PATTERN_GREENB: u32 = 10356999; pub const V4L2_CID_UNIT_CELL_SIZE: u32 = 10357000; +pub const V4L2_CID_NOTIFY_GAINS: u32 = 10357001; pub const V4L2_CID_IMAGE_PROC_CLASS_BASE: u32 = 10422528; pub const V4L2_CID_IMAGE_PROC_CLASS: u32 = 10420225; pub const V4L2_CID_LINK_FREQ: u32 = 10422529; @@ -601,6 +616,8 @@ pub const V4L2_H264_DPB_ENTRY_FLAG_FIELD: u32 = 8; pub const V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC: u32 = 1; pub const V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC: u32 = 2; pub const V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD: u32 = 4; +pub const V4L2_H264_DECODE_PARAM_FLAG_PFRAME: u32 = 8; +pub const V4L2_H264_DECODE_PARAM_FLAG_BFRAME: u32 = 16; pub const V4L2_CID_STATELESS_H264_DECODE_PARAMS: u32 = 10750215; pub const V4L2_FWHT_VERSION: u32 = 3; pub const V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET: u32 = 16; @@ -609,6 +626,172 @@ pub const V4L2_FWHT_FL_PIXENC_YUV: u32 = 524288; pub const V4L2_FWHT_FL_PIXENC_RGB: u32 = 1048576; pub const V4L2_FWHT_FL_PIXENC_HSV: u32 = 1572864; pub const V4L2_CID_STATELESS_FWHT_PARAMS: u32 = 10750308; +pub const V4L2_VP8_SEGMENT_FLAG_ENABLED: u32 = 1; +pub const V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP: u32 = 2; +pub const V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA: u32 = 4; +pub const V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE: u32 = 8; +pub const V4L2_VP8_LF_ADJ_ENABLE: u32 = 1; +pub const V4L2_VP8_LF_DELTA_UPDATE: u32 = 2; +pub const V4L2_VP8_LF_FILTER_TYPE_SIMPLE: u32 = 4; +pub const V4L2_VP8_COEFF_PROB_CNT: u32 = 11; +pub const V4L2_VP8_MV_PROB_CNT: u32 = 19; +pub const V4L2_VP8_FRAME_FLAG_KEY_FRAME: u32 = 1; +pub const V4L2_VP8_FRAME_FLAG_EXPERIMENTAL: u32 = 2; +pub const V4L2_VP8_FRAME_FLAG_SHOW_FRAME: u32 = 4; +pub const V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF: u32 = 8; +pub const V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN: u32 = 16; +pub const V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT: u32 = 32; +pub const V4L2_CID_STATELESS_VP8_FRAME: u32 = 10750408; +pub const V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE: u32 = 1; +pub const V4L2_CID_STATELESS_MPEG2_SEQUENCE: u32 = 10750428; +pub const V4L2_MPEG2_PIC_CODING_TYPE_I: u32 = 1; +pub const V4L2_MPEG2_PIC_CODING_TYPE_P: u32 = 2; +pub const V4L2_MPEG2_PIC_CODING_TYPE_B: u32 = 3; +pub const V4L2_MPEG2_PIC_CODING_TYPE_D: u32 = 4; +pub const V4L2_MPEG2_PIC_TOP_FIELD: u32 = 1; +pub const V4L2_MPEG2_PIC_BOTTOM_FIELD: u32 = 2; +pub const V4L2_MPEG2_PIC_FRAME: u32 = 3; +pub const V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST: u32 = 1; +pub const V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT: u32 = 2; +pub const V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV: u32 = 4; +pub const V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE: u32 = 8; +pub const V4L2_MPEG2_PIC_FLAG_INTRA_VLC: u32 = 16; +pub const V4L2_MPEG2_PIC_FLAG_ALT_SCAN: u32 = 32; +pub const V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST: u32 = 64; +pub const V4L2_MPEG2_PIC_FLAG_PROGRESSIVE: u32 = 128; +pub const V4L2_CID_STATELESS_MPEG2_PICTURE: u32 = 10750429; +pub const V4L2_CID_STATELESS_MPEG2_QUANTISATION: u32 = 10750430; +pub const V4L2_CID_STATELESS_HEVC_SPS: u32 = 10750608; +pub const V4L2_CID_STATELESS_HEVC_PPS: u32 = 10750609; +pub const V4L2_CID_STATELESS_HEVC_SLICE_PARAMS: u32 = 10750610; +pub const V4L2_CID_STATELESS_HEVC_SCALING_MATRIX: u32 = 10750611; +pub const V4L2_CID_STATELESS_HEVC_DECODE_PARAMS: u32 = 10750612; +pub const V4L2_CID_STATELESS_HEVC_DECODE_MODE: u32 = 10750613; +pub const V4L2_CID_STATELESS_HEVC_START_CODE: u32 = 10750614; +pub const V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS: u32 = 10750615; +pub const V4L2_HEVC_SLICE_TYPE_B: u32 = 0; +pub const V4L2_HEVC_SLICE_TYPE_P: u32 = 1; +pub const V4L2_HEVC_SLICE_TYPE_I: u32 = 2; +pub const V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE: u32 = 1; +pub const V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED: u32 = 2; +pub const V4L2_HEVC_SPS_FLAG_AMP_ENABLED: u32 = 4; +pub const V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET: u32 = 8; +pub const V4L2_HEVC_SPS_FLAG_PCM_ENABLED: u32 = 16; +pub const V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED: u32 = 32; +pub const V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT: u32 = 64; +pub const V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED: u32 = 128; +pub const V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED: u32 = 256; +pub const V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED: u32 = 1; +pub const V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT: u32 = 2; +pub const V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED: u32 = 4; +pub const V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT: u32 = 8; +pub const V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED: u32 = 16; +pub const V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED: u32 = 32; +pub const V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED: u32 = 64; +pub const V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT: u32 = 128; +pub const V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED: u32 = 256; +pub const V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED: u32 = 512; +pub const V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED: u32 = 1024; +pub const V4L2_HEVC_PPS_FLAG_TILES_ENABLED: u32 = 2048; +pub const V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED: u32 = 4096; +pub const V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED: u32 = 8192; +pub const V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED: u32 = 16384; +pub const V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED: u32 = 32768; +pub const V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER: u32 = 65536; +pub const V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT: u32 = 131072; +pub const V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT: u32 = 262144; +pub const V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT: u32 = 524288; +pub const V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING: u32 = 1048576; +pub const V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE: u32 = 1; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME: u32 = 0; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD: u32 = 1; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD: u32 = 2; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM: u32 = 3; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP: u32 = 4; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: u32 = 5; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: u32 = 6; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING: u32 = 7; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING: u32 = 8; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM: u32 = 9; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP: u32 = 10; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM: u32 = 11; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP: u32 = 12; +pub const V4L2_HEVC_DPB_ENTRIES_NUM_MAX: u32 = 16; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA: u32 = 1; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA: u32 = 2; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED: u32 = 4; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO: u32 = 8; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT: u32 = 16; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0: u32 = 32; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV: u32 = 64; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED: u32 = 128; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED: u32 = 256; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT: u32 = 512; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC: u32 = 1; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC: u32 = 2; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR: u32 = 4; +pub const V4L2_CID_COLORIMETRY_CLASS_BASE: u32 = 10815744; +pub const V4L2_CID_COLORIMETRY_CLASS: u32 = 10813441; +pub const V4L2_CID_COLORIMETRY_HDR10_CLL_INFO: u32 = 10815744; +pub const V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY: u32 = 10815745; +pub const V4L2_HDR10_MASTERING_PRIMARIES_X_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH: u32 = 37000; +pub const V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH: u32 = 42000; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH: u32 = 37000; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH: u32 = 42000; +pub const V4L2_HDR10_MASTERING_MAX_LUMA_LOW: u32 = 50000; +pub const V4L2_HDR10_MASTERING_MAX_LUMA_HIGH: u32 = 100000000; +pub const V4L2_HDR10_MASTERING_MIN_LUMA_LOW: u32 = 1; +pub const V4L2_HDR10_MASTERING_MIN_LUMA_HIGH: u32 = 50000; +pub const V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED: u32 = 1; +pub const V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE: u32 = 2; +pub const V4L2_VP9_SEGMENTATION_FLAG_ENABLED: u32 = 1; +pub const V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP: u32 = 2; +pub const V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE: u32 = 4; +pub const V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA: u32 = 8; +pub const V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE: u32 = 16; +pub const V4L2_VP9_SEG_LVL_ALT_Q: u32 = 0; +pub const V4L2_VP9_SEG_LVL_ALT_L: u32 = 1; +pub const V4L2_VP9_SEG_LVL_REF_FRAME: u32 = 2; +pub const V4L2_VP9_SEG_LVL_SKIP: u32 = 3; +pub const V4L2_VP9_SEG_LVL_MAX: u32 = 4; +pub const V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK: u32 = 15; +pub const V4L2_VP9_FRAME_FLAG_KEY_FRAME: u32 = 1; +pub const V4L2_VP9_FRAME_FLAG_SHOW_FRAME: u32 = 2; +pub const V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT: u32 = 4; +pub const V4L2_VP9_FRAME_FLAG_INTRA_ONLY: u32 = 8; +pub const V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV: u32 = 16; +pub const V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX: u32 = 32; +pub const V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE: u32 = 64; +pub const V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING: u32 = 128; +pub const V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING: u32 = 256; +pub const V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING: u32 = 512; +pub const V4L2_VP9_SIGN_BIAS_LAST: u32 = 1; +pub const V4L2_VP9_SIGN_BIAS_GOLDEN: u32 = 2; +pub const V4L2_VP9_SIGN_BIAS_ALT: u32 = 4; +pub const V4L2_VP9_RESET_FRAME_CTX_NONE: u32 = 0; +pub const V4L2_VP9_RESET_FRAME_CTX_SPEC: u32 = 1; +pub const V4L2_VP9_RESET_FRAME_CTX_ALL: u32 = 2; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP: u32 = 0; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH: u32 = 1; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP: u32 = 2; +pub const V4L2_VP9_INTERP_FILTER_BILINEAR: u32 = 3; +pub const V4L2_VP9_INTERP_FILTER_SWITCHABLE: u32 = 4; +pub const V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE: u32 = 0; +pub const V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE: u32 = 1; +pub const V4L2_VP9_REFERENCE_MODE_SELECT: u32 = 2; +pub const V4L2_VP9_PROFILE_MAX: u32 = 3; +pub const V4L2_CID_STATELESS_VP9_FRAME: u32 = 10750508; +pub const V4L2_VP9_NUM_FRAME_CTX: u32 = 4; +pub const V4L2_CID_STATELESS_VP9_COMPRESSED_HDR: u32 = 10750509; +pub const V4L2_VP9_TX_MODE_ONLY_4X4: u32 = 0; +pub const V4L2_VP9_TX_MODE_ALLOW_8X8: u32 = 1; +pub const V4L2_VP9_TX_MODE_ALLOW_16X16: u32 = 2; +pub const V4L2_VP9_TX_MODE_ALLOW_32X32: u32 = 3; +pub const V4L2_VP9_TX_MODE_SELECT: u32 = 4; pub const V4L2_CTRL_CLASS_MPEG: u32 = 10027008; pub const V4L2_CID_MPEG_CLASS: u32 = 10027009; pub const V4L2_CID_MPEG_BASE: u32 = 10029312; @@ -640,7 +823,6 @@ pub const V4L2_CAP_EXT_PIX_FORMAT: u32 = 2097152; pub const V4L2_CAP_SDR_OUTPUT: u32 = 4194304; pub const V4L2_CAP_META_CAPTURE: u32 = 8388608; pub const V4L2_CAP_READWRITE: u32 = 16777216; -pub const V4L2_CAP_ASYNCIO: u32 = 33554432; pub const V4L2_CAP_STREAMING: u32 = 67108864; pub const V4L2_CAP_META_OUTPUT: u32 = 134217728; pub const V4L2_CAP_TOUCH: u32 = 268435456; @@ -674,6 +856,7 @@ pub const V4L2_JPEG_MARKER_DQT: u32 = 16; pub const V4L2_JPEG_MARKER_DRI: u32 = 32; pub const V4L2_JPEG_MARKER_COM: u32 = 64; pub const V4L2_JPEG_MARKER_APP: u32 = 128; +pub const V4L2_MEMORY_FLAG_NON_COHERENT: u32 = 1; pub const V4L2_BUF_CAP_SUPPORTS_MMAP: u32 = 1; pub const V4L2_BUF_CAP_SUPPORTS_USERPTR: u32 = 2; pub const V4L2_BUF_CAP_SUPPORTS_DMABUF: u32 = 4; @@ -790,6 +973,7 @@ pub const V4L2_CTRL_FLAG_VOLATILE: u32 = 128; pub const V4L2_CTRL_FLAG_HAS_PAYLOAD: u32 = 256; pub const V4L2_CTRL_FLAG_EXECUTE_ON_WRITE: u32 = 512; pub const V4L2_CTRL_FLAG_MODIFY_LAYOUT: u32 = 1024; +pub const V4L2_CTRL_FLAG_DYNAMIC_ARRAY: u32 = 2048; pub const V4L2_CTRL_FLAG_NEXT_CTRL: u32 = 2147483648; pub const V4L2_CTRL_FLAG_NEXT_COMPOUND: u32 = 1073741824; pub const V4L2_CID_MAX_CTRLS: u32 = 1024; @@ -872,8 +1056,8 @@ pub const V4L2_MPEG_VBI_IVTV_TELETEXT_B: u32 = 1; pub const V4L2_MPEG_VBI_IVTV_CAPTION_525: u32 = 4; pub const V4L2_MPEG_VBI_IVTV_WSS_625: u32 = 5; pub const V4L2_MPEG_VBI_IVTV_VPS: u32 = 7; -pub const V4L2_MPEG_VBI_IVTV_MAGIC0: &'static [u8; 5usize] = b"itv0\0"; -pub const V4L2_MPEG_VBI_IVTV_MAGIC1: &'static [u8; 5usize] = b"ITV0\0"; +pub const V4L2_MPEG_VBI_IVTV_MAGIC0: &[u8; 5usize] = b"itv0\0"; +pub const V4L2_MPEG_VBI_IVTV_MAGIC1: &[u8; 5usize] = b"ITV0\0"; pub const V4L2_EVENT_ALL: u32 = 0; pub const V4L2_EVENT_VSYNC: u32 = 1; pub const V4L2_EVENT_EOS: u32 = 2; @@ -885,6 +1069,7 @@ pub const V4L2_EVENT_PRIVATE_START: u32 = 134217728; pub const V4L2_EVENT_CTRL_CH_VALUE: u32 = 1; pub const V4L2_EVENT_CTRL_CH_FLAGS: u32 = 2; pub const V4L2_EVENT_CTRL_CH_RANGE: u32 = 4; +pub const V4L2_EVENT_CTRL_CH_DIMENSIONS: u32 = 8; pub const V4L2_EVENT_SRC_CH_RESOLUTION: u32 = 1; pub const V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ: u32 = 1; pub const V4L2_EVENT_SUB_FL_SEND_INITIAL: u32 = 1; @@ -898,6 +1083,9 @@ pub const V4L2_CHIP_MATCH_AC97: u32 = 3; pub const V4L2_CHIP_FL_READABLE: u32 = 1; pub const V4L2_CHIP_FL_WRITABLE: u32 = 2; pub const BASE_VIDIOC_PRIVATE: u32 = 192; +pub const V4L2_CAP_ASYNCIO: u32 = 33554432; +pub const V4L2_FWHT_FL_COMPONENTS_NUM_MSK: u32 = 458752; +pub const V4L2_FWHT_FL_PIXENC_MSK: u32 = 1572864; pub type __u_char = ::std::os::raw::c_uchar; pub type __u_short = ::std::os::raw::c_ushort; pub type __u_int = ::std::os::raw::c_uint; @@ -939,6 +1127,8 @@ pub struct __fsid_t { } #[test] fn bindgen_test_layout___fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, @@ -950,7 +1140,7 @@ fn bindgen_test_layout___fsid_t() { concat!("Alignment of ", stringify!(__fsid_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -967,7 +1157,6 @@ pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = __int64_t; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; @@ -998,6 +1187,8 @@ pub struct timeval { } #[test] fn bindgen_test_layout_timeval() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1009,7 +1200,7 @@ fn bindgen_test_layout_timeval() { concat!("Alignment of ", stringify!(timeval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1019,7 +1210,7 @@ fn bindgen_test_layout_timeval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1037,6 +1228,8 @@ pub struct __sigset_t { } #[test] fn bindgen_test_layout___sigset_t() { + const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, @@ -1048,7 +1241,7 @@ fn bindgen_test_layout___sigset_t() { concat!("Alignment of ", stringify!(__sigset_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1067,6 +1260,8 @@ pub struct timespec { } #[test] fn bindgen_test_layout_timespec() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1078,7 +1273,7 @@ fn bindgen_test_layout_timespec() { concat!("Alignment of ", stringify!(timespec)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1088,7 +1283,7 @@ fn bindgen_test_layout_timespec() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1106,6 +1301,8 @@ pub struct fd_set { } #[test] fn bindgen_test_layout_fd_set() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -1117,7 +1314,7 @@ fn bindgen_test_layout_fd_set() { concat!("Alignment of ", stringify!(fd_set)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1155,6 +1352,8 @@ pub struct timezone { } #[test] fn bindgen_test_layout_timezone() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1166,7 +1365,7 @@ fn bindgen_test_layout_timezone() { concat!("Alignment of ", stringify!(timezone)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tz_minuteswest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1176,7 +1375,7 @@ fn bindgen_test_layout_timezone() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tz_dsttime as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1210,6 +1409,8 @@ pub struct itimerval { } #[test] fn bindgen_test_layout_itimerval() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1221,7 +1422,7 @@ fn bindgen_test_layout_itimerval() { concat!("Alignment of ", stringify!(itimerval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).it_interval as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1231,7 +1432,7 @@ fn bindgen_test_layout_itimerval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).it_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1282,6 +1483,8 @@ pub struct __kernel_fd_set { } #[test] fn bindgen_test_layout___kernel_fd_set() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, @@ -1293,7 +1496,7 @@ fn bindgen_test_layout___kernel_fd_set() { concat!("Alignment of ", stringify!(__kernel_fd_set)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1332,6 +1535,8 @@ pub struct __kernel_fsid_t { } #[test] fn bindgen_test_layout___kernel_fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, @@ -1343,7 +1548,7 @@ fn bindgen_test_layout___kernel_fsid_t() { concat!("Alignment of ", stringify!(__kernel_fsid_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1384,6 +1589,8 @@ pub struct v4l2_edid { } #[test] fn bindgen_test_layout_v4l2_edid() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 36usize, @@ -1395,7 +1602,7 @@ fn bindgen_test_layout_v4l2_edid() { concat!("Alignment of ", stringify!(v4l2_edid)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1405,7 +1612,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).start_block as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start_block) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1415,7 +1622,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).blocks as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).blocks) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1425,7 +1632,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1435,7 +1642,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).edid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).edid) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1470,6 +1677,7 @@ pub const v4l2_colorfx_V4L2_COLORFX_SILHOUETTE: v4l2_colorfx = 12; pub const v4l2_colorfx_V4L2_COLORFX_SOLARIZATION: v4l2_colorfx = 13; pub const v4l2_colorfx_V4L2_COLORFX_ANTIQUE: v4l2_colorfx = 14; pub const v4l2_colorfx_V4L2_COLORFX_SET_CBCR: v4l2_colorfx = 15; +pub const v4l2_colorfx_V4L2_COLORFX_SET_RGB: v4l2_colorfx = 16; pub type v4l2_colorfx = ::std::os::raw::c_uint; pub const v4l2_mpeg_stream_type_V4L2_MPEG_STREAM_TYPE_MPEG2_PS: v4l2_mpeg_stream_type = 0; pub const v4l2_mpeg_stream_type_V4L2_MPEG_STREAM_TYPE_MPEG2_TS: v4l2_mpeg_stream_type = 1; @@ -1672,6 +1880,9 @@ pub const v4l2_mpeg_video_multi_slice_mode_V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_M pub const v4l2_mpeg_video_multi_slice_mode_V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES: v4l2_mpeg_video_multi_slice_mode = 2; pub type v4l2_mpeg_video_multi_slice_mode = ::std::os::raw::c_uint; +pub const v4l2_mpeg_video_intra_refresh_period_type_V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM : v4l2_mpeg_video_intra_refresh_period_type = 0 ; +pub const v4l2_mpeg_video_intra_refresh_period_type_V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC : v4l2_mpeg_video_intra_refresh_period_type = 1 ; +pub type v4l2_mpeg_video_intra_refresh_period_type = ::std::os::raw::c_uint; pub const v4l2_mpeg_video_mpeg2_level_V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW: v4l2_mpeg_video_mpeg2_level = 0; pub const v4l2_mpeg_video_mpeg2_level_V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN: @@ -2111,12 +2322,15 @@ pub const v4l2_stateless_h264_decode_mode_V4L2_STATELESS_H264_DECODE_MODE_SLICE_ v4l2_stateless_h264_decode_mode = 0; pub const v4l2_stateless_h264_decode_mode_V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED: v4l2_stateless_h264_decode_mode = 1; +#[doc = " enum v4l2_stateless_h264_decode_mode - Decoding mode\n\n @V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED: indicates that decoding\n is performed one slice at a time. In this mode,\n V4L2_CID_STATELESS_H264_SLICE_PARAMS must contain the parsed slice\n parameters and the OUTPUT buffer must contain a single slice.\n V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF feature is used\n in order to support multislice frames.\n @V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED: indicates that\n decoding is performed per frame. The OUTPUT buffer must contain\n all slices and also both fields. This mode is typically supported\n by device drivers that are able to parse the slice(s) header(s)\n in hardware. When this mode is selected,\n V4L2_CID_STATELESS_H264_SLICE_PARAMS is not used."] pub type v4l2_stateless_h264_decode_mode = ::std::os::raw::c_uint; pub const v4l2_stateless_h264_start_code_V4L2_STATELESS_H264_START_CODE_NONE: v4l2_stateless_h264_start_code = 0; pub const v4l2_stateless_h264_start_code_V4L2_STATELESS_H264_START_CODE_ANNEX_B: v4l2_stateless_h264_start_code = 1; +#[doc = " enum v4l2_stateless_h264_start_code - Start code\n\n @V4L2_STATELESS_H264_START_CODE_NONE: slices are passed\n to the driver without any start code.\n @V4L2_STATELESS_H264_START_CODE_ANNEX_B: slices are passed\n to the driver with an Annex B start code prefix\n (legal start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001).\n This mode is typically supported by device drivers that parse\n the start code in hardware."] pub type v4l2_stateless_h264_start_code = ::std::os::raw::c_uint; +#[doc = " struct v4l2_ctrl_h264_sps - H264 sequence parameter set\n\n All the members on this sequence parameter set structure match the\n sequence parameter set syntax as specified by the H264 specification.\n\n @profile_idc: see H264 specification.\n @constraint_set_flags: see H264 specification.\n @level_idc: see H264 specification.\n @seq_parameter_set_id: see H264 specification.\n @chroma_format_idc: see H264 specification.\n @bit_depth_luma_minus8: see H264 specification.\n @bit_depth_chroma_minus8: see H264 specification.\n @log2_max_frame_num_minus4: see H264 specification.\n @pic_order_cnt_type: see H264 specification.\n @log2_max_pic_order_cnt_lsb_minus4: see H264 specification.\n @max_num_ref_frames: see H264 specification.\n @num_ref_frames_in_pic_order_cnt_cycle: see H264 specification.\n @offset_for_ref_frame: see H264 specification.\n @offset_for_non_ref_pic: see H264 specification.\n @offset_for_top_to_bottom_field: see H264 specification.\n @pic_width_in_mbs_minus1: see H264 specification.\n @pic_height_in_map_units_minus1: see H264 specification.\n @flags: see V4L2_H264_SPS_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_sps { @@ -2141,6 +2355,8 @@ pub struct v4l2_ctrl_h264_sps { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_sps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1048usize, @@ -2152,7 +2368,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_sps)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).profile_idc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2162,9 +2378,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).constraint_set_flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).constraint_set_flags) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2174,7 +2388,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).level_idc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2184,9 +2398,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, 3usize, concat!( "Offset of field: ", @@ -2196,9 +2408,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_format_idc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2208,10 +2418,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_luma_minus8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", @@ -2221,10 +2428,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_chroma_minus8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -2234,10 +2438,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).log2_max_frame_num_minus4 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).log2_max_frame_num_minus4) as usize - ptr as usize }, 7usize, concat!( "Offset of field: ", @@ -2247,9 +2448,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_type) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2260,8 +2459,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).log2_max_pic_order_cnt_lsb_minus4 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize }, 9usize, concat!( @@ -2272,9 +2470,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_num_ref_frames as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_num_ref_frames) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2285,8 +2481,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_frames_in_pic_order_cnt_cycle - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_frames_in_pic_order_cnt_cycle) as usize + - ptr as usize }, 11usize, concat!( @@ -2297,9 +2493,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset_for_ref_frame as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset_for_ref_frame) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -2309,10 +2503,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset_for_non_ref_pic as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset_for_non_ref_pic) as usize - ptr as usize }, 1032usize, concat!( "Offset of field: ", @@ -2323,8 +2514,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).offset_for_top_to_bottom_field - as *const _ as usize + ::std::ptr::addr_of!((*ptr).offset_for_top_to_bottom_field) as usize - ptr as usize }, 1036usize, concat!( @@ -2335,10 +2525,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_width_in_mbs_minus1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_mbs_minus1) as usize - ptr as usize }, 1040usize, concat!( "Offset of field: ", @@ -2349,8 +2536,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pic_height_in_map_units_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).pic_height_in_map_units_minus1) as usize - ptr as usize }, 1042usize, concat!( @@ -2361,7 +2547,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 1044usize, concat!( "Offset of field: ", @@ -2371,6 +2557,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); } +#[doc = " struct v4l2_ctrl_h264_pps - H264 picture parameter set\n\n Except where noted, all the members on this picture parameter set\n structure match the picture parameter set syntax as specified\n by the H264 specification.\n\n In particular, V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag\n has a specific meaning. This flag should be set if a non-flat\n scaling matrix applies to the picture. In this case, applications\n are expected to use V4L2_CID_STATELESS_H264_SCALING_MATRIX,\n to pass the values of the non-flat matrices.\n\n @pic_parameter_set_id: see H264 specification.\n @seq_parameter_set_id: see H264 specification.\n @num_slice_groups_minus1: see H264 specification.\n @num_ref_idx_l0_default_active_minus1: see H264 specification.\n @num_ref_idx_l1_default_active_minus1: see H264 specification.\n @weighted_bipred_idc: see H264 specification.\n @pic_init_qp_minus26: see H264 specification.\n @pic_init_qs_minus26: see H264 specification.\n @chroma_qp_index_offset: see H264 specification.\n @second_chroma_qp_index_offset: see H264 specification.\n @flags: see V4L2_H264_PPS_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_pps { @@ -2388,6 +2575,8 @@ pub struct v4l2_ctrl_h264_pps { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_pps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -2399,9 +2588,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_pps)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2411,9 +2598,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2423,10 +2608,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_slice_groups_minus1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).num_slice_groups_minus1) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2437,8 +2619,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l0_default_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize }, 3usize, concat!( @@ -2450,8 +2632,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l1_default_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize }, 4usize, concat!( @@ -2462,9 +2644,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).weighted_bipred_idc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).weighted_bipred_idc) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", @@ -2474,9 +2654,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qp_minus26 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qp_minus26) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -2486,9 +2664,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qs_minus26 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qs_minus26) as usize - ptr as usize }, 7usize, concat!( "Offset of field: ", @@ -2498,10 +2674,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_qp_index_offset as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_qp_index_offset) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2512,8 +2685,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).second_chroma_qp_index_offset as *const _ - as usize + ::std::ptr::addr_of!((*ptr).second_chroma_qp_index_offset) as usize - ptr as usize }, 9usize, concat!( @@ -2524,7 +2696,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2534,6 +2706,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); } +#[doc = " struct v4l2_ctrl_h264_scaling_matrix - H264 scaling matrices\n\n @scaling_list_4x4: scaling matrix after applying the inverse\n scanning process. Expected list order is Intra Y, Intra Cb,\n Intra Cr, Inter Y, Inter Cb, Inter Cr. The values on each\n scaling list are expected in raster scan order.\n @scaling_list_8x8: scaling matrix after applying the inverse\n scanning process. Expected list order is Intra Y, Inter Y,\n Intra Cb, Inter Cb, Intra Cr, Inter Cr. The values on each\n scaling list are expected in raster scan order.\n\n Note that the list order is different for the 4x4 and 8x8\n matrices as per the H264 specification, see table 7-2 \"Assignment\n of mnemonic names to scaling list indices and specification of\n fall-back rule\"."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_scaling_matrix { @@ -2542,6 +2715,9 @@ pub struct v4l2_ctrl_h264_scaling_matrix { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 480usize, @@ -2553,10 +2729,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_scaling_matrix)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scaling_list_4x4 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_4x4) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2566,10 +2739,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scaling_list_8x8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_8x8) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -2589,6 +2759,9 @@ pub struct v4l2_h264_weight_factors { } #[test] fn bindgen_test_layout_v4l2_h264_weight_factors() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 384usize, @@ -2600,9 +2773,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { concat!("Alignment of ", stringify!(v4l2_h264_weight_factors)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2612,9 +2783,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -2624,9 +2793,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -2636,9 +2803,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", @@ -2648,6 +2813,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); } +#[doc = " struct v4l2_ctrl_h264_pred_weights - Prediction weight table\n\n Prediction weight table, which matches the syntax specified\n by the H264 specification.\n\n @luma_log2_weight_denom: see H264 specification.\n @chroma_log2_weight_denom: see H264 specification.\n @weight_factors: luma and chroma weight factors."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_pred_weights { @@ -2657,6 +2823,9 @@ pub struct v4l2_ctrl_h264_pred_weights { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 772usize, @@ -2668,10 +2837,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_pred_weights)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_log2_weight_denom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2681,10 +2847,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_log2_weight_denom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_log2_weight_denom) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2694,10 +2857,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).weight_factors as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).weight_factors) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2707,6 +2867,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); } +#[doc = " struct v4l2_h264_reference - H264 picture reference\n\n @fields: indicates how the picture is referenced.\n Valid values are V4L2_H264_{}_REF.\n @index: index into v4l2_ctrl_h264_decode_params.dpb[]."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_h264_reference { @@ -2715,6 +2876,8 @@ pub struct v4l2_h264_reference { } #[test] fn bindgen_test_layout_v4l2_h264_reference() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -2726,7 +2889,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { concat!("Alignment of ", stringify!(v4l2_h264_reference)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fields as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fields) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2736,7 +2899,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2746,6 +2909,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { ) ); } +#[doc = " struct v4l2_ctrl_h264_slice_params - H264 slice parameters\n\n This structure holds the H264 syntax elements that are specified\n as non-invariant for the slices in a given frame.\n\n Slice invariant syntax elements are contained in struct\n v4l2_ctrl_h264_decode_params. This is done to reduce the API surface\n on frame-based decoders, where slice header parsing is done by the\n hardware.\n\n Slice invariant syntax elements are specified in specification section\n \"7.4.3 Slice header semantics\".\n\n Except where noted, the members on this struct match the slice header syntax.\n\n @header_bit_size: offset in bits to slice_data() from the beginning of this slice.\n @first_mb_in_slice: see H264 specification.\n @slice_type: see H264 specification.\n @colour_plane_id: see H264 specification.\n @redundant_pic_cnt: see H264 specification.\n @cabac_init_idc: see H264 specification.\n @slice_qp_delta: see H264 specification.\n @slice_qs_delta: see H264 specification.\n @disable_deblocking_filter_idc: see H264 specification.\n @slice_alpha_c0_offset_div2: see H264 specification.\n @slice_beta_offset_div2: see H264 specification.\n @num_ref_idx_l0_active_minus1: see H264 specification.\n @num_ref_idx_l1_active_minus1: see H264 specification.\n @reserved: padding field. Should be zeroed by applications.\n @ref_pic_list0: reference picture list 0 after applying the per-slice modifications.\n @ref_pic_list1: reference picture list 1 after applying the per-slice modifications.\n @flags: see V4L2_H264_SLICE_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_slice_params { @@ -2769,6 +2933,9 @@ pub struct v4l2_ctrl_h264_slice_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 152usize, @@ -2780,10 +2947,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_slice_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).header_bit_size as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).header_bit_size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2793,10 +2957,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).first_mb_in_slice as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).first_mb_in_slice) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2806,9 +2967,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2818,10 +2977,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colour_plane_id as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colour_plane_id) as usize - ptr as usize }, 9usize, concat!( "Offset of field: ", @@ -2831,10 +2987,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).redundant_pic_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).redundant_pic_cnt) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2844,10 +2997,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cabac_init_idc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).cabac_init_idc) as usize - ptr as usize }, 11usize, concat!( "Offset of field: ", @@ -2857,10 +3007,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_qp_delta as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_qp_delta) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -2870,10 +3017,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_qs_delta as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_qs_delta) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -2884,8 +3028,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).disable_deblocking_filter_idc - as *const _ as usize + ::std::ptr::addr_of!((*ptr).disable_deblocking_filter_idc) as usize - ptr as usize }, 14usize, concat!( @@ -2896,10 +3039,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_alpha_c0_offset_div2 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_alpha_c0_offset_div2) as usize - ptr as usize }, 15usize, concat!( "Offset of field: ", @@ -2909,10 +3049,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_beta_offset_div2 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2923,8 +3060,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l0_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize }, 17usize, concat!( @@ -2936,8 +3072,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l1_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize }, 18usize, concat!( @@ -2948,9 +3083,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 19usize, concat!( "Offset of field: ", @@ -2960,10 +3093,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ref_pic_list0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_pic_list0) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -2973,10 +3103,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ref_pic_list1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_pic_list1) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -2986,9 +3113,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 148usize, concat!( "Offset of field: ", @@ -2998,6 +3123,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); } +#[doc = " struct v4l2_h264_dpb_entry - H264 decoded picture buffer entry\n\n @reference_ts: timestamp of the V4L2 capture buffer to use as reference.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @pic_num: matches PicNum variable assigned during the reference\n picture lists construction process.\n @frame_num: frame identifier which matches frame_num syntax element.\n @fields: indicates how the DPB entry is referenced. Valid values are\n V4L2_H264_{}_REF.\n @reserved: padding field. Should be zeroed by applications.\n @top_field_order_cnt: matches TopFieldOrderCnt picture value.\n @bottom_field_order_cnt: matches BottomFieldOrderCnt picture value.\n Note that picture field is indicated by v4l2_buffer.field.\n @flags: see V4L2_H264_DPB_ENTRY_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_h264_dpb_entry { @@ -3012,6 +3138,8 @@ pub struct v4l2_h264_dpb_entry { } #[test] fn bindgen_test_layout_v4l2_h264_dpb_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -3023,9 +3151,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { concat!("Alignment of ", stringify!(v4l2_h264_dpb_entry)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reference_ts as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reference_ts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3035,7 +3161,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pic_num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_num) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3045,7 +3171,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frame_num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3055,7 +3181,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fields as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fields) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -3065,7 +3191,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 15usize, concat!( "Offset of field: ", @@ -3075,9 +3201,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).top_field_order_cnt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).top_field_order_cnt) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3087,10 +3211,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bottom_field_order_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bottom_field_order_cnt) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3100,7 +3221,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3110,6 +3231,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); } +#[doc = " struct v4l2_ctrl_h264_decode_params - H264 decoding parameters\n\n @dpb: decoded picture buffer.\n @nal_ref_idc: slice header syntax element.\n @frame_num: slice header syntax element.\n @top_field_order_cnt: matches TopFieldOrderCnt picture value.\n @bottom_field_order_cnt: matches BottomFieldOrderCnt picture value.\n Note that picture field is indicated by v4l2_buffer.field.\n @idr_pic_id: slice header syntax element.\n @pic_order_cnt_lsb: slice header syntax element.\n @delta_pic_order_cnt_bottom: slice header syntax element.\n @delta_pic_order_cnt0: slice header syntax element.\n @delta_pic_order_cnt1: slice header syntax element.\n @dec_ref_pic_marking_bit_size: size in bits of dec_ref_pic_marking()\n syntax element.\n @pic_order_cnt_bit_size: size in bits of pic order count syntax.\n @slice_group_change_cycle: slice header syntax element.\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_H264_DECODE_PARAM_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_decode_params { @@ -3131,6 +3253,9 @@ pub struct v4l2_ctrl_h264_decode_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 560usize, @@ -3142,9 +3267,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_decode_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dpb as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).dpb) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3154,10 +3277,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nal_ref_idc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).nal_ref_idc) as usize - ptr as usize }, 512usize, concat!( "Offset of field: ", @@ -3167,9 +3287,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_num as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, 514usize, concat!( "Offset of field: ", @@ -3179,10 +3297,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).top_field_order_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).top_field_order_cnt) as usize - ptr as usize }, 516usize, concat!( "Offset of field: ", @@ -3192,10 +3307,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bottom_field_order_cnt - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bottom_field_order_cnt) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -3205,9 +3317,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).idr_pic_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -3217,10 +3327,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_lsb as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_lsb) as usize - ptr as usize }, 526usize, concat!( "Offset of field: ", @@ -3230,10 +3337,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt_bottom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt_bottom) as usize - ptr as usize }, 528usize, concat!( "Offset of field: ", @@ -3243,10 +3347,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt0 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt0) as usize - ptr as usize }, 532usize, concat!( "Offset of field: ", @@ -3256,10 +3357,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt1 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt1) as usize - ptr as usize }, 536usize, concat!( "Offset of field: ", @@ -3270,8 +3368,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).dec_ref_pic_marking_bit_size - as *const _ as usize + ::std::ptr::addr_of!((*ptr).dec_ref_pic_marking_bit_size) as usize - ptr as usize }, 540usize, concat!( @@ -3282,10 +3379,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_bit_size - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_bit_size) as usize - ptr as usize }, 544usize, concat!( "Offset of field: ", @@ -3295,10 +3389,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_group_change_cycle - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_group_change_cycle) as usize - ptr as usize }, 548usize, concat!( "Offset of field: ", @@ -3308,9 +3399,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 552usize, concat!( "Offset of field: ", @@ -3320,9 +3409,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 556usize, concat!( "Offset of field: ", @@ -3332,6 +3419,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); } +#[doc = " struct v4l2_ctrl_fwht_params - FWHT parameters\n\n @backward_ref_ts: timestamp of the V4L2 capture buffer to use as reference.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @version: must be V4L2_FWHT_VERSION.\n @width: width of frame.\n @height: height of frame.\n @flags: FWHT flags (see V4L2_FWHT_FL_*).\n @colorspace: the colorspace (enum v4l2_colorspace).\n @xfer_func: the transfer function (enum v4l2_xfer_func).\n @ycbcr_enc: the Y'CbCr encoding (enum v4l2_ycbcr_encoding).\n @quantization: the quantization (enum v4l2_quantization)."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_fwht_params { @@ -3347,6 +3435,9 @@ pub struct v4l2_ctrl_fwht_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_fwht_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -3358,9 +3449,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_fwht_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backward_ref_ts as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).backward_ref_ts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3370,7 +3459,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3380,7 +3469,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3390,7 +3479,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3400,7 +3489,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3410,9 +3499,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3422,7 +3509,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).xfer_func as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3432,7 +3519,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ycbcr_enc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -3442,9 +3529,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).quantization as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -3454,198 +3539,3484 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); } -pub const v4l2_field_V4L2_FIELD_ANY: v4l2_field = 0; -pub const v4l2_field_V4L2_FIELD_NONE: v4l2_field = 1; -pub const v4l2_field_V4L2_FIELD_TOP: v4l2_field = 2; -pub const v4l2_field_V4L2_FIELD_BOTTOM: v4l2_field = 3; -pub const v4l2_field_V4L2_FIELD_INTERLACED: v4l2_field = 4; -pub const v4l2_field_V4L2_FIELD_SEQ_TB: v4l2_field = 5; -pub const v4l2_field_V4L2_FIELD_SEQ_BT: v4l2_field = 6; -pub const v4l2_field_V4L2_FIELD_ALTERNATE: v4l2_field = 7; -pub const v4l2_field_V4L2_FIELD_INTERLACED_TB: v4l2_field = 8; -pub const v4l2_field_V4L2_FIELD_INTERLACED_BT: v4l2_field = 9; -pub type v4l2_field = ::std::os::raw::c_uint; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE: v4l2_buf_type = 1; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT: v4l2_buf_type = 2; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OVERLAY: v4l2_buf_type = 3; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_CAPTURE: v4l2_buf_type = 4; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_OUTPUT: v4l2_buf_type = 5; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: v4l2_buf_type = 6; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: v4l2_buf_type = 7; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: v4l2_buf_type = 8; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: v4l2_buf_type = 9; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: v4l2_buf_type = 10; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_CAPTURE: v4l2_buf_type = 11; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_OUTPUT: v4l2_buf_type = 12; -pub const v4l2_buf_type_V4L2_BUF_TYPE_META_CAPTURE: v4l2_buf_type = 13; -pub const v4l2_buf_type_V4L2_BUF_TYPE_META_OUTPUT: v4l2_buf_type = 14; -pub const v4l2_buf_type_V4L2_BUF_TYPE_PRIVATE: v4l2_buf_type = 128; -pub type v4l2_buf_type = ::std::os::raw::c_uint; -pub const v4l2_tuner_type_V4L2_TUNER_RADIO: v4l2_tuner_type = 1; -pub const v4l2_tuner_type_V4L2_TUNER_ANALOG_TV: v4l2_tuner_type = 2; -pub const v4l2_tuner_type_V4L2_TUNER_DIGITAL_TV: v4l2_tuner_type = 3; -pub const v4l2_tuner_type_V4L2_TUNER_SDR: v4l2_tuner_type = 4; -pub const v4l2_tuner_type_V4L2_TUNER_RF: v4l2_tuner_type = 5; -pub type v4l2_tuner_type = ::std::os::raw::c_uint; -pub const v4l2_memory_V4L2_MEMORY_MMAP: v4l2_memory = 1; -pub const v4l2_memory_V4L2_MEMORY_USERPTR: v4l2_memory = 2; -pub const v4l2_memory_V4L2_MEMORY_OVERLAY: v4l2_memory = 3; -pub const v4l2_memory_V4L2_MEMORY_DMABUF: v4l2_memory = 4; -pub type v4l2_memory = ::std::os::raw::c_uint; -pub const v4l2_colorspace_V4L2_COLORSPACE_DEFAULT: v4l2_colorspace = 0; -pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE170M: v4l2_colorspace = 1; -pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE240M: v4l2_colorspace = 2; -pub const v4l2_colorspace_V4L2_COLORSPACE_REC709: v4l2_colorspace = 3; -pub const v4l2_colorspace_V4L2_COLORSPACE_BT878: v4l2_colorspace = 4; -pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_M: v4l2_colorspace = 5; -pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_BG: v4l2_colorspace = 6; -pub const v4l2_colorspace_V4L2_COLORSPACE_JPEG: v4l2_colorspace = 7; -pub const v4l2_colorspace_V4L2_COLORSPACE_SRGB: v4l2_colorspace = 8; -pub const v4l2_colorspace_V4L2_COLORSPACE_OPRGB: v4l2_colorspace = 9; -pub const v4l2_colorspace_V4L2_COLORSPACE_BT2020: v4l2_colorspace = 10; -pub const v4l2_colorspace_V4L2_COLORSPACE_RAW: v4l2_colorspace = 11; -pub const v4l2_colorspace_V4L2_COLORSPACE_DCI_P3: v4l2_colorspace = 12; -pub type v4l2_colorspace = ::std::os::raw::c_uint; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_DEFAULT: v4l2_xfer_func = 0; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_709: v4l2_xfer_func = 1; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SRGB: v4l2_xfer_func = 2; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_OPRGB: v4l2_xfer_func = 3; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE240M: v4l2_xfer_func = 4; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_NONE: v4l2_xfer_func = 5; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_DCI_P3: v4l2_xfer_func = 6; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE2084: v4l2_xfer_func = 7; -pub type v4l2_xfer_func = ::std::os::raw::c_uint; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_DEFAULT: v4l2_ycbcr_encoding = 0; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_601: v4l2_ycbcr_encoding = 1; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_709: v4l2_ycbcr_encoding = 2; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV601: v4l2_ycbcr_encoding = 3; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV709: v4l2_ycbcr_encoding = 4; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SYCC: v4l2_ycbcr_encoding = 5; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020: v4l2_ycbcr_encoding = 6; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020_CONST_LUM: v4l2_ycbcr_encoding = 7; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SMPTE240M: v4l2_ycbcr_encoding = 8; -pub type v4l2_ycbcr_encoding = ::std::os::raw::c_uint; -pub const v4l2_hsv_encoding_V4L2_HSV_ENC_180: v4l2_hsv_encoding = 128; -pub const v4l2_hsv_encoding_V4L2_HSV_ENC_256: v4l2_hsv_encoding = 129; -pub type v4l2_hsv_encoding = ::std::os::raw::c_uint; -pub const v4l2_quantization_V4L2_QUANTIZATION_DEFAULT: v4l2_quantization = 0; -pub const v4l2_quantization_V4L2_QUANTIZATION_FULL_RANGE: v4l2_quantization = 1; -pub const v4l2_quantization_V4L2_QUANTIZATION_LIM_RANGE: v4l2_quantization = 2; -pub type v4l2_quantization = ::std::os::raw::c_uint; -pub const v4l2_priority_V4L2_PRIORITY_UNSET: v4l2_priority = 0; -pub const v4l2_priority_V4L2_PRIORITY_BACKGROUND: v4l2_priority = 1; -pub const v4l2_priority_V4L2_PRIORITY_INTERACTIVE: v4l2_priority = 2; -pub const v4l2_priority_V4L2_PRIORITY_RECORD: v4l2_priority = 3; -pub const v4l2_priority_V4L2_PRIORITY_DEFAULT: v4l2_priority = 2; -pub type v4l2_priority = ::std::os::raw::c_uint; +#[doc = " struct v4l2_vp8_segment - VP8 segment-based adjustments parameters\n\n @quant_update: update values for the segment quantizer.\n @lf_update: update values for the loop filter level.\n @segment_probs: branch probabilities of the segment_id decoding tree.\n @padding: padding field. Should be zeroed by applications.\n @flags: see V4L2_VP8_SEGMENT_FLAG_{}.\n\n This structure contains segment-based adjustments related parameters.\n See the 'update_segmentation()' part of the frame header syntax,\n and section '9.3. Segment-Based Adjustments' of the VP8 specification\n for more details."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct v4l2_rect { - pub left: __s32, - pub top: __s32, - pub width: __u32, - pub height: __u32, +pub struct v4l2_vp8_segment { + pub quant_update: [__s8; 4usize], + pub lf_update: [__s8; 4usize], + pub segment_probs: [__u8; 3usize], + pub padding: __u8, + pub flags: __u32, } #[test] -fn bindgen_test_layout_v4l2_rect() { +fn bindgen_test_layout_v4l2_vp8_segment() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(v4l2_rect)) + concat!("Size of: ", stringify!(v4l2_vp8_segment)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(v4l2_rect)) + concat!("Alignment of ", stringify!(v4l2_vp8_segment)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).left as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quant_update) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(left) + stringify!(quant_update) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).top as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).lf_update) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(top) + stringify!(lf_update) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).segment_probs) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(width) + stringify!(segment_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_segment), + "::", + stringify!(padding) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(height) + stringify!(flags) ) ); } +#[doc = " struct v4l2_vp8_loop_filter - VP8 loop filter parameters\n\n @ref_frm_delta: Reference frame signed delta values.\n @mb_mode_delta: MB prediction mode signed delta values.\n @sharpness_level: matches sharpness_level syntax element.\n @level: matches loop_filter_level syntax element.\n @padding: padding field. Should be zeroed by applications.\n @flags: see V4L2_VP8_LF_{}.\n\n This structure contains loop filter related parameters.\n See the 'mb_lf_adjustments()' part of the frame header syntax,\n and section '9.4. Loop Filter Type and Levels' of the VP8 specification\n for more details."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct v4l2_fract { - pub numerator: __u32, - pub denominator: __u32, +pub struct v4l2_vp8_loop_filter { + pub ref_frm_delta: [__s8; 4usize], + pub mb_mode_delta: [__s8; 4usize], + pub sharpness_level: __u8, + pub level: __u8, + pub padding: __u16, + pub flags: __u32, } #[test] -fn bindgen_test_layout_v4l2_fract() { +fn bindgen_test_layout_v4l2_vp8_loop_filter() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(v4l2_fract)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_vp8_loop_filter)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(v4l2_fract)) + concat!("Alignment of ", stringify!(v4l2_vp8_loop_filter)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).numerator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_frm_delta) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(v4l2_fract), + stringify!(v4l2_vp8_loop_filter), "::", - stringify!(numerator) + stringify!(ref_frm_delta) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).denominator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mb_mode_delta) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(v4l2_fract), + stringify!(v4l2_vp8_loop_filter), "::", - stringify!(denominator) + stringify!(mb_mode_delta) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct v4l2_area { - pub width: __u32, - pub height: __u32, + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharpness_level) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(sharpness_level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_vp8_quantization - VP8 quantizattion indices\n\n @y_ac_qi: luma AC coefficient table index.\n @y_dc_delta: luma DC delta vaue.\n @y2_dc_delta: y2 block DC delta value.\n @y2_ac_delta: y2 block AC delta value.\n @uv_dc_delta: chroma DC delta value.\n @uv_ac_delta: chroma AC delta value.\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the quantization indices present\n in 'quant_indices()' part of the frame header syntax.\n See section '9.6. Dequantization Indices' of the VP8 specification\n for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_quantization { + pub y_ac_qi: __u8, + pub y_dc_delta: __s8, + pub y2_dc_delta: __s8, + pub y2_ac_delta: __s8, + pub uv_dc_delta: __s8, + pub uv_ac_delta: __s8, + pub padding: __u16, +} +#[test] +fn bindgen_test_layout_v4l2_vp8_quantization() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_vp8_quantization)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_vp8_quantization)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_ac_qi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y_ac_qi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_dc_delta) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y2_dc_delta) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y2_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y2_ac_delta) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y2_ac_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_dc_delta) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(uv_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_ac_delta) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(uv_ac_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_vp8_entropy - VP8 update probabilities\n\n @coeff_probs: coefficient probability update values.\n @y_mode_probs: luma intra-prediction probabilities.\n @uv_mode_probs: chroma intra-prediction probabilities.\n @mv_probs: mv decoding probability.\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the update probabilities present in\n 'token_prob_update()' and 'mv_prob_update()' part of the frame header.\n See section '17.2. Probability Updates' of the VP8 specification\n for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_entropy { + pub coeff_probs: [[[[__u8; 11usize]; 3usize]; 8usize]; 4usize], + pub y_mode_probs: [__u8; 4usize], + pub uv_mode_probs: [__u8; 3usize], + pub mv_probs: [[__u8; 19usize]; 2usize], + pub padding: [__u8; 3usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp8_entropy() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1104usize, + concat!("Size of: ", stringify!(v4l2_vp8_entropy)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp8_entropy)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coeff_probs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(coeff_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_mode_probs) as usize - ptr as usize }, + 1056usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(y_mode_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_mode_probs) as usize - ptr as usize }, + 1060usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(uv_mode_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mv_probs) as usize - ptr as usize }, + 1063usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(mv_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 1101usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_vp8_entropy_coder_state - VP8 boolean coder state\n\n @range: coder state value for \"Range\"\n @value: coder state value for \"Value\"\n @bit_count: number of bits left in range \"Value\".\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the state for the boolean coder, as\n explained in section '7. Boolean Entropy Decoder' of the VP8 specification."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_entropy_coder_state { + pub range: __u8, + pub value: __u8, + pub bit_count: __u8, + pub padding: __u8, +} +#[test] +fn bindgen_test_layout_v4l2_vp8_entropy_coder_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(v4l2_vp8_entropy_coder_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp8_entropy_coder_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).range) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(range) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_count) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(bit_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp8_frame - VP8 frame parameters\n\n @segment: segmentation parameters. See &v4l2_vp8_segment for more details\n @lf: loop filter parameters. See &v4l2_vp8_loop_filter for more details\n @quant: quantization parameters. See &v4l2_vp8_quantization for more details\n @entropy: update probabilities. See &v4l2_vp8_entropy for more details\n @coder_state: boolean coder state. See &v4l2_vp8_entropy_coder_state for more details\n @width: frame width.\n @height: frame height.\n @horizontal_scale: horizontal scaling factor.\n @vertical_scale: vertical scaling factor.\n @version: bitstream version.\n @prob_skip_false: frame header syntax element.\n @prob_intra: frame header syntax element.\n @prob_last: frame header syntax element.\n @prob_gf: frame header syntax element.\n @num_dct_parts: number of DCT coefficients partitions.\n @first_part_size: size of the first partition, i.e. the control partition.\n @first_part_header_bits: size in bits of the first partition header portion.\n @dct_part_sizes: DCT coefficients sizes.\n @last_frame_ts: \"last\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @golden_frame_ts: \"golden\" reference buffer timestamp.\n @alt_frame_ts: \"alt\" reference buffer timestamp.\n @flags: see V4L2_VP8_FRAME_FLAG_{}."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp8_frame { + pub segment: v4l2_vp8_segment, + pub lf: v4l2_vp8_loop_filter, + pub quant: v4l2_vp8_quantization, + pub entropy: v4l2_vp8_entropy, + pub coder_state: v4l2_vp8_entropy_coder_state, + pub width: __u16, + pub height: __u16, + pub horizontal_scale: __u8, + pub vertical_scale: __u8, + pub version: __u8, + pub prob_skip_false: __u8, + pub prob_intra: __u8, + pub prob_last: __u8, + pub prob_gf: __u8, + pub num_dct_parts: __u8, + pub first_part_size: __u32, + pub first_part_header_bits: __u32, + pub dct_part_sizes: [__u32; 8usize], + pub last_frame_ts: __u64, + pub golden_frame_ts: __u64, + pub alt_frame_ts: __u64, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp8_frame() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1232usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp8_frame)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp8_frame)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).segment) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(segment) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lf) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(lf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).quant) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(quant) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entropy) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(entropy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coder_state) as usize - ptr as usize }, + 1144usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(coder_state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 1148usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 1150usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).horizontal_scale) as usize - ptr as usize }, + 1152usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(horizontal_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vertical_scale) as usize - ptr as usize }, + 1153usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(vertical_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 1154usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_skip_false) as usize - ptr as usize }, + 1155usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_skip_false) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_intra) as usize - ptr as usize }, + 1156usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_intra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_last) as usize - ptr as usize }, + 1157usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_last) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_gf) as usize - ptr as usize }, + 1158usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_gf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_dct_parts) as usize - ptr as usize }, + 1159usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(num_dct_parts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_part_size) as usize - ptr as usize }, + 1160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(first_part_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_part_header_bits) as usize - ptr as usize }, + 1164usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(first_part_header_bits) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dct_part_sizes) as usize - ptr as usize }, + 1168usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(dct_part_sizes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_frame_ts) as usize - ptr as usize }, + 1200usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(last_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).golden_frame_ts) as usize - ptr as usize }, + 1208usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(golden_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alt_frame_ts) as usize - ptr as usize }, + 1216usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(alt_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 1224usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_sequence - MPEG-2 sequence header\n\n All the members on this structure match the sequence header and sequence\n extension syntaxes as specified by the MPEG-2 specification.\n\n Fields horizontal_size, vertical_size and vbv_buffer_size are a\n combination of respective _value and extension syntax elements,\n as described in section 6.3.3 \"Sequence header\".\n\n @horizontal_size: combination of elements horizontal_size_value and\n horizontal_size_extension.\n @vertical_size: combination of elements vertical_size_value and\n vertical_size_extension.\n @vbv_buffer_size: combination of elements vbv_buffer_size_value and\n vbv_buffer_size_extension.\n @profile_and_level_indication: see MPEG-2 specification.\n @chroma_format: see MPEG-2 specification.\n @flags: see V4L2_MPEG2_SEQ_FLAG_{}."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_sequence { + pub horizontal_size: __u16, + pub vertical_size: __u16, + pub vbv_buffer_size: __u32, + pub profile_and_level_indication: __u16, + pub chroma_format: __u8, + pub flags: __u8, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_sequence() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_sequence)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_sequence)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).horizontal_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(horizontal_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vertical_size) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(vertical_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vbv_buffer_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(vbv_buffer_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).profile_and_level_indication) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(profile_and_level_indication) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(chroma_format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_picture - MPEG-2 picture header\n\n All the members on this structure match the picture header and picture\n coding extension syntaxes as specified by the MPEG-2 specification.\n\n @backward_ref_ts: timestamp of the V4L2 capture buffer to use as\n reference for backward prediction.\n @forward_ref_ts: timestamp of the V4L2 capture buffer to use as\n reference for forward prediction. These timestamp refers to the\n timestamp field in struct v4l2_buffer. Use v4l2_timeval_to_ns()\n to convert the struct timeval to a __u64.\n @flags: see V4L2_MPEG2_PIC_FLAG_{}.\n @f_code: see MPEG-2 specification.\n @picture_coding_type: see MPEG-2 specification.\n @picture_structure: see V4L2_MPEG2_PIC_{}_FIELD.\n @intra_dc_precision: see MPEG-2 specification.\n @reserved: padding field. Should be zeroed by applications."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_picture { + pub backward_ref_ts: __u64, + pub forward_ref_ts: __u64, + pub flags: __u32, + pub f_code: [[__u8; 2usize]; 2usize], + pub picture_coding_type: __u8, + pub picture_structure: __u8, + pub intra_dc_precision: __u8, + pub reserved: [__u8; 5usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_picture() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_picture)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_picture)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).backward_ref_ts) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(backward_ref_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).forward_ref_ts) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(forward_ref_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f_code) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(f_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).picture_coding_type) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(picture_coding_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).picture_structure) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(picture_structure) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intra_dc_precision) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(intra_dc_precision) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_quantisation - MPEG-2 quantisation\n\n Quantisation matrices as specified by section 6.3.7\n \"Quant matrix extension\".\n\n @intra_quantiser_matrix: The quantisation matrix coefficients\n for intra-coded frames, in zigzag scanning order. It is relevant\n for both luma and chroma components, although it can be superseded\n by the chroma-specific matrix for non-4:2:0 YUV formats.\n @non_intra_quantiser_matrix: The quantisation matrix coefficients\n for non-intra-coded frames, in zigzag scanning order. It is relevant\n for both luma and chroma components, although it can be superseded\n by the chroma-specific matrix for non-4:2:0 YUV formats.\n @chroma_intra_quantiser_matrix: The quantisation matrix coefficients\n for the chominance component of intra-coded frames, in zigzag scanning\n order. Only relevant for 4:2:2 and 4:4:4 YUV formats.\n @chroma_non_intra_quantiser_matrix: The quantisation matrix coefficients\n for the chrominance component of non-intra-coded frames, in zigzag scanning\n order. Only relevant for 4:2:2 and 4:4:4 YUV formats."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_quantisation { + pub intra_quantiser_matrix: [__u8; 64usize], + pub non_intra_quantiser_matrix: [__u8; 64usize], + pub chroma_intra_quantiser_matrix: [__u8; 64usize], + pub chroma_non_intra_quantiser_matrix: [__u8; 64usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_quantisation() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_quantisation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_quantisation)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intra_quantiser_matrix) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).non_intra_quantiser_matrix) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(non_intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_intra_quantiser_matrix) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(chroma_intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_non_intra_quantiser_matrix) as usize - ptr as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(chroma_non_intra_quantiser_matrix) + ) + ); +} +pub const v4l2_stateless_hevc_decode_mode_V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED: + v4l2_stateless_hevc_decode_mode = 0; +pub const v4l2_stateless_hevc_decode_mode_V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED: + v4l2_stateless_hevc_decode_mode = 1; +pub type v4l2_stateless_hevc_decode_mode = ::std::os::raw::c_uint; +pub const v4l2_stateless_hevc_start_code_V4L2_STATELESS_HEVC_START_CODE_NONE: + v4l2_stateless_hevc_start_code = 0; +pub const v4l2_stateless_hevc_start_code_V4L2_STATELESS_HEVC_START_CODE_ANNEX_B: + v4l2_stateless_hevc_start_code = 1; +pub type v4l2_stateless_hevc_start_code = ::std::os::raw::c_uint; +#[doc = " struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set\n\n @video_parameter_set_id: specifies the value of the\n\t\t\tvps_video_parameter_set_id of the active VPS\n @seq_parameter_set_id: provides an identifier for the SPS for\n\t\t\t reference by other syntax elements\n @pic_width_in_luma_samples:\tspecifies the width of each decoded picture\n\t\t\t\tin units of luma samples\n @pic_height_in_luma_samples: specifies the height of each decoded picture\n\t\t\t\tin units of luma samples\n @bit_depth_luma_minus8: this value plus 8specifies the bit depth of the\n samples of the luma array\n @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the\n samples of the chroma arrays\n @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value of\n the variable MaxPicOrderCntLsb\n @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum\n required size of the decoded picture\n buffer for the codec video sequence\n @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures\n @sps_max_latency_increase_plus1: not equal to 0 is used to compute the\n\t\t\t\t value of SpsMaxLatencyPictures array\n @log2_min_luma_coding_block_size_minus3: plus 3 specifies the minimum\n\t\t\t\t\t luma coding block size\n @log2_diff_max_min_luma_coding_block_size: specifies the difference between\n\t\t\t\t\t the maximum and minimum luma\n\t\t\t\t\t coding block size\n @log2_min_luma_transform_block_size_minus2: plus 2 specifies the minimum luma\n\t\t\t\t\t transform block size\n @log2_diff_max_min_luma_transform_block_size: specifies the difference between\n\t\t\t\t\t\t the maximum and minimum luma\n\t\t\t\t\t\t transform block size\n @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy\n\t\t\t\t\t depth for transform units of\n\t\t\t\t\t coding units coded in inter\n\t\t\t\t\t prediction mode\n @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy\n\t\t\t\t\t depth for transform units of\n\t\t\t\t\t coding units coded in intra\n\t\t\t\t\t prediction mode\n @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of\n bits used to represent each of PCM sample\n values of the luma component\n @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number\n of bits used to represent each of PCM\n sample values of the chroma components\n @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the\n minimum size of coding blocks\n @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between\n\t\t\t\t\t\t the maximum and minimum size of\n\t\t\t\t\t\t coding blocks\n @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set()\n\t\t\t\t syntax structures included in the SPS\n @num_long_term_ref_pics_sps: specifies the number of candidate long-term\n\t\t\t\treference pictures that are specified in the SPS\n @chroma_format_idc: specifies the chroma sampling\n @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number\n of temporal sub-layers\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_SPS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_sps { + pub video_parameter_set_id: __u8, + pub seq_parameter_set_id: __u8, + pub pic_width_in_luma_samples: __u16, + pub pic_height_in_luma_samples: __u16, + pub bit_depth_luma_minus8: __u8, + pub bit_depth_chroma_minus8: __u8, + pub log2_max_pic_order_cnt_lsb_minus4: __u8, + pub sps_max_dec_pic_buffering_minus1: __u8, + pub sps_max_num_reorder_pics: __u8, + pub sps_max_latency_increase_plus1: __u8, + pub log2_min_luma_coding_block_size_minus3: __u8, + pub log2_diff_max_min_luma_coding_block_size: __u8, + pub log2_min_luma_transform_block_size_minus2: __u8, + pub log2_diff_max_min_luma_transform_block_size: __u8, + pub max_transform_hierarchy_depth_inter: __u8, + pub max_transform_hierarchy_depth_intra: __u8, + pub pcm_sample_bit_depth_luma_minus1: __u8, + pub pcm_sample_bit_depth_chroma_minus1: __u8, + pub log2_min_pcm_luma_coding_block_size_minus3: __u8, + pub log2_diff_max_min_pcm_luma_coding_block_size: __u8, + pub num_short_term_ref_pic_sets: __u8, + pub num_long_term_ref_pics_sps: __u8, + pub chroma_format_idc: __u8, + pub sps_max_sub_layers_minus1: __u8, + pub reserved: [__u8; 6usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_sps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_sps)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_sps)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).video_parameter_set_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_luma_samples) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pic_width_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_height_in_luma_samples) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pic_height_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(bit_depth_luma_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(bit_depth_chroma_minus8) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_max_pic_order_cnt_lsb_minus4) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sps_max_dec_pic_buffering_minus1) as usize - ptr as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_dec_pic_buffering_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_max_num_reorder_pics) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_num_reorder_pics) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sps_max_latency_increase_plus1) as usize - ptr as usize + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_latency_increase_plus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_luma_coding_block_size_minus3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_coding_block_size) as usize + - ptr as usize + }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_luma_transform_block_size_minus2) as usize + - ptr as usize + }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_luma_transform_block_size_minus2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_transform_block_size) as usize + - ptr as usize + }, + 15usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_luma_transform_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_inter) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(max_transform_hierarchy_depth_inter) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_intra) as usize - ptr as usize + }, + 17usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(max_transform_hierarchy_depth_intra) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_luma_minus1) as usize - ptr as usize + }, + 18usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pcm_sample_bit_depth_luma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_chroma_minus1) as usize - ptr as usize + }, + 19usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pcm_sample_bit_depth_chroma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_pcm_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_pcm_luma_coding_block_size_minus3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_pcm_luma_coding_block_size) as usize + - ptr as usize + }, + 21usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_pcm_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_long_term_ref_pics_sps) as usize - ptr as usize }, + 23usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(num_long_term_ref_pics_sps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_max_sub_layers_minus1) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_sub_layers_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set\n\n @pic_parameter_set_id: identifies the PPS for reference by other\n\t\t\t syntax elements\n @num_extra_slice_header_bits: specifies the number of extra slice header\n\t\t\t\t bits that are present in the slice header RBSP\n\t\t\t\t for coded pictures referring to the PPS.\n @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the\n inferred value of num_ref_idx_l0_active_minus1\n @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the\n inferred value of num_ref_idx_l1_active_minus1\n @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y for\n\t\t each slice referring to the PPS\n @diff_cu_qp_delta_depth: specifies the difference between the luma coding\n\t\t\t tree block size and the minimum luma coding block\n\t\t\t size of coding units that convey cu_qp_delta_abs\n\t\t\t and cu_qp_delta_sign_flag\n @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb\n @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr\n @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns\n\t\t\t partitioning the picture\n @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows partitioning\n\t\t\t the picture\n @column_width_minus1: this value plus 1 specifies the width of the each tile column in\n\t\t\t units of coding tree blocks\n @row_height_minus1: this value plus 1 specifies the height of the each tile row in\n\t\t units of coding tree blocks\n @pps_beta_offset_div2: specify the default deblocking parameter offsets for\n\t\t\t beta divided by 2\n @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC\n\t\t\tdivided by 2\n @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of\n the variable Log2ParMrgLevel\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_PPS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_pps { + pub pic_parameter_set_id: __u8, + pub num_extra_slice_header_bits: __u8, + pub num_ref_idx_l0_default_active_minus1: __u8, + pub num_ref_idx_l1_default_active_minus1: __u8, + pub init_qp_minus26: __s8, + pub diff_cu_qp_delta_depth: __u8, + pub pps_cb_qp_offset: __s8, + pub pps_cr_qp_offset: __s8, + pub num_tile_columns_minus1: __u8, + pub num_tile_rows_minus1: __u8, + pub column_width_minus1: [__u8; 20usize], + pub row_height_minus1: [__u8; 22usize], + pub pps_beta_offset_div2: __s8, + pub pps_tc_offset_div2: __s8, + pub log2_parallel_merge_level_minus2: __u8, + pub reserved: __u8, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_pps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_pps)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_pps)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_extra_slice_header_bits) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_extra_slice_header_bits) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_ref_idx_l0_default_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize + }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_ref_idx_l1_default_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).init_qp_minus26) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(init_qp_minus26) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).diff_cu_qp_delta_depth) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(diff_cu_qp_delta_depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cb_qp_offset) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cr_qp_offset) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_columns_minus1) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_tile_columns_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_rows_minus1) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_tile_rows_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).column_width_minus1) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(column_width_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).row_height_minus1) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(row_height_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_beta_offset_div2) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_tc_offset_div2) as usize - ptr as usize }, + 53usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_parallel_merge_level_minus2) as usize - ptr as usize + }, + 54usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(log2_parallel_merge_level_minus2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 55usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry\n\n @timestamp: timestamp of the V4L2 capture buffer to use as reference.\n @flags: long term flag for the reference frame\n @field_pic: whether the reference is a field picture or a frame.\n @reserved: padding field. Should be zeroed by applications.\n @pic_order_cnt_val: the picture order count of the current picture."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_hevc_dpb_entry { + pub timestamp: __u64, + pub flags: __u8, + pub field_pic: __u8, + pub reserved: __u16, + pub pic_order_cnt_val: __s32, +} +#[test] +fn bindgen_test_layout_v4l2_hevc_dpb_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_hevc_dpb_entry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_hevc_dpb_entry)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(timestamp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).field_pic) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(field_pic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_val) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(pic_order_cnt_val) + ) + ); +} +#[doc = " struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters\n\n @delta_luma_weight_l0: the difference of the weighting factor applied\n\t\t\t to the luma prediction value for list 0\n @luma_offset_l0: the additive offset applied to the luma prediction value\n\t\t for list 0\n @delta_chroma_weight_l0: the difference of the weighting factor applied\n\t\t\t to the chroma prediction values for list 0\n @chroma_offset_l0: the difference of the additive offset applied to\n\t\t the chroma prediction values for list 0\n @delta_luma_weight_l1: the difference of the weighting factor applied\n\t\t\t to the luma prediction value for list 1\n @luma_offset_l1: the additive offset applied to the luma prediction value\n\t\t for list 1\n @delta_chroma_weight_l1: the difference of the weighting factor applied\n\t\t\t to the chroma prediction values for list 1\n @chroma_offset_l1: the difference of the additive offset applied to\n\t\t the chroma prediction values for list 1\n @luma_log2_weight_denom: the base 2 logarithm of the denominator for\n\t\t\t all luma weighting factors\n @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm\n\t\t\t\t of the denominator for all chroma\n\t\t\t\t weighting factors"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_hevc_pred_weight_table { + pub delta_luma_weight_l0: [__s8; 16usize], + pub luma_offset_l0: [__s8; 16usize], + pub delta_chroma_weight_l0: [[__s8; 2usize]; 16usize], + pub chroma_offset_l0: [[__s8; 2usize]; 16usize], + pub delta_luma_weight_l1: [__s8; 16usize], + pub luma_offset_l1: [__s8; 16usize], + pub delta_chroma_weight_l1: [[__s8; 2usize]; 16usize], + pub chroma_offset_l1: [[__s8; 2usize]; 16usize], + pub luma_log2_weight_denom: __u8, + pub delta_chroma_log2_weight_denom: __s8, +} +#[test] +fn bindgen_test_layout_v4l2_hevc_pred_weight_table() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 194usize, + concat!("Size of: ", stringify!(v4l2_hevc_pred_weight_table)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_hevc_pred_weight_table)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l0) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_luma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l0) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l0) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(chroma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l1) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_luma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l1) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l1) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(chroma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).delta_chroma_log2_weight_denom) as usize - ptr as usize + }, + 193usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_log2_weight_denom) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters\n\n This control is a dynamically sized 1-dimensional array,\n V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.\n\n @bit_size: size (in bits) of the current slice data\n @data_byte_offset: offset (in bytes) to the video data in the current slice data\n @num_entry_point_offsets: specifies the number of entry point offset syntax\n\t\t\t elements in the slice header.\n @nal_unit_type: specifies the coding type of the slice (B, P or I)\n @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit\n @slice_type: see V4L2_HEVC_SLICE_TYPE_{}\n @colour_plane_id: specifies the colour plane associated with the current slice\n @slice_pic_order_cnt: specifies the picture order count\n @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum\n reference index for reference picture list 0\n that may be used to decode the slice\n @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum\n reference index for reference picture list 1\n that may be used to decode the slice\n @collocated_ref_idx: specifies the reference index of the collocated picture used\n\t\t\tfor temporal motion vector prediction\n @five_minus_max_num_merge_cand: specifies the maximum number of merging\n\t\t\t\t motion vector prediction candidates supported in\n\t\t\t\t the slice subtracted from 5\n @slice_qp_delta: specifies the initial value of QpY to be used for the coding\n\t\t blocks in the slice\n @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset\n @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset\n @slice_act_y_qp_offset: screen content extension parameters\n @slice_act_cb_qp_offset: screen content extension parameters\n @slice_act_cr_qp_offset: screen content extension parameters\n @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2\n @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2\n @pic_struct: indicates whether a picture should be displayed as a frame or as one or\n\t\tmore fields\n @reserved0: padding field. Should be zeroed by applications.\n @slice_segment_addr: specifies the address of the first coding tree block in\n\t\t\tthe slice segment\n @ref_idx_l0: the list of L0 reference elements as indices in the DPB\n @ref_idx_l1: the list of L1 reference elements as indices in the DPB\n @short_term_ref_pic_set_size: specifies the size of short-term reference\n\t\t\t\t pictures set included in the SPS\n @long_term_ref_pic_set_size: specifies the size of long-term reference\n\t\t\t\tpictures set include in the SPS\n @pred_weight_table: the prediction weight coefficients for inter-picture\n\t\t prediction\n @reserved1: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_slice_params { + pub bit_size: __u32, + pub data_byte_offset: __u32, + pub num_entry_point_offsets: __u32, + pub nal_unit_type: __u8, + pub nuh_temporal_id_plus1: __u8, + pub slice_type: __u8, + pub colour_plane_id: __u8, + pub slice_pic_order_cnt: __s32, + pub num_ref_idx_l0_active_minus1: __u8, + pub num_ref_idx_l1_active_minus1: __u8, + pub collocated_ref_idx: __u8, + pub five_minus_max_num_merge_cand: __u8, + pub slice_qp_delta: __s8, + pub slice_cb_qp_offset: __s8, + pub slice_cr_qp_offset: __s8, + pub slice_act_y_qp_offset: __s8, + pub slice_act_cb_qp_offset: __s8, + pub slice_act_cr_qp_offset: __s8, + pub slice_beta_offset_div2: __s8, + pub slice_tc_offset_div2: __s8, + pub pic_struct: __u8, + pub reserved0: [__u8; 3usize], + pub slice_segment_addr: __u32, + pub ref_idx_l0: [__u8; 16usize], + pub ref_idx_l1: [__u8; 16usize], + pub short_term_ref_pic_set_size: __u16, + pub long_term_ref_pic_set_size: __u16, + pub pred_weight_table: v4l2_hevc_pred_weight_table, + pub reserved1: [__u8; 2usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_slice_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 280usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_slice_params)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_slice_params)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(bit_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_byte_offset) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(data_byte_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_entry_point_offsets) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_entry_point_offsets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nal_unit_type) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(nal_unit_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nuh_temporal_id_plus1) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(nuh_temporal_id_plus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).colour_plane_id) as usize - ptr as usize }, + 15usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(colour_plane_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_pic_order_cnt) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_pic_order_cnt) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_ref_idx_l0_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize + }, + 21usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_ref_idx_l1_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).collocated_ref_idx) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(collocated_ref_idx) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).five_minus_max_num_merge_cand) as usize - ptr as usize + }, + 23usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(five_minus_max_num_merge_cand) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_qp_delta) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_qp_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cb_qp_offset) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cr_qp_offset) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_y_qp_offset) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_y_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cb_qp_offset) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cr_qp_offset) as usize - ptr as usize }, + 29usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_tc_offset_div2) as usize - ptr as usize }, + 31usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_struct) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(pic_struct) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(reserved0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_segment_addr) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_segment_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_idx_l0) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(ref_idx_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_idx_l1) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(ref_idx_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_size) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(short_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_ref_pic_set_size) as usize - ptr as usize }, + 74usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(long_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pred_weight_table) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(pred_weight_table) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 270usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters\n\n @pic_order_cnt_val: picture order count\n @short_term_ref_pic_set_size: specifies the size of short-term reference\n\t\t\t\t pictures set included in the SPS of the first slice\n @long_term_ref_pic_set_size: specifies the size of long-term reference\n\t\t\t\tpictures set include in the SPS of the first slice\n @num_active_dpb_entries: the number of entries in dpb\n @num_poc_st_curr_before: the number of reference pictures in the short-term\n\t\t\t set that come before the current frame\n @num_poc_st_curr_after: the number of reference pictures in the short-term\n\t\t\t set that come after the current frame\n @num_poc_lt_curr: the number of reference pictures in the long-term set\n @poc_st_curr_before: provides the index of the short term before references\n\t\t\tin DPB array\n @poc_st_curr_after: provides the index of the short term after references\n\t\t in DPB array\n @poc_lt_curr: provides the index of the long term references in DPB array\n @reserved: padding field. Should be zeroed by applications.\n @dpb: the decoded picture buffer, for meta-data about reference frames\n @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_decode_params { + pub pic_order_cnt_val: __s32, + pub short_term_ref_pic_set_size: __u16, + pub long_term_ref_pic_set_size: __u16, + pub num_active_dpb_entries: __u8, + pub num_poc_st_curr_before: __u8, + pub num_poc_st_curr_after: __u8, + pub num_poc_lt_curr: __u8, + pub poc_st_curr_before: [__u8; 16usize], + pub poc_st_curr_after: [__u8; 16usize], + pub poc_lt_curr: [__u8; 16usize], + pub reserved: [__u8; 4usize], + pub dpb: [v4l2_hevc_dpb_entry; 16usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_decode_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 328usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_decode_params)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_decode_params)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(pic_order_cnt_val) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(short_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_ref_pic_set_size) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(long_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_active_dpb_entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_active_dpb_entries) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_st_curr_before) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_st_curr_before) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_st_curr_after) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_st_curr_after) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_lt_curr) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_lt_curr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_st_curr_before) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_st_curr_before) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_st_curr_after) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_st_curr_after) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_lt_curr) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_lt_curr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dpb) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(dpb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 320usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters\n\n @scaling_list_4x4: scaling list is used for the scaling process for\n\t\t transform coefficients. The values on each scaling\n\t\t list are expected in raster scan order\n @scaling_list_8x8: scaling list is used for the scaling process for\n\t\t transform coefficients. The values on each scaling\n\t\t list are expected in raster scan order\n @scaling_list_16x16:\tscaling list is used for the scaling process for\n\t\t\ttransform coefficients. The values on each scaling\n\t\t\tlist are expected in raster scan order\n @scaling_list_32x32:\tscaling list is used for the scaling process for\n\t\t\ttransform coefficients. The values on each scaling\n\t\t\tlist are expected in raster scan order\n @scaling_list_dc_coef_16x16:\tscaling list is used for the scaling process\n\t\t\t\tfor transform coefficients. The values on each\n\t\t\t\tscaling list are expected in raster scan order.\n @scaling_list_dc_coef_32x32:\tscaling list is used for the scaling process\n\t\t\t\tfor transform coefficients. The values on each\n\t\t\t\tscaling list are expected in raster scan order."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_scaling_matrix { + pub scaling_list_4x4: [[__u8; 16usize]; 6usize], + pub scaling_list_8x8: [[__u8; 64usize]; 6usize], + pub scaling_list_16x16: [[__u8; 64usize]; 6usize], + pub scaling_list_32x32: [[__u8; 64usize]; 2usize], + pub scaling_list_dc_coef_16x16: [__u8; 6usize], + pub scaling_list_dc_coef_32x32: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_scaling_matrix() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1000usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_scaling_matrix)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_scaling_matrix)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_4x4) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_4x4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_8x8) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_8x8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_16x16) as usize - ptr as usize }, + 480usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_32x32) as usize - ptr as usize }, + 864usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_32x32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_dc_coef_16x16) as usize - ptr as usize }, + 992usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_dc_coef_16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_dc_coef_32x32) as usize - ptr as usize }, + 998usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_dc_coef_32x32) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hdr10_cll_info { + pub max_content_light_level: __u16, + pub max_pic_average_light_level: __u16, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hdr10_cll_info() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hdr10_cll_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hdr10_cll_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_content_light_level) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_cll_info), + "::", + stringify!(max_content_light_level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_pic_average_light_level) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_cll_info), + "::", + stringify!(max_pic_average_light_level) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hdr10_mastering_display { + pub display_primaries_x: [__u16; 3usize], + pub display_primaries_y: [__u16; 3usize], + pub white_point_x: __u16, + pub white_point_y: __u16, + pub max_display_mastering_luminance: __u32, + pub min_display_mastering_luminance: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hdr10_mastering_display() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hdr10_mastering_display)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(v4l2_ctrl_hdr10_mastering_display) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).display_primaries_x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(display_primaries_x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).display_primaries_y) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(display_primaries_y) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).white_point_x) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(white_point_x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).white_point_y) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(white_point_y) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_display_mastering_luminance) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(max_display_mastering_luminance) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).min_display_mastering_luminance) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(min_display_mastering_luminance) + ) + ); +} +#[doc = " struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n\n @ref_deltas: contains the adjustment needed for the filter level based on the\n chosen reference frame. If this syntax element is not present in the bitstream,\n users should pass its last value.\n @mode_deltas: contains the adjustment needed for the filter level based on the\n chosen mode.\tIf this syntax element is not present in the bitstream, users should\n pass its last value.\n @level: indicates the loop filter strength.\n @sharpness: indicates the sharpness level.\n @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n @reserved: padding field. Should be zeroed by applications.\n\n This structure contains all loop filter related parameters. See sections\n '7.2.8 Loop filter semantics' of the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_loop_filter { + pub ref_deltas: [__s8; 4usize], + pub mode_deltas: [__s8; 2usize], + pub level: __u8, + pub sharpness: __u8, + pub flags: __u8, + pub reserved: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_loop_filter() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_vp9_loop_filter)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_loop_filter)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_deltas) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(ref_deltas) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mode_deltas) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(mode_deltas) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharpness) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(sharpness) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_quantization - VP9 quantization parameters\n\n @base_q_idx: indicates the base frame qindex.\n @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n @reserved: padding field. Should be zeroed by applications.\n\n Encodes the quantization parameters. See section '7.2.9 Quantization params\n syntax' of the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_quantization { + pub base_q_idx: __u8, + pub delta_q_y_dc: __s8, + pub delta_q_uv_dc: __s8, + pub delta_q_uv_ac: __s8, + pub reserved: [__u8; 4usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_quantization() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_vp9_quantization)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_quantization)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_q_idx) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(base_q_idx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_y_dc) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_y_dc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_uv_dc) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_uv_dc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_uv_ac) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_uv_ac) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_segmentation - VP9 segmentation parameters\n\n @feature_data: data attached to each feature. Data entry is only valid if\n the feature is enabled. The array shall be indexed with segment number as\n the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n @feature_enabled: bitmask defining which features are enabled in each segment.\n The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n values where id is one of V4L2_VP9_SEG_LVL_{}.\n @tree_probs: specifies the probability values to be used when decoding a\n Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n for more details.\n @pred_probs: specifies the probability values to be used when decoding a\n Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n for more details.\n @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n @reserved: padding field. Should be zeroed by applications.\n\n Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_segmentation { + pub feature_data: [[__s16; 4usize]; 8usize], + pub feature_enabled: [__u8; 8usize], + pub tree_probs: [__u8; 7usize], + pub pred_probs: [__u8; 3usize], + pub flags: __u8, + pub reserved: [__u8; 5usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_segmentation() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(v4l2_vp9_segmentation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_vp9_segmentation)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature_data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(feature_data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature_enabled) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(feature_enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tree_probs) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(tree_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pred_probs) as usize - ptr as usize }, + 79usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(pred_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 83usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n\n @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n @compressed_header_size: compressed header size in bytes.\n @uncompressed_header_size: uncompressed header size in bytes.\n @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n pixels. This is not used during the decoding process but might be used by HW scalers\n to prepare a frame that's ready for scanout.\n @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n pixels. This is not used during the decoding process but might be used by HW scalers\n to prepare a frame that's ready for scanout.\n @last_frame_ts: \"last\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @golden_frame_ts: \"golden\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @alt_frame_ts: \"alt\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n @reset_frame_context: specifies whether the frame context should be reset to default values.\n Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n @frame_context_idx: frame context that should be used/updated.\n @profile: VP9 profile. Can be 0, 1, 2 or 3.\n @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n 10 and/or 12 bits depths.\n @interpolation_filter: specifies the filter selection used for performing inter prediction.\n Set to one of V4L2_VP9_INTERP_FILTER_{}.\n @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n is measured in units of 8x8 blocks).\n @reference_mode: specifies the type of inter prediction to be used.\n Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n @reserved: padding field. Should be zeroed by applications."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp9_frame { + pub lf: v4l2_vp9_loop_filter, + pub quant: v4l2_vp9_quantization, + pub seg: v4l2_vp9_segmentation, + pub flags: __u32, + pub compressed_header_size: __u16, + pub uncompressed_header_size: __u16, + pub frame_width_minus_1: __u16, + pub frame_height_minus_1: __u16, + pub render_width_minus_1: __u16, + pub render_height_minus_1: __u16, + pub last_frame_ts: __u64, + pub golden_frame_ts: __u64, + pub alt_frame_ts: __u64, + pub ref_frame_sign_bias: __u8, + pub reset_frame_context: __u8, + pub frame_context_idx: __u8, + pub profile: __u8, + pub bit_depth: __u8, + pub interpolation_filter: __u8, + pub tile_cols_log2: __u8, + pub tile_rows_log2: __u8, + pub reference_mode: __u8, + pub reserved: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp9_frame() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp9_frame)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp9_frame)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lf) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(lf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).quant) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(quant) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seg) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(seg) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compressed_header_size) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(compressed_header_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uncompressed_header_size) as usize - ptr as usize }, + 118usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(uncompressed_header_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_width_minus_1) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_width_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_height_minus_1) as usize - ptr as usize }, + 122usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_height_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).render_width_minus_1) as usize - ptr as usize }, + 124usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(render_width_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).render_height_minus_1) as usize - ptr as usize }, + 126usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(render_height_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_frame_ts) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(last_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).golden_frame_ts) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(golden_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alt_frame_ts) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(alt_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_frame_sign_bias) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(ref_frame_sign_bias) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reset_frame_context) as usize - ptr as usize }, + 153usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reset_frame_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_context_idx) as usize - ptr as usize }, + 154usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_context_idx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, + 155usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(profile) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth) as usize - ptr as usize }, + 156usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(bit_depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interpolation_filter) as usize - ptr as usize }, + 157usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(interpolation_filter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tile_cols_log2) as usize - ptr as usize }, + 158usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(tile_cols_log2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tile_rows_log2) as usize - ptr as usize }, + 159usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(tile_rows_log2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reference_mode) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reference_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 161usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n @joint: motion vector joint probability updates.\n @sign: motion vector sign probability updates.\n @classes: motion vector class probability updates.\n @class0_bit: motion vector class0 bit probability updates.\n @bits: motion vector bits probability updates.\n @class0_fr: motion vector class0 fractional bit probability updates.\n @fr: motion vector fractional bit probability updates.\n @class0_hp: motion vector class0 high precision fractional bit probability updates.\n @hp: motion vector high precision fractional bit probability updates.\n\n This structure contains new values of motion vector probabilities.\n A value of zero in an array element means there is no update of the relevant probability.\n See `struct v4l2_vp9_prob_updates` for details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_mv_probs { + pub joint: [__u8; 3usize], + pub sign: [__u8; 2usize], + pub classes: [[__u8; 10usize]; 2usize], + pub class0_bit: [__u8; 2usize], + pub bits: [[__u8; 10usize]; 2usize], + pub class0_fr: [[[__u8; 3usize]; 2usize]; 2usize], + pub fr: [[__u8; 3usize]; 2usize], + pub class0_hp: [__u8; 2usize], + pub hp: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_mv_probs() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 69usize, + concat!("Size of: ", stringify!(v4l2_vp9_mv_probs)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_mv_probs)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).joint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(joint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(sign) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).classes) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(classes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_bit) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_bit) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(bits) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_fr) as usize - ptr as usize }, + 47usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_fr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fr) as usize - ptr as usize }, + 59usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(fr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_hp) as usize - ptr as usize }, + 65usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_hp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hp) as usize - ptr as usize }, + 67usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(hp) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n @tx8: TX 8x8 probability updates.\n @tx16: TX 16x16 probability updates.\n @tx32: TX 32x32 probability updates.\n @coef: coefficient probability updates.\n @skip: skip probability updates.\n @inter_mode: inter mode probability updates.\n @interp_filter: interpolation filter probability updates.\n @is_inter: is inter-block probability updates.\n @comp_mode: compound prediction mode probability updates.\n @single_ref: single ref probability updates.\n @comp_ref: compound ref probability updates.\n @y_mode: Y prediction mode probability updates.\n @uv_mode: UV prediction mode probability updates.\n @partition: partition probability updates.\n @mv: motion vector probability updates.\n\n This structure holds the probabilities update as parsed in the compressed\n header (Spec 6.3). These values represent the value of probability update after\n being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n means that there is no update of the relevant probability.\n\n This control is optional and needs to be used when dealing with the hardware which is\n not capable of parsing the compressed header itself. Only drivers which need it will\n implement it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp9_compressed_hdr { + pub tx_mode: __u8, + pub tx8: [[__u8; 1usize]; 2usize], + pub tx16: [[__u8; 2usize]; 2usize], + pub tx32: [[__u8; 3usize]; 2usize], + pub coef: [[[[[[__u8; 3usize]; 6usize]; 6usize]; 2usize]; 2usize]; 4usize], + pub skip: [__u8; 3usize], + pub inter_mode: [[__u8; 3usize]; 7usize], + pub interp_filter: [[__u8; 2usize]; 4usize], + pub is_inter: [__u8; 4usize], + pub comp_mode: [__u8; 5usize], + pub single_ref: [[__u8; 2usize]; 5usize], + pub comp_ref: [__u8; 5usize], + pub y_mode: [[__u8; 9usize]; 4usize], + pub uv_mode: [[__u8; 9usize]; 10usize], + pub partition: [[__u8; 3usize]; 16usize], + pub mv: v4l2_vp9_mv_probs, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp9_compressed_hdr() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2040usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp9_compressed_hdr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp9_compressed_hdr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx_mode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx8) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx16) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx32) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coef) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(coef) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize }, + 1741usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(skip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).inter_mode) as usize - ptr as usize }, + 1744usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(inter_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interp_filter) as usize - ptr as usize }, + 1765usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(interp_filter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).is_inter) as usize - ptr as usize }, + 1773usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(is_inter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).comp_mode) as usize - ptr as usize }, + 1777usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(comp_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).single_ref) as usize - ptr as usize }, + 1782usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(single_ref) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).comp_ref) as usize - ptr as usize }, + 1792usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(comp_ref) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_mode) as usize - ptr as usize }, + 1797usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(y_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_mode) as usize - ptr as usize }, + 1833usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(uv_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition) as usize - ptr as usize }, + 1923usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(partition) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mv) as usize - ptr as usize }, + 1971usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(mv) + ) + ); +} +pub const v4l2_field_V4L2_FIELD_ANY: v4l2_field = 0; +pub const v4l2_field_V4L2_FIELD_NONE: v4l2_field = 1; +pub const v4l2_field_V4L2_FIELD_TOP: v4l2_field = 2; +pub const v4l2_field_V4L2_FIELD_BOTTOM: v4l2_field = 3; +pub const v4l2_field_V4L2_FIELD_INTERLACED: v4l2_field = 4; +pub const v4l2_field_V4L2_FIELD_SEQ_TB: v4l2_field = 5; +pub const v4l2_field_V4L2_FIELD_SEQ_BT: v4l2_field = 6; +pub const v4l2_field_V4L2_FIELD_ALTERNATE: v4l2_field = 7; +pub const v4l2_field_V4L2_FIELD_INTERLACED_TB: v4l2_field = 8; +pub const v4l2_field_V4L2_FIELD_INTERLACED_BT: v4l2_field = 9; +pub type v4l2_field = ::std::os::raw::c_uint; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE: v4l2_buf_type = 1; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT: v4l2_buf_type = 2; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OVERLAY: v4l2_buf_type = 3; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_CAPTURE: v4l2_buf_type = 4; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_OUTPUT: v4l2_buf_type = 5; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: v4l2_buf_type = 6; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: v4l2_buf_type = 7; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: v4l2_buf_type = 8; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: v4l2_buf_type = 9; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: v4l2_buf_type = 10; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_CAPTURE: v4l2_buf_type = 11; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_OUTPUT: v4l2_buf_type = 12; +pub const v4l2_buf_type_V4L2_BUF_TYPE_META_CAPTURE: v4l2_buf_type = 13; +pub const v4l2_buf_type_V4L2_BUF_TYPE_META_OUTPUT: v4l2_buf_type = 14; +pub const v4l2_buf_type_V4L2_BUF_TYPE_PRIVATE: v4l2_buf_type = 128; +pub type v4l2_buf_type = ::std::os::raw::c_uint; +pub const v4l2_tuner_type_V4L2_TUNER_RADIO: v4l2_tuner_type = 1; +pub const v4l2_tuner_type_V4L2_TUNER_ANALOG_TV: v4l2_tuner_type = 2; +pub const v4l2_tuner_type_V4L2_TUNER_DIGITAL_TV: v4l2_tuner_type = 3; +pub const v4l2_tuner_type_V4L2_TUNER_SDR: v4l2_tuner_type = 4; +pub const v4l2_tuner_type_V4L2_TUNER_RF: v4l2_tuner_type = 5; +pub type v4l2_tuner_type = ::std::os::raw::c_uint; +pub const v4l2_memory_V4L2_MEMORY_MMAP: v4l2_memory = 1; +pub const v4l2_memory_V4L2_MEMORY_USERPTR: v4l2_memory = 2; +pub const v4l2_memory_V4L2_MEMORY_OVERLAY: v4l2_memory = 3; +pub const v4l2_memory_V4L2_MEMORY_DMABUF: v4l2_memory = 4; +pub type v4l2_memory = ::std::os::raw::c_uint; +pub const v4l2_colorspace_V4L2_COLORSPACE_DEFAULT: v4l2_colorspace = 0; +pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE170M: v4l2_colorspace = 1; +pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE240M: v4l2_colorspace = 2; +pub const v4l2_colorspace_V4L2_COLORSPACE_REC709: v4l2_colorspace = 3; +pub const v4l2_colorspace_V4L2_COLORSPACE_BT878: v4l2_colorspace = 4; +pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_M: v4l2_colorspace = 5; +pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_BG: v4l2_colorspace = 6; +pub const v4l2_colorspace_V4L2_COLORSPACE_JPEG: v4l2_colorspace = 7; +pub const v4l2_colorspace_V4L2_COLORSPACE_SRGB: v4l2_colorspace = 8; +pub const v4l2_colorspace_V4L2_COLORSPACE_OPRGB: v4l2_colorspace = 9; +pub const v4l2_colorspace_V4L2_COLORSPACE_BT2020: v4l2_colorspace = 10; +pub const v4l2_colorspace_V4L2_COLORSPACE_RAW: v4l2_colorspace = 11; +pub const v4l2_colorspace_V4L2_COLORSPACE_DCI_P3: v4l2_colorspace = 12; +pub type v4l2_colorspace = ::std::os::raw::c_uint; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_DEFAULT: v4l2_xfer_func = 0; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_709: v4l2_xfer_func = 1; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SRGB: v4l2_xfer_func = 2; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_OPRGB: v4l2_xfer_func = 3; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE240M: v4l2_xfer_func = 4; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_NONE: v4l2_xfer_func = 5; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_DCI_P3: v4l2_xfer_func = 6; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE2084: v4l2_xfer_func = 7; +pub type v4l2_xfer_func = ::std::os::raw::c_uint; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_DEFAULT: v4l2_ycbcr_encoding = 0; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_601: v4l2_ycbcr_encoding = 1; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_709: v4l2_ycbcr_encoding = 2; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV601: v4l2_ycbcr_encoding = 3; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV709: v4l2_ycbcr_encoding = 4; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SYCC: v4l2_ycbcr_encoding = 5; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020: v4l2_ycbcr_encoding = 6; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020_CONST_LUM: v4l2_ycbcr_encoding = 7; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SMPTE240M: v4l2_ycbcr_encoding = 8; +pub type v4l2_ycbcr_encoding = ::std::os::raw::c_uint; +pub const v4l2_hsv_encoding_V4L2_HSV_ENC_180: v4l2_hsv_encoding = 128; +pub const v4l2_hsv_encoding_V4L2_HSV_ENC_256: v4l2_hsv_encoding = 129; +pub type v4l2_hsv_encoding = ::std::os::raw::c_uint; +pub const v4l2_quantization_V4L2_QUANTIZATION_DEFAULT: v4l2_quantization = 0; +pub const v4l2_quantization_V4L2_QUANTIZATION_FULL_RANGE: v4l2_quantization = 1; +pub const v4l2_quantization_V4L2_QUANTIZATION_LIM_RANGE: v4l2_quantization = 2; +pub type v4l2_quantization = ::std::os::raw::c_uint; +pub const v4l2_priority_V4L2_PRIORITY_UNSET: v4l2_priority = 0; +pub const v4l2_priority_V4L2_PRIORITY_BACKGROUND: v4l2_priority = 1; +pub const v4l2_priority_V4L2_PRIORITY_INTERACTIVE: v4l2_priority = 2; +pub const v4l2_priority_V4L2_PRIORITY_RECORD: v4l2_priority = 3; +pub const v4l2_priority_V4L2_PRIORITY_DEFAULT: v4l2_priority = 2; +pub type v4l2_priority = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_rect { + pub left: __s32, + pub top: __s32, + pub width: __u32, + pub height: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_rect() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_rect)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_rect)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(left) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(top) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(height) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_fract { + pub numerator: __u32, + pub denominator: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_fract() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_fract)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_fract)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_fract), + "::", + stringify!(numerator) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_fract), + "::", + stringify!(denominator) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_area { + pub width: __u32, + pub height: __u32, } #[test] fn bindgen_test_layout_v4l2_area() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -3657,7 +7028,7 @@ fn bindgen_test_layout_v4l2_area() { concat!("Alignment of ", stringify!(v4l2_area)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3667,7 +7038,7 @@ fn bindgen_test_layout_v4l2_area() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3677,15 +7048,7 @@ fn bindgen_test_layout_v4l2_area() { ) ); } -#[doc = " struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP"] -#[doc = ""] -#[doc = " @driver:\t name of the driver module (e.g. \"bttv\")"] -#[doc = " @card:\t name of the card (e.g. \"Hauppauge WinTV\")"] -#[doc = " @bus_info:\t name of the bus (e.g. \"PCI:\" + pci_name(pci_dev) )"] -#[doc = " @version:\t KERNEL_VERSION"] -#[doc = " @capabilities: capabilities of the physical device as a whole"] -#[doc = " @device_caps: capabilities accessed via this particular device (node)"] -#[doc = " @reserved:\t reserved fields for future extensions"] +#[doc = " struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP\n\n @driver:\t name of the driver module (e.g. \"bttv\")\n @card:\t name of the card (e.g. \"Hauppauge WinTV\")\n @bus_info:\t name of the bus (e.g. \"PCI:\" + pci_name(pci_dev) )\n @version:\t KERNEL_VERSION\n @capabilities: capabilities of the physical device as a whole\n @device_caps: capabilities accessed via this particular device (node)\n @reserved:\t reserved fields for future extensions"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_capability { @@ -3699,6 +7062,8 @@ pub struct v4l2_capability { } #[test] fn bindgen_test_layout_v4l2_capability() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 104usize, @@ -3710,7 +7075,7 @@ fn bindgen_test_layout_v4l2_capability() { concat!("Alignment of ", stringify!(v4l2_capability)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).driver as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).driver) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3720,7 +7085,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).card as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).card) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3730,7 +7095,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bus_info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bus_info) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -3740,7 +7105,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -3750,7 +7115,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -3760,7 +7125,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).device_caps as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).device_caps) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -3770,7 +7135,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 92usize, concat!( "Offset of field: ", @@ -3804,6 +7169,9 @@ pub union v4l2_pix_format__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -3815,9 +7183,7 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_pix_format__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ycbcr_enc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3827,9 +7193,7 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hsv_enc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).hsv_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3841,6 +7205,8 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_pix_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -3852,7 +7218,7 @@ fn bindgen_test_layout_v4l2_pix_format() { concat!("Alignment of ", stringify!(v4l2_pix_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3862,7 +7228,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3872,7 +7238,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3882,7 +7248,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3892,7 +7258,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesperline as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3902,7 +7268,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeimage as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3912,7 +7278,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).colorspace as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3922,7 +7288,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).priv_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).priv_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3932,7 +7298,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -3942,7 +7308,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quantization as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -3952,7 +7318,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).xfer_func as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -3975,6 +7341,8 @@ pub struct v4l2_fmtdesc { } #[test] fn bindgen_test_layout_v4l2_fmtdesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -3986,7 +7354,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { concat!("Alignment of ", stringify!(v4l2_fmtdesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3996,7 +7364,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4006,7 +7374,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4016,7 +7384,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).description as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4026,7 +7394,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -4036,7 +7404,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbus_code as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mbus_code) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -4046,7 +7414,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -4068,6 +7436,9 @@ pub struct v4l2_frmsize_discrete { } #[test] fn bindgen_test_layout_v4l2_frmsize_discrete() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -4079,7 +7450,7 @@ fn bindgen_test_layout_v4l2_frmsize_discrete() { concat!("Alignment of ", stringify!(v4l2_frmsize_discrete)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4089,7 +7460,7 @@ fn bindgen_test_layout_v4l2_frmsize_discrete() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4111,6 +7482,9 @@ pub struct v4l2_frmsize_stepwise { } #[test] fn bindgen_test_layout_v4l2_frmsize_stepwise() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4122,7 +7496,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { concat!("Alignment of ", stringify!(v4l2_frmsize_stepwise)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4132,7 +7506,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4142,9 +7516,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).step_width as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).step_width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4154,9 +7526,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).min_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).min_height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4166,9 +7536,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4178,9 +7546,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).step_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).step_height) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -4207,6 +7573,9 @@ pub union v4l2_frmsizeenum__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4218,9 +7587,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_frmsizeenum__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).discrete as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).discrete) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4230,9 +7597,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stepwise as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stepwise) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4244,6 +7609,8 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_frmsizeenum() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -4255,7 +7622,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { concat!("Alignment of ", stringify!(v4l2_frmsizeenum)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4265,7 +7632,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixel_format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4275,7 +7642,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4285,7 +7652,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -4308,6 +7675,9 @@ pub struct v4l2_frmival_stepwise { } #[test] fn bindgen_test_layout_v4l2_frmival_stepwise() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4319,7 +7689,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { concat!("Alignment of ", stringify!(v4l2_frmival_stepwise)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4329,7 +7699,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4339,7 +7709,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4368,6 +7738,9 @@ pub union v4l2_frmivalenum__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4379,9 +7752,7 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_frmivalenum__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).discrete as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).discrete) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4391,9 +7762,7 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stepwise as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stepwise) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4405,6 +7774,8 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_frmivalenum() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -4416,7 +7787,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { concat!("Alignment of ", stringify!(v4l2_frmivalenum)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4426,7 +7797,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixel_format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4436,7 +7807,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4446,7 +7817,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4456,7 +7827,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4466,7 +7837,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -4489,6 +7860,8 @@ pub struct v4l2_timecode { } #[test] fn bindgen_test_layout_v4l2_timecode() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -4500,7 +7873,7 @@ fn bindgen_test_layout_v4l2_timecode() { concat!("Alignment of ", stringify!(v4l2_timecode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4510,7 +7883,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4520,7 +7893,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frames as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frames) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4530,7 +7903,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).seconds as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).seconds) as usize - ptr as usize }, 9usize, concat!( "Offset of field: ", @@ -4540,7 +7913,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minutes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minutes) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -4550,7 +7923,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hours as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hours) as usize - ptr as usize }, 11usize, concat!( "Offset of field: ", @@ -4560,7 +7933,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).userbits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).userbits) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4583,6 +7956,8 @@ pub struct v4l2_jpegcompression { } #[test] fn bindgen_test_layout_v4l2_jpegcompression() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 140usize, @@ -4594,7 +7969,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { concat!("Alignment of ", stringify!(v4l2_jpegcompression)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quality as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quality) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4604,7 +7979,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APPn as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APPn) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4614,7 +7989,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APP_len as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APP_len) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4624,7 +7999,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APP_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APP_data) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4634,7 +8009,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).COM_len as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).COM_len) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -4644,7 +8019,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).COM_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).COM_data) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -4654,9 +8029,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).jpeg_markers as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).jpeg_markers) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -4673,10 +8046,13 @@ pub struct v4l2_requestbuffers { pub type_: __u32, pub memory: __u32, pub capabilities: __u32, - pub reserved: [__u32; 1usize], + pub flags: __u8, + pub reserved: [__u8; 3usize], } #[test] fn bindgen_test_layout_v4l2_requestbuffers() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -4688,7 +8064,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { concat!("Alignment of ", stringify!(v4l2_requestbuffers)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4698,7 +8074,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4708,7 +8084,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4718,9 +8094,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4730,8 +8104,18 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_requestbuffers), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 17usize, concat!( "Offset of field: ", stringify!(v4l2_requestbuffers), @@ -4740,24 +8124,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); } -#[doc = " struct v4l2_plane - plane info for multi-planar buffers"] -#[doc = " @bytesused:\t\tnumber of bytes occupied by data in the plane (payload)"] -#[doc = " @length:\t\tsize of this plane (NOT the payload) in bytes"] -#[doc = " @mem_offset:\t\twhen memory in the associated struct v4l2_buffer is"] -#[doc = "\t\t\tV4L2_MEMORY_MMAP, equals the offset from the start of"] -#[doc = "\t\t\tthe device memory for this plane (or is a \"cookie\" that"] -#[doc = "\t\t\tshould be passed to mmap() called on the video node)"] -#[doc = " @userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer"] -#[doc = "\t\t\tpointing to this plane"] -#[doc = " @fd:\t\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file"] -#[doc = "\t\t\tdescriptor associated with this plane"] -#[doc = " @data_offset:\toffset in the plane to the start of data; usually 0,"] -#[doc = "\t\t\tunless there is a header in front of the data"] -#[doc = ""] -#[doc = " Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer"] -#[doc = " with two planes can have one plane for Y, and another for interleaved CbCr"] -#[doc = " components. Each plane can reside in a separate memory buffer, or even in"] -#[doc = " a completely separate memory node (e.g. in embedded devices)."] +#[doc = " struct v4l2_plane - plane info for multi-planar buffers\n @bytesused:\t\tnumber of bytes occupied by data in the plane (payload)\n @length:\t\tsize of this plane (NOT the payload) in bytes\n @mem_offset:\t\twhen memory in the associated struct v4l2_buffer is\n\t\t\tV4L2_MEMORY_MMAP, equals the offset from the start of\n\t\t\tthe device memory for this plane (or is a \"cookie\" that\n\t\t\tshould be passed to mmap() called on the video node)\n @userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer\n\t\t\tpointing to this plane\n @fd:\t\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file\n\t\t\tdescriptor associated with this plane\n @m:\t\t\tunion of @mem_offset, @userptr and @fd\n @data_offset:\toffset in the plane to the start of data; usually 0,\n\t\t\tunless there is a header in front of the data\n @reserved:\t\tdrivers and applications must zero this array\n\n Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer\n with two planes can have one plane for Y, and another for interleaved CbCr\n components. Each plane can reside in a separate memory buffer, or even in\n a completely separate memory node (e.g. in embedded devices)."] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_plane { @@ -4776,6 +8143,9 @@ pub union v4l2_plane__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -4787,9 +8157,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_plane__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mem_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).mem_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4799,9 +8167,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).userptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).userptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4811,7 +8177,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4823,6 +8189,8 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_plane() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 60usize, @@ -4834,7 +8202,7 @@ fn bindgen_test_layout_v4l2_plane() { concat!("Alignment of ", stringify!(v4l2_plane)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesused as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesused) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4844,7 +8212,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4854,7 +8222,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4864,7 +8232,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data_offset) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4874,7 +8242,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4884,35 +8252,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); } -#[doc = " struct v4l2_buffer - video buffer info"] -#[doc = " @index:\tid number of the buffer"] -#[doc = " @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for"] -#[doc = "\t\tmultiplanar buffers);"] -#[doc = " @bytesused:\tnumber of bytes occupied by data in the buffer (payload);"] -#[doc = "\t\tunused (set to 0) for multiplanar buffers"] -#[doc = " @flags:\tbuffer informational flags"] -#[doc = " @field:\tenum v4l2_field; field order of the image in the buffer"] -#[doc = " @timestamp:\tframe timestamp"] -#[doc = " @timecode:\tframe timecode"] -#[doc = " @sequence:\tsequence count of this frame"] -#[doc = " @memory:\tenum v4l2_memory; the method, in which the actual video data is"] -#[doc = "\t\tpassed"] -#[doc = " @offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;"] -#[doc = "\t\toffset from the start of the device memory for this plane,"] -#[doc = "\t\t(or a \"cookie\" that should be passed to mmap() as offset)"] -#[doc = " @userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;"] -#[doc = "\t\ta userspace pointer pointing to this buffer"] -#[doc = " @fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;"] -#[doc = "\t\ta userspace file descriptor associated with this buffer"] -#[doc = " @planes:\tfor multiplanar buffers; userspace pointer to the array of plane"] -#[doc = "\t\tinfo structs for this buffer"] -#[doc = " @length:\tsize in bytes of the buffer (NOT its payload) for single-plane"] -#[doc = "\t\tbuffers (when type != *_MPLANE); number of elements in the"] -#[doc = "\t\tplanes array for multi-plane buffers"] -#[doc = " @request_fd: fd of the request that this buffer should use"] -#[doc = ""] -#[doc = " Contains data exchanged by application and driver using one of the Streaming"] -#[doc = " I/O methods."] +#[doc = " struct v4l2_buffer - video buffer info\n @index:\tid number of the buffer\n @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for\n\t\tmultiplanar buffers);\n @bytesused:\tnumber of bytes occupied by data in the buffer (payload);\n\t\tunused (set to 0) for multiplanar buffers\n @flags:\tbuffer informational flags\n @field:\tenum v4l2_field; field order of the image in the buffer\n @timestamp:\tframe timestamp\n @timecode:\tframe timecode\n @sequence:\tsequence count of this frame\n @memory:\tenum v4l2_memory; the method, in which the actual video data is\n\t\tpassed\n @offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;\n\t\toffset from the start of the device memory for this plane,\n\t\t(or a \"cookie\" that should be passed to mmap() as offset)\n @userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;\n\t\ta userspace pointer pointing to this buffer\n @fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;\n\t\ta userspace file descriptor associated with this buffer\n @planes:\tfor multiplanar buffers; userspace pointer to the array of plane\n\t\tinfo structs for this buffer\n @m:\t\tunion of @offset, @userptr, @planes and @fd\n @length:\tsize in bytes of the buffer (NOT its payload) for single-plane\n\t\tbuffers (when type != *_MPLANE); number of elements in the\n\t\tplanes array for multi-plane buffers\n @reserved2:\tdrivers and applications must zero this field\n @request_fd: fd of the request that this buffer should use\n @reserved:\tfor backwards compatibility with applications that do not know\n\t\tabout @request_fd\n\n Contains data exchanged by application and driver using one of the Streaming\n I/O methods."] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_buffer { @@ -4940,6 +8280,9 @@ pub union v4l2_buffer__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -4951,9 +8294,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_buffer__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4963,9 +8304,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).userptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).userptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4974,10 +8313,8 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { stringify!(userptr) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).planes as *const _ as usize - }, + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4987,7 +8324,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5005,6 +8342,9 @@ pub union v4l2_buffer__bindgen_ty_2 { } #[test] fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -5016,9 +8356,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { concat!("Alignment of ", stringify!(v4l2_buffer__bindgen_ty_2)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).request_fd as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).request_fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5028,9 +8366,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5042,6 +8378,8 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { } #[test] fn bindgen_test_layout_v4l2_buffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -5053,7 +8391,7 @@ fn bindgen_test_layout_v4l2_buffer() { concat!("Alignment of ", stringify!(v4l2_buffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5063,7 +8401,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5073,7 +8411,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesused as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesused) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5083,7 +8421,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5093,7 +8431,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5103,7 +8441,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timestamp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5113,7 +8451,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timecode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timecode) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5123,7 +8461,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sequence as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -5133,7 +8471,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -5143,7 +8481,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -5153,7 +8491,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -5163,7 +8501,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -5173,22 +8511,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); } -#[doc = " struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor"] -#[doc = ""] -#[doc = " @index:\tid number of the buffer"] -#[doc = " @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for"] -#[doc = "\t\tmultiplanar buffers);"] -#[doc = " @plane:\tindex of the plane to be exported, 0 for single plane queues"] -#[doc = " @flags:\tflags for newly created file, currently only O_CLOEXEC is"] -#[doc = "\t\tsupported, refer to manual of open syscall for more details"] -#[doc = " @fd:\t\tfile descriptor associated with DMABUF (set by driver)"] -#[doc = ""] -#[doc = " Contains data used for exporting a video buffer as DMABUF file descriptor."] -#[doc = " The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF"] -#[doc = " (identical to the cookie used to mmap() the buffer to userspace). All"] -#[doc = " reserved fields must be set to zero. The field reserved0 is expected to"] -#[doc = " become a structure 'type' allowing an alternative layout of the structure"] -#[doc = " content. Therefore this field should not be used for any other extensions."] +#[doc = " struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor\n\n @index:\tid number of the buffer\n @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for\n\t\tmultiplanar buffers);\n @plane:\tindex of the plane to be exported, 0 for single plane queues\n @flags:\tflags for newly created file, currently only O_CLOEXEC is\n\t\tsupported, refer to manual of open syscall for more details\n @fd:\t\tfile descriptor associated with DMABUF (set by driver)\n @reserved:\tdrivers and applications must zero this array\n\n Contains data used for exporting a video buffer as DMABUF file descriptor.\n The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF\n (identical to the cookie used to mmap() the buffer to userspace). All\n reserved fields must be set to zero. The field reserved0 is expected to\n become a structure 'type' allowing an alternative layout of the structure\n content. Therefore this field should not be used for any other extensions."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_exportbuffer { @@ -5201,6 +8524,8 @@ pub struct v4l2_exportbuffer { } #[test] fn bindgen_test_layout_v4l2_exportbuffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -5212,7 +8537,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { concat!("Alignment of ", stringify!(v4l2_exportbuffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5222,7 +8547,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5232,7 +8557,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).plane as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).plane) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5242,7 +8567,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5252,7 +8577,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5262,7 +8587,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5294,6 +8619,9 @@ pub struct v4l2_framebuffer__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -5305,9 +8633,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_framebuffer__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5317,9 +8643,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5329,10 +8653,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pixelformat as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5342,9 +8663,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).field as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5354,10 +8673,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bytesperline as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5367,10 +8683,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeimage as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5380,10 +8693,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5393,9 +8703,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).priv_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).priv_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5407,6 +8715,8 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_framebuffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -5418,7 +8728,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { concat!("Alignment of ", stringify!(v4l2_framebuffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5428,7 +8738,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5438,7 +8748,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5448,7 +8758,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5466,6 +8776,8 @@ pub struct v4l2_clip { } #[test] fn bindgen_test_layout_v4l2_clip() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -5477,7 +8789,7 @@ fn bindgen_test_layout_v4l2_clip() { concat!("Alignment of ", stringify!(v4l2_clip)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).c as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5487,7 +8799,7 @@ fn bindgen_test_layout_v4l2_clip() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5510,6 +8822,8 @@ pub struct v4l2_window { } #[test] fn bindgen_test_layout_v4l2_window() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -5521,7 +8835,7 @@ fn bindgen_test_layout_v4l2_window() { concat!("Alignment of ", stringify!(v4l2_window)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5531,7 +8845,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5541,7 +8855,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).chromakey as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).chromakey) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5551,7 +8865,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clips as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clips) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5561,7 +8875,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clipcount as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clipcount) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5571,7 +8885,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bitmap) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -5581,7 +8895,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).global_alpha as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).global_alpha) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -5603,6 +8917,8 @@ pub struct v4l2_captureparm { } #[test] fn bindgen_test_layout_v4l2_captureparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -5614,7 +8930,7 @@ fn bindgen_test_layout_v4l2_captureparm() { concat!("Alignment of ", stringify!(v4l2_captureparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5624,7 +8940,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capturemode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capturemode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5634,7 +8950,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timeperframe as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timeperframe) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5644,7 +8960,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).extendedmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extendedmode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5654,7 +8970,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).readbuffers as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).readbuffers) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5664,7 +8980,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5686,6 +9002,8 @@ pub struct v4l2_outputparm { } #[test] fn bindgen_test_layout_v4l2_outputparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -5697,7 +9015,7 @@ fn bindgen_test_layout_v4l2_outputparm() { concat!("Alignment of ", stringify!(v4l2_outputparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5707,7 +9025,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).outputmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).outputmode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5717,7 +9035,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timeperframe as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timeperframe) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5727,7 +9045,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).extendedmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extendedmode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5737,7 +9055,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).writebuffers as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).writebuffers) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5747,7 +9065,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5767,6 +9085,8 @@ pub struct v4l2_cropcap { } #[test] fn bindgen_test_layout_v4l2_cropcap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -5778,7 +9098,7 @@ fn bindgen_test_layout_v4l2_cropcap() { concat!("Alignment of ", stringify!(v4l2_cropcap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5788,7 +9108,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bounds as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bounds) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5798,7 +9118,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).defrect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).defrect) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5808,7 +9128,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelaspect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelaspect) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -5826,6 +9146,8 @@ pub struct v4l2_crop { } #[test] fn bindgen_test_layout_v4l2_crop() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -5837,7 +9159,7 @@ fn bindgen_test_layout_v4l2_crop() { concat!("Alignment of ", stringify!(v4l2_crop)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5847,7 +9169,7 @@ fn bindgen_test_layout_v4l2_crop() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).c as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5857,17 +9179,7 @@ fn bindgen_test_layout_v4l2_crop() { ) ); } -#[doc = " struct v4l2_selection - selection info"] -#[doc = " @type:\tbuffer type (do not use *_MPLANE types)"] -#[doc = " @target:\tSelection target, used to choose one of possible rectangles;"] -#[doc = "\t\tdefined in v4l2-common.h; V4L2_SEL_TGT_* ."] -#[doc = " @flags:\tconstraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*."] -#[doc = " @r:\t\tcoordinates of selection window"] -#[doc = " @reserved:\tfor future use, rounds structure size to 64 bytes, set to zero"] -#[doc = ""] -#[doc = " Hardware may use multiple helper windows to process a video stream."] -#[doc = " The structure is used to exchange this selection areas between"] -#[doc = " an application and a driver."] +#[doc = " struct v4l2_selection - selection info\n @type:\tbuffer type (do not use *_MPLANE types)\n @target:\tSelection target, used to choose one of possible rectangles;\n\t\tdefined in v4l2-common.h; V4L2_SEL_TGT_* .\n @flags:\tconstraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.\n @r:\t\tcoordinates of selection window\n @reserved:\tfor future use, rounds structure size to 64 bytes, set to zero\n\n Hardware may use multiple helper windows to process a video stream.\n The structure is used to exchange this selection areas between\n an application and a driver."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_selection { @@ -5879,6 +9191,8 @@ pub struct v4l2_selection { } #[test] fn bindgen_test_layout_v4l2_selection() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -5890,7 +9204,7 @@ fn bindgen_test_layout_v4l2_selection() { concat!("Alignment of ", stringify!(v4l2_selection)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5900,7 +9214,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5910,7 +9224,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5920,7 +9234,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).r as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5930,7 +9244,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5953,6 +9267,8 @@ pub struct v4l2_standard { } #[test] fn bindgen_test_layout_v4l2_standard() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -5964,7 +9280,7 @@ fn bindgen_test_layout_v4l2_standard() { concat!("Alignment of ", stringify!(v4l2_standard)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5974,7 +9290,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5984,7 +9300,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5994,7 +9310,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frameperiod as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frameperiod) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6004,7 +9320,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).framelines as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).framelines) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6014,7 +9330,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6024,40 +9340,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); } -#[doc = " struct v4l2_bt_timings - BT.656/BT.1120 timing data"] -#[doc = " @width:\ttotal width of the active video in pixels"] -#[doc = " @height:\ttotal height of the active video in lines"] -#[doc = " @interlaced:\tInterlaced or progressive"] -#[doc = " @polarities:\tPositive or negative polarities"] -#[doc = " @pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @hfrontporch:Horizontal front porch in pixels"] -#[doc = " @hsync:\tHorizontal Sync length in pixels"] -#[doc = " @hbackporch:\tHorizontal back porch in pixels"] -#[doc = " @vfrontporch:Vertical front porch in lines"] -#[doc = " @vsync:\tVertical Sync length in lines"] -#[doc = " @vbackporch:\tVertical back porch in lines"] -#[doc = " @il_vfrontporch:Vertical front porch for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @il_vsync:\tVertical Sync length for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @il_vbackporch:Vertical back porch for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @standards:\tStandards the timing belongs to"] -#[doc = " @flags:\tFlags"] -#[doc = " @picture_aspect: The picture aspect ratio (hor/vert)."] -#[doc = " @cea861_vic:\tVIC code as per the CEA-861 standard."] -#[doc = " @hdmi_vic:\tVIC code as per the HDMI standard."] -#[doc = " @reserved:\tReserved fields, must be zeroed."] -#[doc = ""] -#[doc = " A note regarding vertical interlaced timings: height refers to the total"] -#[doc = " height of the active video frame (= two fields). The blanking timings refer"] -#[doc = " to the blanking of each field. So the height of the total frame is"] -#[doc = " calculated as follows:"] -#[doc = ""] -#[doc = " tot_height = height + vfrontporch + vsync + vbackporch +"] -#[doc = " il_vfrontporch + il_vsync + il_vbackporch"] -#[doc = ""] -#[doc = " The active height of each field is height / 2."] +#[doc = " struct v4l2_bt_timings - BT.656/BT.1120 timing data\n @width:\ttotal width of the active video in pixels\n @height:\ttotal height of the active video in lines\n @interlaced:\tInterlaced or progressive\n @polarities:\tPositive or negative polarities\n @pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @hfrontporch:Horizontal front porch in pixels\n @hsync:\tHorizontal Sync length in pixels\n @hbackporch:\tHorizontal back porch in pixels\n @vfrontporch:Vertical front porch in lines\n @vsync:\tVertical Sync length in lines\n @vbackporch:\tVertical back porch in lines\n @il_vfrontporch:Vertical front porch for the even field\n\t\t(aka field 2) of interlaced field formats\n @il_vsync:\tVertical Sync length for the even field\n\t\t(aka field 2) of interlaced field formats\n @il_vbackporch:Vertical back porch for the even field\n\t\t(aka field 2) of interlaced field formats\n @standards:\tStandards the timing belongs to\n @flags:\tFlags\n @picture_aspect: The picture aspect ratio (hor/vert).\n @cea861_vic:\tVIC code as per the CEA-861 standard.\n @hdmi_vic:\tVIC code as per the HDMI standard.\n @reserved:\tReserved fields, must be zeroed.\n\n A note regarding vertical interlaced timings: height refers to the total\n height of the active video frame (= two fields). The blanking timings refer\n to the blanking of each field. So the height of the total frame is\n calculated as follows:\n\n tot_height = height + vfrontporch + vsync + vbackporch +\n il_vfrontporch + il_vsync + il_vbackporch\n\n The active height of each field is height / 2."] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_bt_timings { @@ -6084,6 +9367,8 @@ pub struct v4l2_bt_timings { } #[test] fn bindgen_test_layout_v4l2_bt_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 124usize, @@ -6095,7 +9380,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { concat!("Alignment of ", stringify!(v4l2_bt_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6105,7 +9390,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6115,7 +9400,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).interlaced as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).interlaced) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6125,7 +9410,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).polarities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).polarities) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6135,7 +9420,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelclock as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelclock) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6145,7 +9430,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hfrontporch) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -6155,7 +9440,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hsync) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -6165,7 +9450,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hbackporch) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -6175,7 +9460,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vfrontporch) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6185,7 +9470,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vsync) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6195,7 +9480,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vbackporch) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6205,7 +9490,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vfrontporch) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6215,7 +9500,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vsync) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -6225,7 +9510,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vbackporch) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6235,7 +9520,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).standards as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).standards) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6245,7 +9530,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -6255,7 +9540,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).picture_aspect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).picture_aspect) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -6265,7 +9550,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cea861_vic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cea861_vic) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -6275,7 +9560,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hdmi_vic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hdmi_vic) as usize - ptr as usize }, 77usize, concat!( "Offset of field: ", @@ -6285,7 +9570,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 78usize, concat!( "Offset of field: ", @@ -6295,9 +9580,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); } -#[doc = " struct v4l2_dv_timings - DV timings"] -#[doc = " @type:\tthe type of the timings"] -#[doc = " @bt:\tBT656/1120 timings"] +#[doc = " struct v4l2_dv_timings - DV timings\n @type:\tthe type of the timings\n @bt:\tBT656/1120 timings"] #[repr(C, packed)] #[derive(Copy, Clone)] pub struct v4l2_dv_timings { @@ -6312,6 +9595,9 @@ pub union v4l2_dv_timings__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -6323,9 +9609,7 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_dv_timings__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bt) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6335,9 +9619,7 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6349,6 +9631,8 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dv_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 132usize, @@ -6360,7 +9644,7 @@ fn bindgen_test_layout_v4l2_dv_timings() { concat!("Alignment of ", stringify!(v4l2_dv_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6370,12 +9654,7 @@ fn bindgen_test_layout_v4l2_dv_timings() { ) ); } -#[doc = " struct v4l2_enum_dv_timings - DV timings enumeration"] -#[doc = " @index:\tenumeration index"] -#[doc = " @pad:\tthe pad number for which to enumerate timings (used with"] -#[doc = "\t\tv4l-subdev nodes only)"] -#[doc = " @reserved:\tmust be zeroed"] -#[doc = " @timings:\tthe timings for the given index"] +#[doc = " struct v4l2_enum_dv_timings - DV timings enumeration\n @index:\tenumeration index\n @pad:\tthe pad number for which to enumerate timings (used with\n\t\tv4l-subdev nodes only)\n @reserved:\tmust be zeroed\n @timings:\tthe timings for the given index"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_enum_dv_timings { @@ -6386,6 +9665,8 @@ pub struct v4l2_enum_dv_timings { } #[test] fn bindgen_test_layout_v4l2_enum_dv_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 148usize, @@ -6397,7 +9678,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { concat!("Alignment of ", stringify!(v4l2_enum_dv_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6407,7 +9688,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6417,7 +9698,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6427,7 +9708,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timings as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timings) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6437,16 +9718,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); } -#[doc = " struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities"] -#[doc = " @min_width:\t\twidth in pixels"] -#[doc = " @max_width:\t\twidth in pixels"] -#[doc = " @min_height:\t\theight in lines"] -#[doc = " @max_height:\t\theight in lines"] -#[doc = " @min_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @max_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @standards:\t\tSupported standards"] -#[doc = " @capabilities:\tSupported capabilities"] -#[doc = " @reserved:\t\tMust be zeroed"] +#[doc = " struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities\n @min_width:\t\twidth in pixels\n @max_width:\t\twidth in pixels\n @min_height:\t\theight in lines\n @max_height:\t\theight in lines\n @min_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @max_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @standards:\t\tSupported standards\n @capabilities:\tSupported capabilities\n @reserved:\t\tMust be zeroed"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_bt_timings_cap { @@ -6462,6 +9734,8 @@ pub struct v4l2_bt_timings_cap { } #[test] fn bindgen_test_layout_v4l2_bt_timings_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 104usize, @@ -6473,7 +9747,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { concat!("Alignment of ", stringify!(v4l2_bt_timings_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6483,7 +9757,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6493,7 +9767,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_height) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6503,7 +9777,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6513,9 +9787,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).min_pixelclock as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).min_pixelclock) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6525,9 +9797,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_pixelclock as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_pixelclock) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -6537,7 +9807,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).standards as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).standards) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -6547,9 +9817,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6559,7 +9827,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6569,11 +9837,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); } -#[doc = " struct v4l2_dv_timings_cap - DV timings capabilities"] -#[doc = " @type:\tthe type of the timings (same as in struct v4l2_dv_timings)"] -#[doc = " @pad:\tthe pad number for which to query capabilities (used with"] -#[doc = "\t\tv4l-subdev nodes only)"] -#[doc = " @bt:\t\tthe BT656/1120 timings capabilities"] +#[doc = " struct v4l2_dv_timings_cap - DV timings capabilities\n @type:\tthe type of the timings (same as in struct v4l2_dv_timings)\n @pad:\tthe pad number for which to query capabilities (used with\n\t\tv4l-subdev nodes only)\n @bt:\t\tthe BT656/1120 timings capabilities"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_dv_timings_cap { @@ -6590,6 +9854,9 @@ pub union v4l2_dv_timings_cap__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -6604,9 +9871,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bt) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6616,10 +9881,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6631,6 +9893,8 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dv_timings_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -6642,7 +9906,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { concat!("Alignment of ", stringify!(v4l2_dv_timings_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6652,7 +9916,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6662,7 +9926,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6687,6 +9951,8 @@ pub struct v4l2_input { } #[test] fn bindgen_test_layout_v4l2_input() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 76usize, @@ -6698,7 +9964,7 @@ fn bindgen_test_layout_v4l2_input() { concat!("Alignment of ", stringify!(v4l2_input)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6708,7 +9974,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6718,7 +9984,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6728,7 +9994,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audioset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audioset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6738,7 +10004,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6748,7 +10014,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).std as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).std) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6758,7 +10024,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6768,7 +10034,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6778,7 +10044,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -6802,6 +10068,8 @@ pub struct v4l2_output { } #[test] fn bindgen_test_layout_v4l2_output() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -6813,7 +10081,7 @@ fn bindgen_test_layout_v4l2_output() { concat!("Alignment of ", stringify!(v4l2_output)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6823,7 +10091,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6833,7 +10101,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6843,7 +10111,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audioset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audioset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6853,7 +10121,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).modulator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).modulator) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6863,7 +10131,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).std as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).std) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6873,7 +10141,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6883,7 +10151,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6901,6 +10169,8 @@ pub struct v4l2_control { } #[test] fn bindgen_test_layout_v4l2_control() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -6912,7 +10182,7 @@ fn bindgen_test_layout_v4l2_control() { concat!("Alignment of ", stringify!(v4l2_control)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6922,7 +10192,7 @@ fn bindgen_test_layout_v4l2_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6957,10 +10227,24 @@ pub union v4l2_ext_control__bindgen_ty_1 { pub p_h264_slice_params: *mut v4l2_ctrl_h264_slice_params, pub p_h264_decode_params: *mut v4l2_ctrl_h264_decode_params, pub p_fwht_params: *mut v4l2_ctrl_fwht_params, + pub p_vp8_frame: *mut v4l2_ctrl_vp8_frame, + pub p_mpeg2_sequence: *mut v4l2_ctrl_mpeg2_sequence, + pub p_mpeg2_picture: *mut v4l2_ctrl_mpeg2_picture, + pub p_mpeg2_quantisation: *mut v4l2_ctrl_mpeg2_quantisation, + pub p_vp9_compressed_hdr_probs: *mut v4l2_ctrl_vp9_compressed_hdr, + pub p_vp9_frame: *mut v4l2_ctrl_vp9_frame, + pub p_hevc_sps: *mut v4l2_ctrl_hevc_sps, + pub p_hevc_pps: *mut v4l2_ctrl_hevc_pps, + pub p_hevc_slice_params: *mut v4l2_ctrl_hevc_slice_params, + pub p_hevc_scaling_matrix: *mut v4l2_ctrl_hevc_scaling_matrix, + pub p_hevc_decode_params: *mut v4l2_ctrl_hevc_decode_params, pub ptr: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -6972,9 +10256,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_ext_control__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6984,9 +10266,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value64 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6996,9 +10276,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).string as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7008,9 +10286,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7020,9 +10296,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u16 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u16) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7032,9 +10306,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u32 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7044,9 +10316,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_area as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_area) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7056,10 +10326,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_sps as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_sps) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7069,10 +10336,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_pps as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_pps) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7082,10 +10346,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_scaling_matrix - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_scaling_matrix) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7095,10 +10356,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_pred_weights - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_pred_weights) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7108,10 +10366,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_slice_params - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_slice_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7121,10 +10376,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_decode_params - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_decode_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7134,10 +10386,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_fwht_params as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_fwht_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7147,9 +10396,117 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_vp8_frame) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp8_frame) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_sequence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_sequence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_picture) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_picture) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_quantisation) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_quantisation) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_vp9_compressed_hdr_probs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp9_compressed_hdr_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_vp9_frame) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp9_frame) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_sps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_sps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_pps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_pps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_slice_params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_slice_params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_scaling_matrix) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_scaling_matrix) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_decode_params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_decode_params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7161,6 +10518,8 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_ext_control() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -7172,7 +10531,7 @@ fn bindgen_test_layout_v4l2_ext_control() { concat!("Alignment of ", stringify!(v4l2_ext_control)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7182,7 +10541,7 @@ fn bindgen_test_layout_v4l2_ext_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7192,7 +10551,7 @@ fn bindgen_test_layout_v4l2_ext_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7220,6 +10579,9 @@ pub union v4l2_ext_controls__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -7231,10 +10593,7 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_ext_controls__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ctrl_class as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ctrl_class) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7244,9 +10603,7 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).which as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).which) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7258,6 +10615,8 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_ext_controls() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -7269,7 +10628,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { concat!("Alignment of ", stringify!(v4l2_ext_controls)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7279,7 +10638,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).error_idx as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).error_idx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7289,7 +10648,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).request_fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).request_fd) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -7299,7 +10658,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -7309,7 +10668,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).controls as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).controls) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -7333,6 +10692,8 @@ pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U8: v4l2_ctrl_type = 256; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U16: v4l2_ctrl_type = 257; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U32: v4l2_ctrl_type = 258; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_AREA: v4l2_ctrl_type = 262; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HDR10_CLL_INFO: v4l2_ctrl_type = 272; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY: v4l2_ctrl_type = 273; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SPS: v4l2_ctrl_type = 512; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_PPS: v4l2_ctrl_type = 513; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SCALING_MATRIX: v4l2_ctrl_type = 514; @@ -7340,6 +10701,17 @@ pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SLICE_PARAMS: v4l2_ctrl_type = 515; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_DECODE_PARAMS: v4l2_ctrl_type = 516; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_PRED_WEIGHTS: v4l2_ctrl_type = 517; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_FWHT_PARAMS: v4l2_ctrl_type = 544; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP8_FRAME: v4l2_ctrl_type = 576; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_QUANTISATION: v4l2_ctrl_type = 592; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_SEQUENCE: v4l2_ctrl_type = 593; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_PICTURE: v4l2_ctrl_type = 594; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR: v4l2_ctrl_type = 608; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP9_FRAME: v4l2_ctrl_type = 609; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SPS: v4l2_ctrl_type = 624; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_PPS: v4l2_ctrl_type = 625; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS: v4l2_ctrl_type = 626; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX: v4l2_ctrl_type = 627; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS: v4l2_ctrl_type = 628; pub type v4l2_ctrl_type = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7356,6 +10728,8 @@ pub struct v4l2_queryctrl { } #[test] fn bindgen_test_layout_v4l2_queryctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -7367,7 +10741,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { concat!("Alignment of ", stringify!(v4l2_queryctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7377,7 +10751,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7387,7 +10761,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7397,7 +10771,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7407,7 +10781,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7417,7 +10791,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7427,7 +10801,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7437,7 +10811,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7447,7 +10821,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -7476,6 +10850,8 @@ pub struct v4l2_query_ext_ctrl { } #[test] fn bindgen_test_layout_v4l2_query_ext_ctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 232usize, @@ -7487,7 +10863,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { concat!("Alignment of ", stringify!(v4l2_query_ext_ctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7497,7 +10873,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7507,7 +10883,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7517,7 +10893,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7527,7 +10903,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7537,7 +10913,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7547,9 +10923,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).default_value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -7559,7 +10933,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -7569,7 +10943,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).elem_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).elem_size) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -7579,7 +10953,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).elems as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).elems) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -7589,7 +10963,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nr_of_dims as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nr_of_dims) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -7599,7 +10973,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dims as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).dims) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -7609,7 +10983,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -7635,6 +11009,9 @@ pub union v4l2_querymenu__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -7646,9 +11023,7 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_querymenu__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7658,9 +11033,7 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7672,6 +11045,8 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_querymenu() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -7683,7 +11058,7 @@ fn bindgen_test_layout_v4l2_querymenu() { concat!("Alignment of ", stringify!(v4l2_querymenu)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7693,7 +11068,7 @@ fn bindgen_test_layout_v4l2_querymenu() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7703,7 +11078,7 @@ fn bindgen_test_layout_v4l2_querymenu() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7730,6 +11105,8 @@ pub struct v4l2_tuner { } #[test] fn bindgen_test_layout_v4l2_tuner() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 84usize, @@ -7741,7 +11118,7 @@ fn bindgen_test_layout_v4l2_tuner() { concat!("Alignment of ", stringify!(v4l2_tuner)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7751,7 +11128,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7761,7 +11138,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -7771,7 +11148,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7781,7 +11158,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7791,7 +11168,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7801,7 +11178,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rxsubchans as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rxsubchans) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7811,7 +11188,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audmode) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7821,7 +11198,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).signal as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -7831,7 +11208,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).afc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).afc) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -7841,7 +11218,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -7865,6 +11242,8 @@ pub struct v4l2_modulator { } #[test] fn bindgen_test_layout_v4l2_modulator() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -7876,7 +11255,7 @@ fn bindgen_test_layout_v4l2_modulator() { concat!("Alignment of ", stringify!(v4l2_modulator)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7886,7 +11265,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7896,7 +11275,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -7906,7 +11285,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7916,7 +11295,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7926,7 +11305,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).txsubchans as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).txsubchans) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7936,7 +11315,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7946,7 +11325,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7966,6 +11345,8 @@ pub struct v4l2_frequency { } #[test] fn bindgen_test_layout_v4l2_frequency() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -7977,7 +11358,7 @@ fn bindgen_test_layout_v4l2_frequency() { concat!("Alignment of ", stringify!(v4l2_frequency)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7987,7 +11368,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7997,7 +11378,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frequency as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frequency) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8007,7 +11388,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8031,6 +11412,8 @@ pub struct v4l2_frequency_band { } #[test] fn bindgen_test_layout_v4l2_frequency_band() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8042,7 +11425,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { concat!("Alignment of ", stringify!(v4l2_frequency_band)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8052,7 +11435,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8062,7 +11445,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8072,7 +11455,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8082,7 +11465,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8092,7 +11475,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8102,7 +11485,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).modulation as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).modulation) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8112,7 +11495,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -8136,6 +11519,8 @@ pub struct v4l2_hw_freq_seek { } #[test] fn bindgen_test_layout_v4l2_hw_freq_seek() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -8147,7 +11532,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { concat!("Alignment of ", stringify!(v4l2_hw_freq_seek)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8157,7 +11542,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8167,7 +11552,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek_upward as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).seek_upward) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8177,7 +11562,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).wrap_around as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).wrap_around) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8187,7 +11572,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).spacing as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).spacing) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8197,7 +11582,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8207,7 +11592,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8217,7 +11602,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -8236,6 +11621,8 @@ pub struct v4l2_rds_data { } #[test] fn bindgen_test_layout_v4l2_rds_data() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 3usize, @@ -8247,7 +11634,7 @@ fn bindgen_test_layout_v4l2_rds_data() { concat!("Alignment of ", stringify!(v4l2_rds_data)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).lsb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).lsb) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8257,7 +11644,7 @@ fn bindgen_test_layout_v4l2_rds_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).msb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).msb) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -8267,7 +11654,7 @@ fn bindgen_test_layout_v4l2_rds_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).block as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).block) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -8288,6 +11675,8 @@ pub struct v4l2_audio { } #[test] fn bindgen_test_layout_v4l2_audio() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -8299,7 +11688,7 @@ fn bindgen_test_layout_v4l2_audio() { concat!("Alignment of ", stringify!(v4l2_audio)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8309,7 +11698,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8319,7 +11708,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8329,7 +11718,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -8339,7 +11728,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -8360,6 +11749,8 @@ pub struct v4l2_audioout { } #[test] fn bindgen_test_layout_v4l2_audioout() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -8371,7 +11762,7 @@ fn bindgen_test_layout_v4l2_audioout() { concat!("Alignment of ", stringify!(v4l2_audioout)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8381,7 +11772,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8391,7 +11782,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8401,7 +11792,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -8411,7 +11802,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -8432,6 +11823,8 @@ pub struct v4l2_enc_idx_entry { } #[test] fn bindgen_test_layout_v4l2_enc_idx_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8443,7 +11836,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { concat!("Alignment of ", stringify!(v4l2_enc_idx_entry)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8453,7 +11846,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pts as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8463,7 +11856,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8473,7 +11866,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8483,7 +11876,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8503,6 +11896,8 @@ pub struct v4l2_enc_idx { } #[test] fn bindgen_test_layout_v4l2_enc_idx() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2072usize, @@ -8514,7 +11909,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { concat!("Alignment of ", stringify!(v4l2_enc_idx)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entries as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8524,7 +11919,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entries_cap as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entries_cap) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8534,7 +11929,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8544,7 +11939,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entry as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8573,6 +11968,9 @@ pub struct v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8590,10 +11988,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).data - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8605,6 +12000,9 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8616,9 +12014,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_encoder_cmd__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8630,6 +12026,8 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -8641,7 +12039,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd() { concat!("Alignment of ", stringify!(v4l2_encoder_cmd)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cmd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8651,7 +12049,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8682,6 +12080,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8699,10 +12100,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pts as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8720,6 +12118,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8737,10 +12138,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).speed - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).speed) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8750,10 +12148,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).format - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8770,6 +12165,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8787,10 +12185,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).data - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8802,6 +12197,9 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8813,9 +12211,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_decoder_cmd__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stop) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8825,9 +12221,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).start as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8837,9 +12231,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8851,6 +12243,8 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -8862,7 +12256,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd() { concat!("Alignment of ", stringify!(v4l2_decoder_cmd)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cmd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8872,7 +12266,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8896,6 +12290,8 @@ pub struct v4l2_vbi_format { } #[test] fn bindgen_test_layout_v4l2_vbi_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -8907,7 +12303,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { concat!("Alignment of ", stringify!(v4l2_vbi_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sampling_rate as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sampling_rate) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8917,7 +12313,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8927,9 +12323,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).samples_per_line as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).samples_per_line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8939,7 +12333,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sample_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sample_format) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8949,7 +12343,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8959,7 +12353,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8969,7 +12363,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -8979,7 +12373,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8999,6 +12393,9 @@ pub struct v4l2_sliced_vbi_format { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_format() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 112usize, @@ -9010,9 +12407,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_format)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_set as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_set) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9022,9 +12417,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_lines as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_lines) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -9034,7 +12427,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).io_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).io_size) as usize - ptr as usize }, 100usize, concat!( "Offset of field: ", @@ -9044,7 +12437,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -9064,6 +12457,8 @@ pub struct v4l2_sliced_vbi_cap { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 116usize, @@ -9075,7 +12470,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).service_set as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).service_set) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9085,9 +12480,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_lines as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_lines) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -9097,7 +12490,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 100usize, concat!( "Offset of field: ", @@ -9107,7 +12500,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -9128,6 +12521,8 @@ pub struct v4l2_sliced_vbi_data { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_data() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -9139,7 +12534,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_data)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9149,7 +12544,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9159,7 +12554,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9169,7 +12564,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -9179,7 +12574,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -9197,6 +12592,9 @@ pub struct v4l2_mpeg_vbi_itv0_line { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 43usize, @@ -9208,7 +12606,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_itv0_line)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9218,7 +12616,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -9236,6 +12634,8 @@ pub struct v4l2_mpeg_vbi_itv0 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1513usize, @@ -9247,7 +12647,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_itv0)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).linemask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).linemask) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9257,7 +12657,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9274,6 +12674,8 @@ pub struct v4l2_mpeg_vbi_ITV0 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_ITV0() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1548usize, @@ -9285,7 +12687,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_ITV0() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_ITV0)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9309,6 +12711,9 @@ pub union v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1548usize, @@ -9326,10 +12731,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).itv0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).itv0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9339,10 +12741,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ITV0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ITV0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9354,6 +12753,9 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1552usize, @@ -9365,7 +12767,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_fmt_ivtv)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).magic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9375,11 +12777,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { ) ); } -#[doc = " struct v4l2_plane_pix_format - additional, per-plane format definition"] -#[doc = " @sizeimage:\t\tmaximum size in bytes required for data, for which"] -#[doc = "\t\t\tthis plane will be used"] -#[doc = " @bytesperline:\tdistance in bytes between the leftmost pixels in two"] -#[doc = "\t\t\tadjacent lines"] +#[doc = " struct v4l2_plane_pix_format - additional, per-plane format definition\n @sizeimage:\t\tmaximum size in bytes required for data, for which\n\t\t\tthis plane will be used\n @bytesperline:\tdistance in bytes between the leftmost pixels in two\n\t\t\tadjacent lines\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_plane_pix_format { @@ -9389,6 +12787,9 @@ pub struct v4l2_plane_pix_format { } #[test] fn bindgen_test_layout_v4l2_plane_pix_format() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -9400,7 +12801,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { concat!("Alignment of ", stringify!(v4l2_plane_pix_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeimage as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9410,9 +12811,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bytesperline as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9422,7 +12821,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9432,18 +12831,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); } -#[doc = " struct v4l2_pix_format_mplane - multiplanar format definition"] -#[doc = " @width:\t\timage width in pixels"] -#[doc = " @height:\t\timage height in pixels"] -#[doc = " @pixelformat:\tlittle endian four character code (fourcc)"] -#[doc = " @field:\t\tenum v4l2_field; field order (for interlaced video)"] -#[doc = " @colorspace:\t\tenum v4l2_colorspace; supplemental to pixelformat"] -#[doc = " @plane_fmt:\t\tper-plane information"] -#[doc = " @num_planes:\t\tnumber of planes for this format"] -#[doc = " @flags:\t\tformat flags (V4L2_PIX_FMT_FLAG_*)"] -#[doc = " @ycbcr_enc:\t\tenum v4l2_ycbcr_encoding, Y'CbCr encoding"] -#[doc = " @quantization:\tenum v4l2_quantization, colorspace quantization"] -#[doc = " @xfer_func:\t\tenum v4l2_xfer_func, colorspace transfer function"] +#[doc = " struct v4l2_pix_format_mplane - multiplanar format definition\n @width:\t\timage width in pixels\n @height:\t\timage height in pixels\n @pixelformat:\tlittle endian four character code (fourcc)\n @field:\t\tenum v4l2_field; field order (for interlaced video)\n @colorspace:\t\tenum v4l2_colorspace; supplemental to pixelformat\n @plane_fmt:\t\tper-plane information\n @num_planes:\t\tnumber of planes for this format\n @flags:\t\tformat flags (V4L2_PIX_FMT_FLAG_*)\n @ycbcr_enc:\t\tenum v4l2_ycbcr_encoding, Y'CbCr encoding\n @hsv_enc:\t\tenum v4l2_hsv_encoding, HSV encoding\n @quantization:\tenum v4l2_quantization, colorspace quantization\n @xfer_func:\t\tenum v4l2_xfer_func, colorspace transfer function\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Copy, Clone)] pub struct v4l2_pix_format_mplane { @@ -9468,6 +12856,9 @@ pub union v4l2_pix_format_mplane__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, @@ -9485,10 +12876,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ycbcr_enc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9498,10 +12886,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hsv_enc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).hsv_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9513,6 +12898,9 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_pix_format_mplane() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 192usize, @@ -9524,7 +12912,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { concat!("Alignment of ", stringify!(v4l2_pix_format_mplane)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9534,7 +12922,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9544,9 +12932,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pixelformat as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9556,7 +12942,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -9566,9 +12952,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -9578,9 +12962,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).plane_fmt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).plane_fmt) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -9590,9 +12972,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_planes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).num_planes) as usize - ptr as usize }, 180usize, concat!( "Offset of field: ", @@ -9602,7 +12982,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 181usize, concat!( "Offset of field: ", @@ -9612,9 +12992,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).quantization as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 183usize, concat!( "Offset of field: ", @@ -9624,9 +13002,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).xfer_func as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -9636,7 +13012,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 185usize, concat!( "Offset of field: ", @@ -9646,9 +13022,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); } -#[doc = " struct v4l2_sdr_format - SDR format definition"] -#[doc = " @pixelformat:\tlittle endian four character code (fourcc)"] -#[doc = " @buffersize:\t\tmaximum size in bytes required for data"] +#[doc = " struct v4l2_sdr_format - SDR format definition\n @pixelformat:\tlittle endian four character code (fourcc)\n @buffersize:\t\tmaximum size in bytes required for data\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_sdr_format { @@ -9658,6 +13032,8 @@ pub struct v4l2_sdr_format { } #[test] fn bindgen_test_layout_v4l2_sdr_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -9669,7 +13045,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { concat!("Alignment of ", stringify!(v4l2_sdr_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9679,7 +13055,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffersize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffersize) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9689,7 +13065,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9699,9 +13075,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); } -#[doc = " struct v4l2_meta_format - metadata format definition"] -#[doc = " @dataformat:\t\tlittle endian four character code (fourcc)"] -#[doc = " @buffersize:\t\tmaximum size in bytes required for data"] +#[doc = " struct v4l2_meta_format - metadata format definition\n @dataformat:\t\tlittle endian four character code (fourcc)\n @buffersize:\t\tmaximum size in bytes required for data"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_meta_format { @@ -9710,6 +13084,8 @@ pub struct v4l2_meta_format { } #[test] fn bindgen_test_layout_v4l2_meta_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -9721,7 +13097,7 @@ fn bindgen_test_layout_v4l2_meta_format() { concat!("Alignment of ", stringify!(v4l2_meta_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dataformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).dataformat) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9731,7 +13107,7 @@ fn bindgen_test_layout_v4l2_meta_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffersize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffersize) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9741,14 +13117,7 @@ fn bindgen_test_layout_v4l2_meta_format() { ) ); } -#[doc = " struct v4l2_format - stream data format"] -#[doc = " @type:\tenum v4l2_buf_type; type of the data stream"] -#[doc = " @pix:\tdefinition of an image format"] -#[doc = " @pix_mp:\tdefinition of a multiplanar image format"] -#[doc = " @win:\tdefinition of an overlaid image"] -#[doc = " @vbi:\traw VBI capture or output parameters"] -#[doc = " @sliced:\tsliced VBI capture or output parameters"] -#[doc = " @raw_data:\tplaceholder for future extensions and custom formats"] +#[doc = " struct v4l2_format - stream data format\n @type:\tenum v4l2_buf_type; type of the data stream\n @pix:\tdefinition of an image format\n @pix_mp:\tdefinition of a multiplanar image format\n @win:\tdefinition of an overlaid image\n @vbi:\traw VBI capture or output parameters\n @sliced:\tsliced VBI capture or output parameters\n @raw_data:\tplaceholder for future extensions and custom formats\n @fmt:\tunion of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta\n\t\tand @raw_data"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_format { @@ -9769,6 +13138,9 @@ pub union v4l2_format__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -9780,7 +13152,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_format__bindgen_ty_1)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pix as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pix) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9790,9 +13162,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pix_mp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pix_mp) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9802,7 +13172,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).win as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).win) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9812,7 +13182,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vbi as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vbi) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9822,9 +13192,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sliced as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sliced) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9834,7 +13202,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sdr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9844,7 +13212,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).meta) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9854,9 +13222,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9868,6 +13234,8 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 204usize, @@ -9879,7 +13247,7 @@ fn bindgen_test_layout_v4l2_format() { concat!("Alignment of ", stringify!(v4l2_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9889,7 +13257,7 @@ fn bindgen_test_layout_v4l2_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9914,6 +13282,9 @@ pub union v4l2_streamparm__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -9925,9 +13296,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_streamparm__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capture as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capture) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9937,9 +13306,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).output as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).output) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9949,9 +13316,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9963,6 +13328,8 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_streamparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 204usize, @@ -9974,7 +13341,7 @@ fn bindgen_test_layout_v4l2_streamparm() { concat!("Alignment of ", stringify!(v4l2_streamparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9984,7 +13351,7 @@ fn bindgen_test_layout_v4l2_streamparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).parm as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).parm) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10001,6 +13368,8 @@ pub struct v4l2_event_vsync { } #[test] fn bindgen_test_layout_v4l2_event_vsync() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, @@ -10012,7 +13381,7 @@ fn bindgen_test_layout_v4l2_event_vsync() { concat!("Alignment of ", stringify!(v4l2_event_vsync)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10042,6 +13411,9 @@ pub union v4l2_event_ctrl__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -10053,9 +13425,7 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_event_ctrl__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10065,9 +13435,7 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value64 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10079,6 +13447,8 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_event_ctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 36usize, @@ -10090,7 +13460,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { concat!("Alignment of ", stringify!(v4l2_event_ctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).changes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).changes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10100,7 +13470,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10110,7 +13480,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -10120,7 +13490,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -10130,7 +13500,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -10140,7 +13510,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -10150,7 +13520,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -10167,6 +13537,9 @@ pub struct v4l2_event_frame_sync { } #[test] fn bindgen_test_layout_v4l2_event_frame_sync() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -10178,9 +13551,7 @@ fn bindgen_test_layout_v4l2_event_frame_sync() { concat!("Alignment of ", stringify!(v4l2_event_frame_sync)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sequence as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sequence) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10197,6 +13568,9 @@ pub struct v4l2_event_src_change { } #[test] fn bindgen_test_layout_v4l2_event_src_change() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -10208,7 +13582,7 @@ fn bindgen_test_layout_v4l2_event_src_change() { concat!("Alignment of ", stringify!(v4l2_event_src_change)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).changes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).changes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10218,11 +13592,7 @@ fn bindgen_test_layout_v4l2_event_src_change() { ) ); } -#[doc = " struct v4l2_event_motion_det - motion detection event"] -#[doc = " @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the"] -#[doc = " frame_sequence field is valid."] -#[doc = " @frame_sequence: the frame sequence number associated with this event."] -#[doc = " @region_mask: which regions detected motion."] +#[doc = " struct v4l2_event_motion_det - motion detection event\n @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the\n frame_sequence field is valid.\n @frame_sequence: the frame sequence number associated with this event.\n @region_mask: which regions detected motion."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_event_motion_det { @@ -10232,6 +13602,9 @@ pub struct v4l2_event_motion_det { } #[test] fn bindgen_test_layout_v4l2_event_motion_det() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -10243,7 +13616,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { concat!("Alignment of ", stringify!(v4l2_event_motion_det)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10253,9 +13626,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sequence as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sequence) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10265,9 +13636,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).region_mask as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).region_mask) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10300,6 +13669,9 @@ pub union v4l2_event__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -10311,7 +13683,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_event__bindgen_ty_1)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vsync) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10321,7 +13693,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ctrl as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ctrl) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10331,9 +13703,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sync as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sync) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10343,9 +13713,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).src_change as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).src_change) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10355,9 +13723,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).motion_det as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).motion_det) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10367,7 +13733,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10379,6 +13745,8 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_event() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 120usize, @@ -10390,7 +13758,7 @@ fn bindgen_test_layout_v4l2_event() { concat!("Alignment of ", stringify!(v4l2_event)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10400,7 +13768,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10410,7 +13778,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pending as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pending) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -10420,7 +13788,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sequence as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -10430,7 +13798,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timestamp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -10440,7 +13808,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -10450,7 +13818,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -10470,6 +13838,9 @@ pub struct v4l2_event_subscription { } #[test] fn bindgen_test_layout_v4l2_event_subscription() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -10481,7 +13852,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { concat!("Alignment of ", stringify!(v4l2_event_subscription)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10491,7 +13862,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10501,7 +13872,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10511,9 +13882,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -10537,6 +13906,9 @@ pub union v4l2_dbg_match__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -10548,9 +13920,7 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_dbg_match__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).addr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10560,9 +13930,7 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10574,6 +13942,8 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dbg_match() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 36usize, @@ -10585,7 +13955,7 @@ fn bindgen_test_layout_v4l2_dbg_match() { concat!("Alignment of ", stringify!(v4l2_dbg_match)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10605,6 +13975,8 @@ pub struct v4l2_dbg_register { } #[test] fn bindgen_test_layout_v4l2_dbg_register() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -10616,7 +13988,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { concat!("Alignment of ", stringify!(v4l2_dbg_register)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).match_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).match_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10626,7 +13998,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -10636,7 +14008,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reg) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -10646,7 +14018,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -10666,6 +14038,8 @@ pub struct v4l2_dbg_chip_info { } #[test] fn bindgen_test_layout_v4l2_dbg_chip_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -10677,7 +14051,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { concat!("Alignment of ", stringify!(v4l2_dbg_chip_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).match_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).match_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10687,7 +14061,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -10697,7 +14071,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -10707,7 +14081,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -10717,14 +14091,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); } -#[doc = " struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument"] -#[doc = " @index:\ton return, index of the first created buffer"] -#[doc = " @count:\tentry: number of requested buffers,"] -#[doc = "\t\treturn: number of created buffers"] -#[doc = " @memory:\tenum v4l2_memory; buffer memory type"] -#[doc = " @format:\tframe format, for which buffers are requested"] -#[doc = " @capabilities: capabilities of this buffer type."] -#[doc = " @reserved:\tfuture extensions"] +#[doc = " struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument\n @index:\ton return, index of the first created buffer\n @count:\tentry: number of requested buffers,\n\t\treturn: number of created buffers\n @memory:\tenum v4l2_memory; buffer memory type\n @format:\tframe format, for which buffers are requested\n @capabilities: capabilities of this buffer type.\n @flags:\tadditional buffer management attributes (ignored unless the\n\t\tqueue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability\n\t\tand configured for MMAP streaming I/O).\n @reserved:\tfuture extensions"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_create_buffers { @@ -10733,10 +14100,13 @@ pub struct v4l2_create_buffers { pub memory: __u32, pub format: v4l2_format, pub capabilities: __u32, - pub reserved: [__u32; 7usize], + pub flags: __u32, + pub reserved: [__u32; 6usize], } #[test] fn bindgen_test_layout_v4l2_create_buffers() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 248usize, @@ -10748,7 +14118,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { concat!("Alignment of ", stringify!(v4l2_create_buffers)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10758,7 +14128,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10768,7 +14138,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10778,7 +14148,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -10788,9 +14158,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 216usize, concat!( "Offset of field: ", @@ -10800,8 +14168,18 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 220usize, + concat!( + "Offset of field: ", + stringify!(v4l2_create_buffers), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 224usize, concat!( "Offset of field: ", stringify!(v4l2_create_buffers), @@ -10810,3 +14188,14 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); } +pub const V4L2_FWHT_FL_IS_INTERLACED: ::std::os::raw::c_ulong = 1; +pub const V4L2_FWHT_FL_IS_BOTTOM_FIRST: ::std::os::raw::c_ulong = 2; +pub const V4L2_FWHT_FL_IS_ALTERNATE: ::std::os::raw::c_ulong = 4; +pub const V4L2_FWHT_FL_IS_BOTTOM_FIELD: ::std::os::raw::c_ulong = 8; +pub const V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 16; +pub const V4L2_FWHT_FL_CB_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 32; +pub const V4L2_FWHT_FL_CR_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 64; +pub const V4L2_FWHT_FL_CHROMA_FULL_HEIGHT: ::std::os::raw::c_ulong = 128; +pub const V4L2_FWHT_FL_CHROMA_FULL_WIDTH: ::std::os::raw::c_ulong = 256; +pub const V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 512; +pub const V4L2_FWHT_FL_I_FRAME: ::std::os::raw::c_ulong = 1024; diff --git a/lib/src/bindings/videodev2_64.rs b/lib/src/bindings/videodev2_64.rs index c6014cf..6127914 100644 --- a/lib/src/bindings/videodev2_64.rs +++ b/lib/src/bindings/videodev2_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.1 */ +/* automatically generated by rust-bindgen 0.63.0 */ pub const _SYS_TIME_H: u32 = 1; pub const _FEATURES_H: u32 = 1; @@ -28,13 +28,13 @@ pub const __STDC_IEC_559_COMPLEX__: u32 = 1; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 33; +pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __WORDSIZE: u32 = 64; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; pub const __SYSCALL_WORDSIZE: u32 = 64; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const _BITS_TYPES_H: u32 = 1; pub const __TIMESIZE: u32 = 64; @@ -43,12 +43,12 @@ pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; pub const __STATFS_MATCHES_STATFS64: u32 = 1; -pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const __time_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6usize] = b"stosq\0"; pub const __sigset_t_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; pub const _BITS_ENDIAN_H: u32 = 1; @@ -113,6 +113,7 @@ pub const V4L2_CTRL_CLASS_FM_RX: u32 = 10551296; pub const V4L2_CTRL_CLASS_RF_TUNER: u32 = 10616832; pub const V4L2_CTRL_CLASS_DETECT: u32 = 10682368; pub const V4L2_CTRL_CLASS_CODEC_STATELESS: u32 = 10747904; +pub const V4L2_CTRL_CLASS_COLORIMETRY: u32 = 10813440; pub const V4L2_CID_BASE: u32 = 9963776; pub const V4L2_CID_USER_BASE: u32 = 9963776; pub const V4L2_CID_USER_CLASS: u32 = 9961473; @@ -157,7 +158,8 @@ pub const V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: u32 = 9963815; pub const V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: u32 = 9963816; pub const V4L2_CID_ALPHA_COMPONENT: u32 = 9963817; pub const V4L2_CID_COLORFX_CBCR: u32 = 9963818; -pub const V4L2_CID_LASTP1: u32 = 9963819; +pub const V4L2_CID_COLORFX_RGB: u32 = 9963819; +pub const V4L2_CID_LASTP1: u32 = 9963820; pub const V4L2_CID_USER_MEYE_BASE: u32 = 9967872; pub const V4L2_CID_USER_BTTV_BASE: u32 = 9967888; pub const V4L2_CID_USER_S2255_BASE: u32 = 9967920; @@ -171,6 +173,9 @@ pub const V4L2_CID_USER_IMX_BASE: u32 = 9968048; pub const V4L2_CID_USER_ATMEL_ISC_BASE: u32 = 9968064; pub const V4L2_CID_USER_CODA_BASE: u32 = 9968096; pub const V4L2_CID_USER_CCS_BASE: u32 = 9968112; +pub const V4L2_CID_USER_ALLEGRO_BASE: u32 = 9968240; +pub const V4L2_CID_USER_ISL7998X_BASE: u32 = 9968256; +pub const V4L2_CID_USER_DW100_BASE: u32 = 9968272; pub const V4L2_CID_CODEC_BASE: u32 = 10029312; pub const V4L2_CID_CODEC_CLASS: u32 = 10027009; pub const V4L2_CID_MPEG_STREAM_TYPE: u32 = 10029312; @@ -226,6 +231,13 @@ pub const V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: u32 = 10029539; pub const V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: u32 = 10029540; pub const V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME: u32 = 10029541; pub const V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID: u32 = 10029542; +pub const V4L2_CID_MPEG_VIDEO_AU_DELIMITER: u32 = 10029543; +pub const V4L2_CID_MPEG_VIDEO_LTR_COUNT: u32 = 10029544; +pub const V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX: u32 = 10029545; +pub const V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES: u32 = 10029546; +pub const V4L2_CID_MPEG_VIDEO_DEC_CONCEAL_COLOR: u32 = 10029547; +pub const V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD: u32 = 10029548; +pub const V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE: u32 = 10029549; pub const V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL: u32 = 10029582; pub const V4L2_CID_MPEG_VIDEO_MPEG2_PROFILE: u32 = 10029583; pub const V4L2_CID_FWHT_I_FRAME_QP: u32 = 10029602; @@ -359,6 +371,8 @@ pub const V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP: u32 = 10029961; pub const V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP: u32 = 10029962; pub const V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP: u32 = 10029963; pub const V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP: u32 = 10029964; +pub const V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: u32 = 10029965; +pub const V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: u32 = 10029966; pub const V4L2_CID_CODEC_CX2341X_BASE: u32 = 10031104; pub const V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE: u32 = 10031104; pub const V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER: u32 = 10031105; @@ -507,6 +521,7 @@ pub const V4L2_CID_TEST_PATTERN_GREENR: u32 = 10356997; pub const V4L2_CID_TEST_PATTERN_BLUE: u32 = 10356998; pub const V4L2_CID_TEST_PATTERN_GREENB: u32 = 10356999; pub const V4L2_CID_UNIT_CELL_SIZE: u32 = 10357000; +pub const V4L2_CID_NOTIFY_GAINS: u32 = 10357001; pub const V4L2_CID_IMAGE_PROC_CLASS_BASE: u32 = 10422528; pub const V4L2_CID_IMAGE_PROC_CLASS: u32 = 10420225; pub const V4L2_CID_LINK_FREQ: u32 = 10422529; @@ -602,6 +617,8 @@ pub const V4L2_H264_DPB_ENTRY_FLAG_FIELD: u32 = 8; pub const V4L2_H264_DECODE_PARAM_FLAG_IDR_PIC: u32 = 1; pub const V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC: u32 = 2; pub const V4L2_H264_DECODE_PARAM_FLAG_BOTTOM_FIELD: u32 = 4; +pub const V4L2_H264_DECODE_PARAM_FLAG_PFRAME: u32 = 8; +pub const V4L2_H264_DECODE_PARAM_FLAG_BFRAME: u32 = 16; pub const V4L2_CID_STATELESS_H264_DECODE_PARAMS: u32 = 10750215; pub const V4L2_FWHT_VERSION: u32 = 3; pub const V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET: u32 = 16; @@ -610,6 +627,172 @@ pub const V4L2_FWHT_FL_PIXENC_YUV: u32 = 524288; pub const V4L2_FWHT_FL_PIXENC_RGB: u32 = 1048576; pub const V4L2_FWHT_FL_PIXENC_HSV: u32 = 1572864; pub const V4L2_CID_STATELESS_FWHT_PARAMS: u32 = 10750308; +pub const V4L2_VP8_SEGMENT_FLAG_ENABLED: u32 = 1; +pub const V4L2_VP8_SEGMENT_FLAG_UPDATE_MAP: u32 = 2; +pub const V4L2_VP8_SEGMENT_FLAG_UPDATE_FEATURE_DATA: u32 = 4; +pub const V4L2_VP8_SEGMENT_FLAG_DELTA_VALUE_MODE: u32 = 8; +pub const V4L2_VP8_LF_ADJ_ENABLE: u32 = 1; +pub const V4L2_VP8_LF_DELTA_UPDATE: u32 = 2; +pub const V4L2_VP8_LF_FILTER_TYPE_SIMPLE: u32 = 4; +pub const V4L2_VP8_COEFF_PROB_CNT: u32 = 11; +pub const V4L2_VP8_MV_PROB_CNT: u32 = 19; +pub const V4L2_VP8_FRAME_FLAG_KEY_FRAME: u32 = 1; +pub const V4L2_VP8_FRAME_FLAG_EXPERIMENTAL: u32 = 2; +pub const V4L2_VP8_FRAME_FLAG_SHOW_FRAME: u32 = 4; +pub const V4L2_VP8_FRAME_FLAG_MB_NO_SKIP_COEFF: u32 = 8; +pub const V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN: u32 = 16; +pub const V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT: u32 = 32; +pub const V4L2_CID_STATELESS_VP8_FRAME: u32 = 10750408; +pub const V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE: u32 = 1; +pub const V4L2_CID_STATELESS_MPEG2_SEQUENCE: u32 = 10750428; +pub const V4L2_MPEG2_PIC_CODING_TYPE_I: u32 = 1; +pub const V4L2_MPEG2_PIC_CODING_TYPE_P: u32 = 2; +pub const V4L2_MPEG2_PIC_CODING_TYPE_B: u32 = 3; +pub const V4L2_MPEG2_PIC_CODING_TYPE_D: u32 = 4; +pub const V4L2_MPEG2_PIC_TOP_FIELD: u32 = 1; +pub const V4L2_MPEG2_PIC_BOTTOM_FIELD: u32 = 2; +pub const V4L2_MPEG2_PIC_FRAME: u32 = 3; +pub const V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST: u32 = 1; +pub const V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT: u32 = 2; +pub const V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV: u32 = 4; +pub const V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE: u32 = 8; +pub const V4L2_MPEG2_PIC_FLAG_INTRA_VLC: u32 = 16; +pub const V4L2_MPEG2_PIC_FLAG_ALT_SCAN: u32 = 32; +pub const V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST: u32 = 64; +pub const V4L2_MPEG2_PIC_FLAG_PROGRESSIVE: u32 = 128; +pub const V4L2_CID_STATELESS_MPEG2_PICTURE: u32 = 10750429; +pub const V4L2_CID_STATELESS_MPEG2_QUANTISATION: u32 = 10750430; +pub const V4L2_CID_STATELESS_HEVC_SPS: u32 = 10750608; +pub const V4L2_CID_STATELESS_HEVC_PPS: u32 = 10750609; +pub const V4L2_CID_STATELESS_HEVC_SLICE_PARAMS: u32 = 10750610; +pub const V4L2_CID_STATELESS_HEVC_SCALING_MATRIX: u32 = 10750611; +pub const V4L2_CID_STATELESS_HEVC_DECODE_PARAMS: u32 = 10750612; +pub const V4L2_CID_STATELESS_HEVC_DECODE_MODE: u32 = 10750613; +pub const V4L2_CID_STATELESS_HEVC_START_CODE: u32 = 10750614; +pub const V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS: u32 = 10750615; +pub const V4L2_HEVC_SLICE_TYPE_B: u32 = 0; +pub const V4L2_HEVC_SLICE_TYPE_P: u32 = 1; +pub const V4L2_HEVC_SLICE_TYPE_I: u32 = 2; +pub const V4L2_HEVC_SPS_FLAG_SEPARATE_COLOUR_PLANE: u32 = 1; +pub const V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED: u32 = 2; +pub const V4L2_HEVC_SPS_FLAG_AMP_ENABLED: u32 = 4; +pub const V4L2_HEVC_SPS_FLAG_SAMPLE_ADAPTIVE_OFFSET: u32 = 8; +pub const V4L2_HEVC_SPS_FLAG_PCM_ENABLED: u32 = 16; +pub const V4L2_HEVC_SPS_FLAG_PCM_LOOP_FILTER_DISABLED: u32 = 32; +pub const V4L2_HEVC_SPS_FLAG_LONG_TERM_REF_PICS_PRESENT: u32 = 64; +pub const V4L2_HEVC_SPS_FLAG_SPS_TEMPORAL_MVP_ENABLED: u32 = 128; +pub const V4L2_HEVC_SPS_FLAG_STRONG_INTRA_SMOOTHING_ENABLED: u32 = 256; +pub const V4L2_HEVC_PPS_FLAG_DEPENDENT_SLICE_SEGMENT_ENABLED: u32 = 1; +pub const V4L2_HEVC_PPS_FLAG_OUTPUT_FLAG_PRESENT: u32 = 2; +pub const V4L2_HEVC_PPS_FLAG_SIGN_DATA_HIDING_ENABLED: u32 = 4; +pub const V4L2_HEVC_PPS_FLAG_CABAC_INIT_PRESENT: u32 = 8; +pub const V4L2_HEVC_PPS_FLAG_CONSTRAINED_INTRA_PRED: u32 = 16; +pub const V4L2_HEVC_PPS_FLAG_TRANSFORM_SKIP_ENABLED: u32 = 32; +pub const V4L2_HEVC_PPS_FLAG_CU_QP_DELTA_ENABLED: u32 = 64; +pub const V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT: u32 = 128; +pub const V4L2_HEVC_PPS_FLAG_WEIGHTED_PRED: u32 = 256; +pub const V4L2_HEVC_PPS_FLAG_WEIGHTED_BIPRED: u32 = 512; +pub const V4L2_HEVC_PPS_FLAG_TRANSQUANT_BYPASS_ENABLED: u32 = 1024; +pub const V4L2_HEVC_PPS_FLAG_TILES_ENABLED: u32 = 2048; +pub const V4L2_HEVC_PPS_FLAG_ENTROPY_CODING_SYNC_ENABLED: u32 = 4096; +pub const V4L2_HEVC_PPS_FLAG_LOOP_FILTER_ACROSS_TILES_ENABLED: u32 = 8192; +pub const V4L2_HEVC_PPS_FLAG_PPS_LOOP_FILTER_ACROSS_SLICES_ENABLED: u32 = 16384; +pub const V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_OVERRIDE_ENABLED: u32 = 32768; +pub const V4L2_HEVC_PPS_FLAG_PPS_DISABLE_DEBLOCKING_FILTER: u32 = 65536; +pub const V4L2_HEVC_PPS_FLAG_LISTS_MODIFICATION_PRESENT: u32 = 131072; +pub const V4L2_HEVC_PPS_FLAG_SLICE_SEGMENT_HEADER_EXTENSION_PRESENT: u32 = 262144; +pub const V4L2_HEVC_PPS_FLAG_DEBLOCKING_FILTER_CONTROL_PRESENT: u32 = 524288; +pub const V4L2_HEVC_PPS_FLAG_UNIFORM_SPACING: u32 = 1048576; +pub const V4L2_HEVC_DPB_ENTRY_LONG_TERM_REFERENCE: u32 = 1; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME: u32 = 0; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_FIELD: u32 = 1; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_FIELD: u32 = 2; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM: u32 = 3; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP: u32 = 4; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_BOTTOM_TOP: u32 = 5; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_TOP_BOTTOM: u32 = 6; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING: u32 = 7; +pub const V4L2_HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING: u32 = 8; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_PREVIOUS_BOTTOM: u32 = 9; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_PREVIOUS_TOP: u32 = 10; +pub const V4L2_HEVC_SEI_PIC_STRUCT_TOP_PAIRED_NEXT_BOTTOM: u32 = 11; +pub const V4L2_HEVC_SEI_PIC_STRUCT_BOTTOM_PAIRED_NEXT_TOP: u32 = 12; +pub const V4L2_HEVC_DPB_ENTRIES_NUM_MAX: u32 = 16; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_LUMA: u32 = 1; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_SAO_CHROMA: u32 = 2; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_TEMPORAL_MVP_ENABLED: u32 = 4; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_MVD_L1_ZERO: u32 = 8; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_CABAC_INIT: u32 = 16; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_COLLOCATED_FROM_L0: u32 = 32; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_USE_INTEGER_MV: u32 = 64; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_DEBLOCKING_FILTER_DISABLED: u32 = 128; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_SLICE_LOOP_FILTER_ACROSS_SLICES_ENABLED: u32 = 256; +pub const V4L2_HEVC_SLICE_PARAMS_FLAG_DEPENDENT_SLICE_SEGMENT: u32 = 512; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC: u32 = 1; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_IDR_PIC: u32 = 2; +pub const V4L2_HEVC_DECODE_PARAM_FLAG_NO_OUTPUT_OF_PRIOR: u32 = 4; +pub const V4L2_CID_COLORIMETRY_CLASS_BASE: u32 = 10815744; +pub const V4L2_CID_COLORIMETRY_CLASS: u32 = 10813441; +pub const V4L2_CID_COLORIMETRY_HDR10_CLL_INFO: u32 = 10815744; +pub const V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY: u32 = 10815745; +pub const V4L2_HDR10_MASTERING_PRIMARIES_X_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_PRIMARIES_X_HIGH: u32 = 37000; +pub const V4L2_HDR10_MASTERING_PRIMARIES_Y_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_PRIMARIES_Y_HIGH: u32 = 42000; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_X_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_X_HIGH: u32 = 37000; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_Y_LOW: u32 = 5; +pub const V4L2_HDR10_MASTERING_WHITE_POINT_Y_HIGH: u32 = 42000; +pub const V4L2_HDR10_MASTERING_MAX_LUMA_LOW: u32 = 50000; +pub const V4L2_HDR10_MASTERING_MAX_LUMA_HIGH: u32 = 100000000; +pub const V4L2_HDR10_MASTERING_MIN_LUMA_LOW: u32 = 1; +pub const V4L2_HDR10_MASTERING_MIN_LUMA_HIGH: u32 = 50000; +pub const V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED: u32 = 1; +pub const V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE: u32 = 2; +pub const V4L2_VP9_SEGMENTATION_FLAG_ENABLED: u32 = 1; +pub const V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP: u32 = 2; +pub const V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE: u32 = 4; +pub const V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA: u32 = 8; +pub const V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE: u32 = 16; +pub const V4L2_VP9_SEG_LVL_ALT_Q: u32 = 0; +pub const V4L2_VP9_SEG_LVL_ALT_L: u32 = 1; +pub const V4L2_VP9_SEG_LVL_REF_FRAME: u32 = 2; +pub const V4L2_VP9_SEG_LVL_SKIP: u32 = 3; +pub const V4L2_VP9_SEG_LVL_MAX: u32 = 4; +pub const V4L2_VP9_SEGMENT_FEATURE_ENABLED_MASK: u32 = 15; +pub const V4L2_VP9_FRAME_FLAG_KEY_FRAME: u32 = 1; +pub const V4L2_VP9_FRAME_FLAG_SHOW_FRAME: u32 = 2; +pub const V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT: u32 = 4; +pub const V4L2_VP9_FRAME_FLAG_INTRA_ONLY: u32 = 8; +pub const V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV: u32 = 16; +pub const V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX: u32 = 32; +pub const V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE: u32 = 64; +pub const V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING: u32 = 128; +pub const V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING: u32 = 256; +pub const V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING: u32 = 512; +pub const V4L2_VP9_SIGN_BIAS_LAST: u32 = 1; +pub const V4L2_VP9_SIGN_BIAS_GOLDEN: u32 = 2; +pub const V4L2_VP9_SIGN_BIAS_ALT: u32 = 4; +pub const V4L2_VP9_RESET_FRAME_CTX_NONE: u32 = 0; +pub const V4L2_VP9_RESET_FRAME_CTX_SPEC: u32 = 1; +pub const V4L2_VP9_RESET_FRAME_CTX_ALL: u32 = 2; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP: u32 = 0; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH: u32 = 1; +pub const V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP: u32 = 2; +pub const V4L2_VP9_INTERP_FILTER_BILINEAR: u32 = 3; +pub const V4L2_VP9_INTERP_FILTER_SWITCHABLE: u32 = 4; +pub const V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE: u32 = 0; +pub const V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE: u32 = 1; +pub const V4L2_VP9_REFERENCE_MODE_SELECT: u32 = 2; +pub const V4L2_VP9_PROFILE_MAX: u32 = 3; +pub const V4L2_CID_STATELESS_VP9_FRAME: u32 = 10750508; +pub const V4L2_VP9_NUM_FRAME_CTX: u32 = 4; +pub const V4L2_CID_STATELESS_VP9_COMPRESSED_HDR: u32 = 10750509; +pub const V4L2_VP9_TX_MODE_ONLY_4X4: u32 = 0; +pub const V4L2_VP9_TX_MODE_ALLOW_8X8: u32 = 1; +pub const V4L2_VP9_TX_MODE_ALLOW_16X16: u32 = 2; +pub const V4L2_VP9_TX_MODE_ALLOW_32X32: u32 = 3; +pub const V4L2_VP9_TX_MODE_SELECT: u32 = 4; pub const V4L2_CTRL_CLASS_MPEG: u32 = 10027008; pub const V4L2_CID_MPEG_CLASS: u32 = 10027009; pub const V4L2_CID_MPEG_BASE: u32 = 10029312; @@ -641,7 +824,6 @@ pub const V4L2_CAP_EXT_PIX_FORMAT: u32 = 2097152; pub const V4L2_CAP_SDR_OUTPUT: u32 = 4194304; pub const V4L2_CAP_META_CAPTURE: u32 = 8388608; pub const V4L2_CAP_READWRITE: u32 = 16777216; -pub const V4L2_CAP_ASYNCIO: u32 = 33554432; pub const V4L2_CAP_STREAMING: u32 = 67108864; pub const V4L2_CAP_META_OUTPUT: u32 = 134217728; pub const V4L2_CAP_TOUCH: u32 = 268435456; @@ -675,6 +857,7 @@ pub const V4L2_JPEG_MARKER_DQT: u32 = 16; pub const V4L2_JPEG_MARKER_DRI: u32 = 32; pub const V4L2_JPEG_MARKER_COM: u32 = 64; pub const V4L2_JPEG_MARKER_APP: u32 = 128; +pub const V4L2_MEMORY_FLAG_NON_COHERENT: u32 = 1; pub const V4L2_BUF_CAP_SUPPORTS_MMAP: u32 = 1; pub const V4L2_BUF_CAP_SUPPORTS_USERPTR: u32 = 2; pub const V4L2_BUF_CAP_SUPPORTS_DMABUF: u32 = 4; @@ -791,6 +974,7 @@ pub const V4L2_CTRL_FLAG_VOLATILE: u32 = 128; pub const V4L2_CTRL_FLAG_HAS_PAYLOAD: u32 = 256; pub const V4L2_CTRL_FLAG_EXECUTE_ON_WRITE: u32 = 512; pub const V4L2_CTRL_FLAG_MODIFY_LAYOUT: u32 = 1024; +pub const V4L2_CTRL_FLAG_DYNAMIC_ARRAY: u32 = 2048; pub const V4L2_CTRL_FLAG_NEXT_CTRL: u32 = 2147483648; pub const V4L2_CTRL_FLAG_NEXT_COMPOUND: u32 = 1073741824; pub const V4L2_CID_MAX_CTRLS: u32 = 1024; @@ -873,8 +1057,8 @@ pub const V4L2_MPEG_VBI_IVTV_TELETEXT_B: u32 = 1; pub const V4L2_MPEG_VBI_IVTV_CAPTION_525: u32 = 4; pub const V4L2_MPEG_VBI_IVTV_WSS_625: u32 = 5; pub const V4L2_MPEG_VBI_IVTV_VPS: u32 = 7; -pub const V4L2_MPEG_VBI_IVTV_MAGIC0: &'static [u8; 5usize] = b"itv0\0"; -pub const V4L2_MPEG_VBI_IVTV_MAGIC1: &'static [u8; 5usize] = b"ITV0\0"; +pub const V4L2_MPEG_VBI_IVTV_MAGIC0: &[u8; 5usize] = b"itv0\0"; +pub const V4L2_MPEG_VBI_IVTV_MAGIC1: &[u8; 5usize] = b"ITV0\0"; pub const V4L2_EVENT_ALL: u32 = 0; pub const V4L2_EVENT_VSYNC: u32 = 1; pub const V4L2_EVENT_EOS: u32 = 2; @@ -886,6 +1070,7 @@ pub const V4L2_EVENT_PRIVATE_START: u32 = 134217728; pub const V4L2_EVENT_CTRL_CH_VALUE: u32 = 1; pub const V4L2_EVENT_CTRL_CH_FLAGS: u32 = 2; pub const V4L2_EVENT_CTRL_CH_RANGE: u32 = 4; +pub const V4L2_EVENT_CTRL_CH_DIMENSIONS: u32 = 8; pub const V4L2_EVENT_SRC_CH_RESOLUTION: u32 = 1; pub const V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ: u32 = 1; pub const V4L2_EVENT_SUB_FL_SEND_INITIAL: u32 = 1; @@ -899,6 +1084,9 @@ pub const V4L2_CHIP_MATCH_AC97: u32 = 3; pub const V4L2_CHIP_FL_READABLE: u32 = 1; pub const V4L2_CHIP_FL_WRITABLE: u32 = 2; pub const BASE_VIDIOC_PRIVATE: u32 = 192; +pub const V4L2_CAP_ASYNCIO: u32 = 33554432; +pub const V4L2_FWHT_FL_COMPONENTS_NUM_MSK: u32 = 458752; +pub const V4L2_FWHT_FL_PIXENC_MSK: u32 = 1572864; pub type __u_char = ::std::os::raw::c_uchar; pub type __u_short = ::std::os::raw::c_ushort; pub type __u_int = ::std::os::raw::c_uint; @@ -940,6 +1128,8 @@ pub struct __fsid_t { } #[test] fn bindgen_test_layout___fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, @@ -951,7 +1141,7 @@ fn bindgen_test_layout___fsid_t() { concat!("Alignment of ", stringify!(__fsid_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -968,7 +1158,6 @@ pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = ::std::os::raw::c_long; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; @@ -998,6 +1187,8 @@ pub struct timeval { } #[test] fn bindgen_test_layout_timeval() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1009,7 +1200,7 @@ fn bindgen_test_layout_timeval() { concat!("Alignment of ", stringify!(timeval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1019,7 +1210,7 @@ fn bindgen_test_layout_timeval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1037,6 +1228,8 @@ pub struct __sigset_t { } #[test] fn bindgen_test_layout___sigset_t() { + const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, @@ -1048,7 +1241,7 @@ fn bindgen_test_layout___sigset_t() { concat!("Alignment of ", stringify!(__sigset_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1067,6 +1260,8 @@ pub struct timespec { } #[test] fn bindgen_test_layout_timespec() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1078,7 +1273,7 @@ fn bindgen_test_layout_timespec() { concat!("Alignment of ", stringify!(timespec)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1088,7 +1283,7 @@ fn bindgen_test_layout_timespec() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1106,6 +1301,8 @@ pub struct fd_set { } #[test] fn bindgen_test_layout_fd_set() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -1117,7 +1314,7 @@ fn bindgen_test_layout_fd_set() { concat!("Alignment of ", stringify!(fd_set)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1155,6 +1352,8 @@ pub struct timezone { } #[test] fn bindgen_test_layout_timezone() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1166,7 +1365,7 @@ fn bindgen_test_layout_timezone() { concat!("Alignment of ", stringify!(timezone)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tz_minuteswest as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tz_minuteswest) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1176,7 +1375,7 @@ fn bindgen_test_layout_timezone() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tz_dsttime as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1210,6 +1409,8 @@ pub struct itimerval { } #[test] fn bindgen_test_layout_itimerval() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -1221,7 +1422,7 @@ fn bindgen_test_layout_itimerval() { concat!("Alignment of ", stringify!(itimerval)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).it_interval as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1231,7 +1432,7 @@ fn bindgen_test_layout_itimerval() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).it_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1282,6 +1483,8 @@ pub struct __kernel_fd_set { } #[test] fn bindgen_test_layout___kernel_fd_set() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__kernel_fd_set>(), 128usize, @@ -1293,7 +1496,7 @@ fn bindgen_test_layout___kernel_fd_set() { concat!("Alignment of ", stringify!(__kernel_fd_set)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1332,6 +1535,8 @@ pub struct __kernel_fsid_t { } #[test] fn bindgen_test_layout___kernel_fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__kernel_fsid_t>(), 8usize, @@ -1343,7 +1548,7 @@ fn bindgen_test_layout___kernel_fsid_t() { concat!("Alignment of ", stringify!(__kernel_fsid_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1384,6 +1589,8 @@ pub struct v4l2_edid { } #[test] fn bindgen_test_layout_v4l2_edid() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -1395,7 +1602,7 @@ fn bindgen_test_layout_v4l2_edid() { concat!("Alignment of ", stringify!(v4l2_edid)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1405,7 +1612,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).start_block as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start_block) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1415,7 +1622,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).blocks as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).blocks) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1425,7 +1632,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -1435,7 +1642,7 @@ fn bindgen_test_layout_v4l2_edid() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).edid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).edid) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1470,6 +1677,7 @@ pub const v4l2_colorfx_V4L2_COLORFX_SILHOUETTE: v4l2_colorfx = 12; pub const v4l2_colorfx_V4L2_COLORFX_SOLARIZATION: v4l2_colorfx = 13; pub const v4l2_colorfx_V4L2_COLORFX_ANTIQUE: v4l2_colorfx = 14; pub const v4l2_colorfx_V4L2_COLORFX_SET_CBCR: v4l2_colorfx = 15; +pub const v4l2_colorfx_V4L2_COLORFX_SET_RGB: v4l2_colorfx = 16; pub type v4l2_colorfx = ::std::os::raw::c_uint; pub const v4l2_mpeg_stream_type_V4L2_MPEG_STREAM_TYPE_MPEG2_PS: v4l2_mpeg_stream_type = 0; pub const v4l2_mpeg_stream_type_V4L2_MPEG_STREAM_TYPE_MPEG2_TS: v4l2_mpeg_stream_type = 1; @@ -1672,6 +1880,9 @@ pub const v4l2_mpeg_video_multi_slice_mode_V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_M pub const v4l2_mpeg_video_multi_slice_mode_V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES: v4l2_mpeg_video_multi_slice_mode = 2; pub type v4l2_mpeg_video_multi_slice_mode = ::std::os::raw::c_uint; +pub const v4l2_mpeg_video_intra_refresh_period_type_V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM : v4l2_mpeg_video_intra_refresh_period_type = 0 ; +pub const v4l2_mpeg_video_intra_refresh_period_type_V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC : v4l2_mpeg_video_intra_refresh_period_type = 1 ; +pub type v4l2_mpeg_video_intra_refresh_period_type = ::std::os::raw::c_uint; pub const v4l2_mpeg_video_mpeg2_level_V4L2_MPEG_VIDEO_MPEG2_LEVEL_LOW: v4l2_mpeg_video_mpeg2_level = 0; pub const v4l2_mpeg_video_mpeg2_level_V4L2_MPEG_VIDEO_MPEG2_LEVEL_MAIN: @@ -2111,12 +2322,15 @@ pub const v4l2_stateless_h264_decode_mode_V4L2_STATELESS_H264_DECODE_MODE_SLICE_ v4l2_stateless_h264_decode_mode = 0; pub const v4l2_stateless_h264_decode_mode_V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED: v4l2_stateless_h264_decode_mode = 1; +#[doc = " enum v4l2_stateless_h264_decode_mode - Decoding mode\n\n @V4L2_STATELESS_H264_DECODE_MODE_SLICE_BASED: indicates that decoding\n is performed one slice at a time. In this mode,\n V4L2_CID_STATELESS_H264_SLICE_PARAMS must contain the parsed slice\n parameters and the OUTPUT buffer must contain a single slice.\n V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF feature is used\n in order to support multislice frames.\n @V4L2_STATELESS_H264_DECODE_MODE_FRAME_BASED: indicates that\n decoding is performed per frame. The OUTPUT buffer must contain\n all slices and also both fields. This mode is typically supported\n by device drivers that are able to parse the slice(s) header(s)\n in hardware. When this mode is selected,\n V4L2_CID_STATELESS_H264_SLICE_PARAMS is not used."] pub type v4l2_stateless_h264_decode_mode = ::std::os::raw::c_uint; pub const v4l2_stateless_h264_start_code_V4L2_STATELESS_H264_START_CODE_NONE: v4l2_stateless_h264_start_code = 0; pub const v4l2_stateless_h264_start_code_V4L2_STATELESS_H264_START_CODE_ANNEX_B: v4l2_stateless_h264_start_code = 1; +#[doc = " enum v4l2_stateless_h264_start_code - Start code\n\n @V4L2_STATELESS_H264_START_CODE_NONE: slices are passed\n to the driver without any start code.\n @V4L2_STATELESS_H264_START_CODE_ANNEX_B: slices are passed\n to the driver with an Annex B start code prefix\n (legal start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001).\n This mode is typically supported by device drivers that parse\n the start code in hardware."] pub type v4l2_stateless_h264_start_code = ::std::os::raw::c_uint; +#[doc = " struct v4l2_ctrl_h264_sps - H264 sequence parameter set\n\n All the members on this sequence parameter set structure match the\n sequence parameter set syntax as specified by the H264 specification.\n\n @profile_idc: see H264 specification.\n @constraint_set_flags: see H264 specification.\n @level_idc: see H264 specification.\n @seq_parameter_set_id: see H264 specification.\n @chroma_format_idc: see H264 specification.\n @bit_depth_luma_minus8: see H264 specification.\n @bit_depth_chroma_minus8: see H264 specification.\n @log2_max_frame_num_minus4: see H264 specification.\n @pic_order_cnt_type: see H264 specification.\n @log2_max_pic_order_cnt_lsb_minus4: see H264 specification.\n @max_num_ref_frames: see H264 specification.\n @num_ref_frames_in_pic_order_cnt_cycle: see H264 specification.\n @offset_for_ref_frame: see H264 specification.\n @offset_for_non_ref_pic: see H264 specification.\n @offset_for_top_to_bottom_field: see H264 specification.\n @pic_width_in_mbs_minus1: see H264 specification.\n @pic_height_in_map_units_minus1: see H264 specification.\n @flags: see V4L2_H264_SPS_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_sps { @@ -2141,6 +2355,8 @@ pub struct v4l2_ctrl_h264_sps { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_sps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1048usize, @@ -2152,7 +2368,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_sps)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).profile_idc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).profile_idc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2162,9 +2378,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).constraint_set_flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).constraint_set_flags) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2174,7 +2388,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).level_idc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).level_idc) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2184,9 +2398,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, 3usize, concat!( "Offset of field: ", @@ -2196,9 +2408,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_format_idc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2208,10 +2418,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_luma_minus8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", @@ -2221,10 +2428,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bit_depth_chroma_minus8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -2234,10 +2438,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).log2_max_frame_num_minus4 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).log2_max_frame_num_minus4) as usize - ptr as usize }, 7usize, concat!( "Offset of field: ", @@ -2247,9 +2448,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_type) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2260,8 +2459,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).log2_max_pic_order_cnt_lsb_minus4 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize }, 9usize, concat!( @@ -2272,9 +2470,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_num_ref_frames as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_num_ref_frames) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2285,8 +2481,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_frames_in_pic_order_cnt_cycle - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_frames_in_pic_order_cnt_cycle) as usize + - ptr as usize }, 11usize, concat!( @@ -2297,9 +2493,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset_for_ref_frame as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset_for_ref_frame) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -2309,10 +2503,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset_for_non_ref_pic as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset_for_non_ref_pic) as usize - ptr as usize }, 1032usize, concat!( "Offset of field: ", @@ -2323,8 +2514,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).offset_for_top_to_bottom_field - as *const _ as usize + ::std::ptr::addr_of!((*ptr).offset_for_top_to_bottom_field) as usize - ptr as usize }, 1036usize, concat!( @@ -2335,10 +2525,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_width_in_mbs_minus1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_mbs_minus1) as usize - ptr as usize }, 1040usize, concat!( "Offset of field: ", @@ -2349,8 +2536,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).pic_height_in_map_units_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).pic_height_in_map_units_minus1) as usize - ptr as usize }, 1042usize, concat!( @@ -2361,7 +2547,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 1044usize, concat!( "Offset of field: ", @@ -2371,6 +2557,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_sps() { ) ); } +#[doc = " struct v4l2_ctrl_h264_pps - H264 picture parameter set\n\n Except where noted, all the members on this picture parameter set\n structure match the picture parameter set syntax as specified\n by the H264 specification.\n\n In particular, V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT flag\n has a specific meaning. This flag should be set if a non-flat\n scaling matrix applies to the picture. In this case, applications\n are expected to use V4L2_CID_STATELESS_H264_SCALING_MATRIX,\n to pass the values of the non-flat matrices.\n\n @pic_parameter_set_id: see H264 specification.\n @seq_parameter_set_id: see H264 specification.\n @num_slice_groups_minus1: see H264 specification.\n @num_ref_idx_l0_default_active_minus1: see H264 specification.\n @num_ref_idx_l1_default_active_minus1: see H264 specification.\n @weighted_bipred_idc: see H264 specification.\n @pic_init_qp_minus26: see H264 specification.\n @pic_init_qs_minus26: see H264 specification.\n @chroma_qp_index_offset: see H264 specification.\n @second_chroma_qp_index_offset: see H264 specification.\n @flags: see V4L2_H264_PPS_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_pps { @@ -2388,6 +2575,8 @@ pub struct v4l2_ctrl_h264_pps { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_pps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -2399,9 +2588,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_pps)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2411,9 +2598,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).seq_parameter_set_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2423,10 +2608,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_slice_groups_minus1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).num_slice_groups_minus1) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2437,8 +2619,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l0_default_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize }, 3usize, concat!( @@ -2450,8 +2632,8 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l1_default_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize }, 4usize, concat!( @@ -2462,9 +2644,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).weighted_bipred_idc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).weighted_bipred_idc) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", @@ -2474,9 +2654,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qp_minus26 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qp_minus26) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", @@ -2486,9 +2664,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_init_qs_minus26 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_init_qs_minus26) as usize - ptr as usize }, 7usize, concat!( "Offset of field: ", @@ -2498,10 +2674,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_qp_index_offset as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_qp_index_offset) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2512,8 +2685,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).second_chroma_qp_index_offset as *const _ - as usize + ::std::ptr::addr_of!((*ptr).second_chroma_qp_index_offset) as usize - ptr as usize }, 9usize, concat!( @@ -2524,7 +2696,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2534,6 +2706,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pps() { ) ); } +#[doc = " struct v4l2_ctrl_h264_scaling_matrix - H264 scaling matrices\n\n @scaling_list_4x4: scaling matrix after applying the inverse\n scanning process. Expected list order is Intra Y, Intra Cb,\n Intra Cr, Inter Y, Inter Cb, Inter Cr. The values on each\n scaling list are expected in raster scan order.\n @scaling_list_8x8: scaling matrix after applying the inverse\n scanning process. Expected list order is Intra Y, Inter Y,\n Intra Cb, Inter Cb, Intra Cr, Inter Cr. The values on each\n scaling list are expected in raster scan order.\n\n Note that the list order is different for the 4x4 and 8x8\n matrices as per the H264 specification, see table 7-2 \"Assignment\n of mnemonic names to scaling list indices and specification of\n fall-back rule\"."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_scaling_matrix { @@ -2542,6 +2715,9 @@ pub struct v4l2_ctrl_h264_scaling_matrix { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 480usize, @@ -2553,10 +2729,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_scaling_matrix)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scaling_list_4x4 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_4x4) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2566,10 +2739,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_scaling_matrix() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).scaling_list_8x8 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_8x8) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -2589,6 +2759,9 @@ pub struct v4l2_h264_weight_factors { } #[test] fn bindgen_test_layout_v4l2_h264_weight_factors() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 384usize, @@ -2600,9 +2773,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { concat!("Alignment of ", stringify!(v4l2_h264_weight_factors)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_weight as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_weight) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2612,9 +2783,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -2624,9 +2793,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_weight as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_weight) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", @@ -2636,9 +2803,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", @@ -2648,6 +2813,7 @@ fn bindgen_test_layout_v4l2_h264_weight_factors() { ) ); } +#[doc = " struct v4l2_ctrl_h264_pred_weights - Prediction weight table\n\n Prediction weight table, which matches the syntax specified\n by the H264 specification.\n\n @luma_log2_weight_denom: see H264 specification.\n @chroma_log2_weight_denom: see H264 specification.\n @weight_factors: luma and chroma weight factors."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_pred_weights { @@ -2657,6 +2823,9 @@ pub struct v4l2_ctrl_h264_pred_weights { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 772usize, @@ -2668,10 +2837,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_pred_weights)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luma_log2_weight_denom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2681,10 +2847,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).chroma_log2_weight_denom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).chroma_log2_weight_denom) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -2694,10 +2857,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).weight_factors as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).weight_factors) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2707,6 +2867,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_pred_weights() { ) ); } +#[doc = " struct v4l2_h264_reference - H264 picture reference\n\n @fields: indicates how the picture is referenced.\n Valid values are V4L2_H264_{}_REF.\n @index: index into v4l2_ctrl_h264_decode_params.dpb[]."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_h264_reference { @@ -2715,6 +2876,8 @@ pub struct v4l2_h264_reference { } #[test] fn bindgen_test_layout_v4l2_h264_reference() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, @@ -2726,7 +2889,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { concat!("Alignment of ", stringify!(v4l2_h264_reference)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fields as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fields) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2736,7 +2899,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -2746,6 +2909,7 @@ fn bindgen_test_layout_v4l2_h264_reference() { ) ); } +#[doc = " struct v4l2_ctrl_h264_slice_params - H264 slice parameters\n\n This structure holds the H264 syntax elements that are specified\n as non-invariant for the slices in a given frame.\n\n Slice invariant syntax elements are contained in struct\n v4l2_ctrl_h264_decode_params. This is done to reduce the API surface\n on frame-based decoders, where slice header parsing is done by the\n hardware.\n\n Slice invariant syntax elements are specified in specification section\n \"7.4.3 Slice header semantics\".\n\n Except where noted, the members on this struct match the slice header syntax.\n\n @header_bit_size: offset in bits to slice_data() from the beginning of this slice.\n @first_mb_in_slice: see H264 specification.\n @slice_type: see H264 specification.\n @colour_plane_id: see H264 specification.\n @redundant_pic_cnt: see H264 specification.\n @cabac_init_idc: see H264 specification.\n @slice_qp_delta: see H264 specification.\n @slice_qs_delta: see H264 specification.\n @disable_deblocking_filter_idc: see H264 specification.\n @slice_alpha_c0_offset_div2: see H264 specification.\n @slice_beta_offset_div2: see H264 specification.\n @num_ref_idx_l0_active_minus1: see H264 specification.\n @num_ref_idx_l1_active_minus1: see H264 specification.\n @reserved: padding field. Should be zeroed by applications.\n @ref_pic_list0: reference picture list 0 after applying the per-slice modifications.\n @ref_pic_list1: reference picture list 1 after applying the per-slice modifications.\n @flags: see V4L2_H264_SLICE_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_slice_params { @@ -2769,6 +2933,9 @@ pub struct v4l2_ctrl_h264_slice_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 152usize, @@ -2780,10 +2947,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_slice_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).header_bit_size as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).header_bit_size) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2793,10 +2957,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).first_mb_in_slice as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).first_mb_in_slice) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2806,9 +2967,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_type as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2818,10 +2977,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colour_plane_id as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colour_plane_id) as usize - ptr as usize }, 9usize, concat!( "Offset of field: ", @@ -2831,10 +2987,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).redundant_pic_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).redundant_pic_cnt) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -2844,10 +2997,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cabac_init_idc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).cabac_init_idc) as usize - ptr as usize }, 11usize, concat!( "Offset of field: ", @@ -2857,10 +3007,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_qp_delta as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_qp_delta) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -2870,10 +3017,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_qs_delta as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_qs_delta) as usize - ptr as usize }, 13usize, concat!( "Offset of field: ", @@ -2884,8 +3028,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).disable_deblocking_filter_idc - as *const _ as usize + ::std::ptr::addr_of!((*ptr).disable_deblocking_filter_idc) as usize - ptr as usize }, 14usize, concat!( @@ -2896,10 +3039,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_alpha_c0_offset_div2 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_alpha_c0_offset_div2) as usize - ptr as usize }, 15usize, concat!( "Offset of field: ", @@ -2909,10 +3049,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_beta_offset_div2 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2923,8 +3060,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l0_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize }, 17usize, concat!( @@ -2936,8 +3072,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).num_ref_idx_l1_active_minus1 - as *const _ as usize + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize }, 18usize, concat!( @@ -2948,9 +3083,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 19usize, concat!( "Offset of field: ", @@ -2960,10 +3093,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ref_pic_list0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_pic_list0) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -2973,10 +3103,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ref_pic_list1 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_pic_list1) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -2986,9 +3113,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 148usize, concat!( "Offset of field: ", @@ -2998,6 +3123,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_slice_params() { ) ); } +#[doc = " struct v4l2_h264_dpb_entry - H264 decoded picture buffer entry\n\n @reference_ts: timestamp of the V4L2 capture buffer to use as reference.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @pic_num: matches PicNum variable assigned during the reference\n picture lists construction process.\n @frame_num: frame identifier which matches frame_num syntax element.\n @fields: indicates how the DPB entry is referenced. Valid values are\n V4L2_H264_{}_REF.\n @reserved: padding field. Should be zeroed by applications.\n @top_field_order_cnt: matches TopFieldOrderCnt picture value.\n @bottom_field_order_cnt: matches BottomFieldOrderCnt picture value.\n Note that picture field is indicated by v4l2_buffer.field.\n @flags: see V4L2_H264_DPB_ENTRY_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_h264_dpb_entry { @@ -3012,6 +3138,8 @@ pub struct v4l2_h264_dpb_entry { } #[test] fn bindgen_test_layout_v4l2_h264_dpb_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -3023,9 +3151,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { concat!("Alignment of ", stringify!(v4l2_h264_dpb_entry)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reference_ts as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reference_ts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3035,7 +3161,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pic_num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_num) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3045,7 +3171,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frame_num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3055,7 +3181,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fields as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fields) as usize - ptr as usize }, 14usize, concat!( "Offset of field: ", @@ -3065,7 +3191,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 15usize, concat!( "Offset of field: ", @@ -3075,9 +3201,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).top_field_order_cnt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).top_field_order_cnt) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3087,10 +3211,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bottom_field_order_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bottom_field_order_cnt) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3100,7 +3221,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3110,6 +3231,7 @@ fn bindgen_test_layout_v4l2_h264_dpb_entry() { ) ); } +#[doc = " struct v4l2_ctrl_h264_decode_params - H264 decoding parameters\n\n @dpb: decoded picture buffer.\n @nal_ref_idc: slice header syntax element.\n @frame_num: slice header syntax element.\n @top_field_order_cnt: matches TopFieldOrderCnt picture value.\n @bottom_field_order_cnt: matches BottomFieldOrderCnt picture value.\n Note that picture field is indicated by v4l2_buffer.field.\n @idr_pic_id: slice header syntax element.\n @pic_order_cnt_lsb: slice header syntax element.\n @delta_pic_order_cnt_bottom: slice header syntax element.\n @delta_pic_order_cnt0: slice header syntax element.\n @delta_pic_order_cnt1: slice header syntax element.\n @dec_ref_pic_marking_bit_size: size in bits of dec_ref_pic_marking()\n syntax element.\n @pic_order_cnt_bit_size: size in bits of pic order count syntax.\n @slice_group_change_cycle: slice header syntax element.\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_H264_DECODE_PARAM_FLAG_{}."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_h264_decode_params { @@ -3131,6 +3253,9 @@ pub struct v4l2_ctrl_h264_decode_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 560usize, @@ -3142,9 +3267,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_h264_decode_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).dpb as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).dpb) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3154,10 +3277,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nal_ref_idc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).nal_ref_idc) as usize - ptr as usize }, 512usize, concat!( "Offset of field: ", @@ -3167,9 +3287,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_num as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_num) as usize - ptr as usize }, 514usize, concat!( "Offset of field: ", @@ -3179,10 +3297,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).top_field_order_cnt as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).top_field_order_cnt) as usize - ptr as usize }, 516usize, concat!( "Offset of field: ", @@ -3192,10 +3307,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bottom_field_order_cnt - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bottom_field_order_cnt) as usize - ptr as usize }, 520usize, concat!( "Offset of field: ", @@ -3205,9 +3317,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).idr_pic_id as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).idr_pic_id) as usize - ptr as usize }, 524usize, concat!( "Offset of field: ", @@ -3217,10 +3327,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_lsb as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_lsb) as usize - ptr as usize }, 526usize, concat!( "Offset of field: ", @@ -3230,10 +3337,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt_bottom - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt_bottom) as usize - ptr as usize }, 528usize, concat!( "Offset of field: ", @@ -3243,10 +3347,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt0 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt0) as usize - ptr as usize }, 532usize, concat!( "Offset of field: ", @@ -3256,10 +3357,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).delta_pic_order_cnt1 - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).delta_pic_order_cnt1) as usize - ptr as usize }, 536usize, concat!( "Offset of field: ", @@ -3270,8 +3368,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::())).dec_ref_pic_marking_bit_size - as *const _ as usize + ::std::ptr::addr_of!((*ptr).dec_ref_pic_marking_bit_size) as usize - ptr as usize }, 540usize, concat!( @@ -3282,10 +3379,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pic_order_cnt_bit_size - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_bit_size) as usize - ptr as usize }, 544usize, concat!( "Offset of field: ", @@ -3295,10 +3389,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).slice_group_change_cycle - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).slice_group_change_cycle) as usize - ptr as usize }, 548usize, concat!( "Offset of field: ", @@ -3308,9 +3399,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 552usize, concat!( "Offset of field: ", @@ -3320,9 +3409,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 556usize, concat!( "Offset of field: ", @@ -3332,6 +3419,7 @@ fn bindgen_test_layout_v4l2_ctrl_h264_decode_params() { ) ); } +#[doc = " struct v4l2_ctrl_fwht_params - FWHT parameters\n\n @backward_ref_ts: timestamp of the V4L2 capture buffer to use as reference.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @version: must be V4L2_FWHT_VERSION.\n @width: width of frame.\n @height: height of frame.\n @flags: FWHT flags (see V4L2_FWHT_FL_*).\n @colorspace: the colorspace (enum v4l2_colorspace).\n @xfer_func: the transfer function (enum v4l2_xfer_func).\n @ycbcr_enc: the Y'CbCr encoding (enum v4l2_ycbcr_encoding).\n @quantization: the quantization (enum v4l2_quantization)."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_ctrl_fwht_params { @@ -3347,6 +3435,9 @@ pub struct v4l2_ctrl_fwht_params { } #[test] fn bindgen_test_layout_v4l2_ctrl_fwht_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -3358,9 +3449,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { concat!("Alignment of ", stringify!(v4l2_ctrl_fwht_params)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).backward_ref_ts as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).backward_ref_ts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3370,7 +3459,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3380,7 +3469,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3390,7 +3479,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3400,7 +3489,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3410,9 +3499,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3422,7 +3509,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).xfer_func as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3432,7 +3519,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ycbcr_enc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -3442,9 +3529,7 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).quantization as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -3454,198 +3539,3484 @@ fn bindgen_test_layout_v4l2_ctrl_fwht_params() { ) ); } -pub const v4l2_field_V4L2_FIELD_ANY: v4l2_field = 0; -pub const v4l2_field_V4L2_FIELD_NONE: v4l2_field = 1; -pub const v4l2_field_V4L2_FIELD_TOP: v4l2_field = 2; -pub const v4l2_field_V4L2_FIELD_BOTTOM: v4l2_field = 3; -pub const v4l2_field_V4L2_FIELD_INTERLACED: v4l2_field = 4; -pub const v4l2_field_V4L2_FIELD_SEQ_TB: v4l2_field = 5; -pub const v4l2_field_V4L2_FIELD_SEQ_BT: v4l2_field = 6; -pub const v4l2_field_V4L2_FIELD_ALTERNATE: v4l2_field = 7; -pub const v4l2_field_V4L2_FIELD_INTERLACED_TB: v4l2_field = 8; -pub const v4l2_field_V4L2_FIELD_INTERLACED_BT: v4l2_field = 9; -pub type v4l2_field = ::std::os::raw::c_uint; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE: v4l2_buf_type = 1; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT: v4l2_buf_type = 2; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OVERLAY: v4l2_buf_type = 3; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_CAPTURE: v4l2_buf_type = 4; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_OUTPUT: v4l2_buf_type = 5; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: v4l2_buf_type = 6; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: v4l2_buf_type = 7; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: v4l2_buf_type = 8; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: v4l2_buf_type = 9; -pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: v4l2_buf_type = 10; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_CAPTURE: v4l2_buf_type = 11; -pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_OUTPUT: v4l2_buf_type = 12; -pub const v4l2_buf_type_V4L2_BUF_TYPE_META_CAPTURE: v4l2_buf_type = 13; -pub const v4l2_buf_type_V4L2_BUF_TYPE_META_OUTPUT: v4l2_buf_type = 14; -pub const v4l2_buf_type_V4L2_BUF_TYPE_PRIVATE: v4l2_buf_type = 128; -pub type v4l2_buf_type = ::std::os::raw::c_uint; -pub const v4l2_tuner_type_V4L2_TUNER_RADIO: v4l2_tuner_type = 1; -pub const v4l2_tuner_type_V4L2_TUNER_ANALOG_TV: v4l2_tuner_type = 2; -pub const v4l2_tuner_type_V4L2_TUNER_DIGITAL_TV: v4l2_tuner_type = 3; -pub const v4l2_tuner_type_V4L2_TUNER_SDR: v4l2_tuner_type = 4; -pub const v4l2_tuner_type_V4L2_TUNER_RF: v4l2_tuner_type = 5; -pub type v4l2_tuner_type = ::std::os::raw::c_uint; -pub const v4l2_memory_V4L2_MEMORY_MMAP: v4l2_memory = 1; -pub const v4l2_memory_V4L2_MEMORY_USERPTR: v4l2_memory = 2; -pub const v4l2_memory_V4L2_MEMORY_OVERLAY: v4l2_memory = 3; -pub const v4l2_memory_V4L2_MEMORY_DMABUF: v4l2_memory = 4; -pub type v4l2_memory = ::std::os::raw::c_uint; -pub const v4l2_colorspace_V4L2_COLORSPACE_DEFAULT: v4l2_colorspace = 0; -pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE170M: v4l2_colorspace = 1; -pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE240M: v4l2_colorspace = 2; -pub const v4l2_colorspace_V4L2_COLORSPACE_REC709: v4l2_colorspace = 3; -pub const v4l2_colorspace_V4L2_COLORSPACE_BT878: v4l2_colorspace = 4; -pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_M: v4l2_colorspace = 5; -pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_BG: v4l2_colorspace = 6; -pub const v4l2_colorspace_V4L2_COLORSPACE_JPEG: v4l2_colorspace = 7; -pub const v4l2_colorspace_V4L2_COLORSPACE_SRGB: v4l2_colorspace = 8; -pub const v4l2_colorspace_V4L2_COLORSPACE_OPRGB: v4l2_colorspace = 9; -pub const v4l2_colorspace_V4L2_COLORSPACE_BT2020: v4l2_colorspace = 10; -pub const v4l2_colorspace_V4L2_COLORSPACE_RAW: v4l2_colorspace = 11; -pub const v4l2_colorspace_V4L2_COLORSPACE_DCI_P3: v4l2_colorspace = 12; -pub type v4l2_colorspace = ::std::os::raw::c_uint; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_DEFAULT: v4l2_xfer_func = 0; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_709: v4l2_xfer_func = 1; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SRGB: v4l2_xfer_func = 2; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_OPRGB: v4l2_xfer_func = 3; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE240M: v4l2_xfer_func = 4; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_NONE: v4l2_xfer_func = 5; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_DCI_P3: v4l2_xfer_func = 6; -pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE2084: v4l2_xfer_func = 7; -pub type v4l2_xfer_func = ::std::os::raw::c_uint; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_DEFAULT: v4l2_ycbcr_encoding = 0; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_601: v4l2_ycbcr_encoding = 1; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_709: v4l2_ycbcr_encoding = 2; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV601: v4l2_ycbcr_encoding = 3; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV709: v4l2_ycbcr_encoding = 4; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SYCC: v4l2_ycbcr_encoding = 5; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020: v4l2_ycbcr_encoding = 6; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020_CONST_LUM: v4l2_ycbcr_encoding = 7; -pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SMPTE240M: v4l2_ycbcr_encoding = 8; -pub type v4l2_ycbcr_encoding = ::std::os::raw::c_uint; -pub const v4l2_hsv_encoding_V4L2_HSV_ENC_180: v4l2_hsv_encoding = 128; -pub const v4l2_hsv_encoding_V4L2_HSV_ENC_256: v4l2_hsv_encoding = 129; -pub type v4l2_hsv_encoding = ::std::os::raw::c_uint; -pub const v4l2_quantization_V4L2_QUANTIZATION_DEFAULT: v4l2_quantization = 0; -pub const v4l2_quantization_V4L2_QUANTIZATION_FULL_RANGE: v4l2_quantization = 1; -pub const v4l2_quantization_V4L2_QUANTIZATION_LIM_RANGE: v4l2_quantization = 2; -pub type v4l2_quantization = ::std::os::raw::c_uint; -pub const v4l2_priority_V4L2_PRIORITY_UNSET: v4l2_priority = 0; -pub const v4l2_priority_V4L2_PRIORITY_BACKGROUND: v4l2_priority = 1; -pub const v4l2_priority_V4L2_PRIORITY_INTERACTIVE: v4l2_priority = 2; -pub const v4l2_priority_V4L2_PRIORITY_RECORD: v4l2_priority = 3; -pub const v4l2_priority_V4L2_PRIORITY_DEFAULT: v4l2_priority = 2; -pub type v4l2_priority = ::std::os::raw::c_uint; +#[doc = " struct v4l2_vp8_segment - VP8 segment-based adjustments parameters\n\n @quant_update: update values for the segment quantizer.\n @lf_update: update values for the loop filter level.\n @segment_probs: branch probabilities of the segment_id decoding tree.\n @padding: padding field. Should be zeroed by applications.\n @flags: see V4L2_VP8_SEGMENT_FLAG_{}.\n\n This structure contains segment-based adjustments related parameters.\n See the 'update_segmentation()' part of the frame header syntax,\n and section '9.3. Segment-Based Adjustments' of the VP8 specification\n for more details."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct v4l2_rect { - pub left: __s32, - pub top: __s32, - pub width: __u32, - pub height: __u32, +pub struct v4l2_vp8_segment { + pub quant_update: [__s8; 4usize], + pub lf_update: [__s8; 4usize], + pub segment_probs: [__u8; 3usize], + pub padding: __u8, + pub flags: __u32, } #[test] -fn bindgen_test_layout_v4l2_rect() { +fn bindgen_test_layout_v4l2_vp8_segment() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(v4l2_rect)) + concat!("Size of: ", stringify!(v4l2_vp8_segment)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(v4l2_rect)) + concat!("Alignment of ", stringify!(v4l2_vp8_segment)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).left as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quant_update) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(left) + stringify!(quant_update) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).top as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).lf_update) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(top) + stringify!(lf_update) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).segment_probs) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(width) + stringify!(segment_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_segment), + "::", + stringify!(padding) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", - stringify!(v4l2_rect), + stringify!(v4l2_vp8_segment), "::", - stringify!(height) + stringify!(flags) ) ); } +#[doc = " struct v4l2_vp8_loop_filter - VP8 loop filter parameters\n\n @ref_frm_delta: Reference frame signed delta values.\n @mb_mode_delta: MB prediction mode signed delta values.\n @sharpness_level: matches sharpness_level syntax element.\n @level: matches loop_filter_level syntax element.\n @padding: padding field. Should be zeroed by applications.\n @flags: see V4L2_VP8_LF_{}.\n\n This structure contains loop filter related parameters.\n See the 'mb_lf_adjustments()' part of the frame header syntax,\n and section '9.4. Loop Filter Type and Levels' of the VP8 specification\n for more details."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct v4l2_fract { - pub numerator: __u32, - pub denominator: __u32, +pub struct v4l2_vp8_loop_filter { + pub ref_frm_delta: [__s8; 4usize], + pub mb_mode_delta: [__s8; 4usize], + pub sharpness_level: __u8, + pub level: __u8, + pub padding: __u16, + pub flags: __u32, } #[test] -fn bindgen_test_layout_v4l2_fract() { +fn bindgen_test_layout_v4l2_vp8_loop_filter() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(v4l2_fract)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_vp8_loop_filter)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(v4l2_fract)) + concat!("Alignment of ", stringify!(v4l2_vp8_loop_filter)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).numerator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ref_frm_delta) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", - stringify!(v4l2_fract), + stringify!(v4l2_vp8_loop_filter), "::", - stringify!(numerator) + stringify!(ref_frm_delta) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).denominator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mb_mode_delta) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", - stringify!(v4l2_fract), + stringify!(v4l2_vp8_loop_filter), "::", - stringify!(denominator) + stringify!(mb_mode_delta) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct v4l2_area { - pub width: __u32, - pub height: __u32, + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharpness_level) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(sharpness_level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_loop_filter), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_vp8_quantization - VP8 quantizattion indices\n\n @y_ac_qi: luma AC coefficient table index.\n @y_dc_delta: luma DC delta vaue.\n @y2_dc_delta: y2 block DC delta value.\n @y2_ac_delta: y2 block AC delta value.\n @uv_dc_delta: chroma DC delta value.\n @uv_ac_delta: chroma AC delta value.\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the quantization indices present\n in 'quant_indices()' part of the frame header syntax.\n See section '9.6. Dequantization Indices' of the VP8 specification\n for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_quantization { + pub y_ac_qi: __u8, + pub y_dc_delta: __s8, + pub y2_dc_delta: __s8, + pub y2_ac_delta: __s8, + pub uv_dc_delta: __s8, + pub uv_ac_delta: __s8, + pub padding: __u16, +} +#[test] +fn bindgen_test_layout_v4l2_vp8_quantization() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_vp8_quantization)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_vp8_quantization)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_ac_qi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y_ac_qi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_dc_delta) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y2_dc_delta) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y2_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y2_ac_delta) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(y2_ac_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_dc_delta) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(uv_dc_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_ac_delta) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(uv_ac_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_quantization), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_vp8_entropy - VP8 update probabilities\n\n @coeff_probs: coefficient probability update values.\n @y_mode_probs: luma intra-prediction probabilities.\n @uv_mode_probs: chroma intra-prediction probabilities.\n @mv_probs: mv decoding probability.\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the update probabilities present in\n 'token_prob_update()' and 'mv_prob_update()' part of the frame header.\n See section '17.2. Probability Updates' of the VP8 specification\n for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_entropy { + pub coeff_probs: [[[[__u8; 11usize]; 3usize]; 8usize]; 4usize], + pub y_mode_probs: [__u8; 4usize], + pub uv_mode_probs: [__u8; 3usize], + pub mv_probs: [[__u8; 19usize]; 2usize], + pub padding: [__u8; 3usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp8_entropy() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1104usize, + concat!("Size of: ", stringify!(v4l2_vp8_entropy)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp8_entropy)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coeff_probs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(coeff_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_mode_probs) as usize - ptr as usize }, + 1056usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(y_mode_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_mode_probs) as usize - ptr as usize }, + 1060usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(uv_mode_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mv_probs) as usize - ptr as usize }, + 1063usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(mv_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 1101usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_vp8_entropy_coder_state - VP8 boolean coder state\n\n @range: coder state value for \"Range\"\n @value: coder state value for \"Value\"\n @bit_count: number of bits left in range \"Value\".\n @padding: padding field. Should be zeroed by applications.\n\n This structure contains the state for the boolean coder, as\n explained in section '7. Boolean Entropy Decoder' of the VP8 specification."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp8_entropy_coder_state { + pub range: __u8, + pub value: __u8, + pub bit_count: __u8, + pub padding: __u8, +} +#[test] +fn bindgen_test_layout_v4l2_vp8_entropy_coder_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(v4l2_vp8_entropy_coder_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp8_entropy_coder_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).range) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(range) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_count) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(bit_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp8_entropy_coder_state), + "::", + stringify!(padding) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp8_frame - VP8 frame parameters\n\n @segment: segmentation parameters. See &v4l2_vp8_segment for more details\n @lf: loop filter parameters. See &v4l2_vp8_loop_filter for more details\n @quant: quantization parameters. See &v4l2_vp8_quantization for more details\n @entropy: update probabilities. See &v4l2_vp8_entropy for more details\n @coder_state: boolean coder state. See &v4l2_vp8_entropy_coder_state for more details\n @width: frame width.\n @height: frame height.\n @horizontal_scale: horizontal scaling factor.\n @vertical_scale: vertical scaling factor.\n @version: bitstream version.\n @prob_skip_false: frame header syntax element.\n @prob_intra: frame header syntax element.\n @prob_last: frame header syntax element.\n @prob_gf: frame header syntax element.\n @num_dct_parts: number of DCT coefficients partitions.\n @first_part_size: size of the first partition, i.e. the control partition.\n @first_part_header_bits: size in bits of the first partition header portion.\n @dct_part_sizes: DCT coefficients sizes.\n @last_frame_ts: \"last\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @golden_frame_ts: \"golden\" reference buffer timestamp.\n @alt_frame_ts: \"alt\" reference buffer timestamp.\n @flags: see V4L2_VP8_FRAME_FLAG_{}."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp8_frame { + pub segment: v4l2_vp8_segment, + pub lf: v4l2_vp8_loop_filter, + pub quant: v4l2_vp8_quantization, + pub entropy: v4l2_vp8_entropy, + pub coder_state: v4l2_vp8_entropy_coder_state, + pub width: __u16, + pub height: __u16, + pub horizontal_scale: __u8, + pub vertical_scale: __u8, + pub version: __u8, + pub prob_skip_false: __u8, + pub prob_intra: __u8, + pub prob_last: __u8, + pub prob_gf: __u8, + pub num_dct_parts: __u8, + pub first_part_size: __u32, + pub first_part_header_bits: __u32, + pub dct_part_sizes: [__u32; 8usize], + pub last_frame_ts: __u64, + pub golden_frame_ts: __u64, + pub alt_frame_ts: __u64, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp8_frame() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1232usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp8_frame)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp8_frame)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).segment) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(segment) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lf) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(lf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).quant) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(quant) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entropy) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(entropy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coder_state) as usize - ptr as usize }, + 1144usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(coder_state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 1148usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 1150usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).horizontal_scale) as usize - ptr as usize }, + 1152usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(horizontal_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vertical_scale) as usize - ptr as usize }, + 1153usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(vertical_scale) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 1154usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_skip_false) as usize - ptr as usize }, + 1155usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_skip_false) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_intra) as usize - ptr as usize }, + 1156usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_intra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_last) as usize - ptr as usize }, + 1157usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_last) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prob_gf) as usize - ptr as usize }, + 1158usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(prob_gf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_dct_parts) as usize - ptr as usize }, + 1159usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(num_dct_parts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_part_size) as usize - ptr as usize }, + 1160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(first_part_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_part_header_bits) as usize - ptr as usize }, + 1164usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(first_part_header_bits) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dct_part_sizes) as usize - ptr as usize }, + 1168usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(dct_part_sizes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_frame_ts) as usize - ptr as usize }, + 1200usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(last_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).golden_frame_ts) as usize - ptr as usize }, + 1208usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(golden_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alt_frame_ts) as usize - ptr as usize }, + 1216usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(alt_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 1224usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp8_frame), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_sequence - MPEG-2 sequence header\n\n All the members on this structure match the sequence header and sequence\n extension syntaxes as specified by the MPEG-2 specification.\n\n Fields horizontal_size, vertical_size and vbv_buffer_size are a\n combination of respective _value and extension syntax elements,\n as described in section 6.3.3 \"Sequence header\".\n\n @horizontal_size: combination of elements horizontal_size_value and\n horizontal_size_extension.\n @vertical_size: combination of elements vertical_size_value and\n vertical_size_extension.\n @vbv_buffer_size: combination of elements vbv_buffer_size_value and\n vbv_buffer_size_extension.\n @profile_and_level_indication: see MPEG-2 specification.\n @chroma_format: see MPEG-2 specification.\n @flags: see V4L2_MPEG2_SEQ_FLAG_{}."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_sequence { + pub horizontal_size: __u16, + pub vertical_size: __u16, + pub vbv_buffer_size: __u32, + pub profile_and_level_indication: __u16, + pub chroma_format: __u8, + pub flags: __u8, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_sequence() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_sequence)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_sequence)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).horizontal_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(horizontal_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vertical_size) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(vertical_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vbv_buffer_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(vbv_buffer_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).profile_and_level_indication) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(profile_and_level_indication) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(chroma_format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_sequence), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_picture - MPEG-2 picture header\n\n All the members on this structure match the picture header and picture\n coding extension syntaxes as specified by the MPEG-2 specification.\n\n @backward_ref_ts: timestamp of the V4L2 capture buffer to use as\n reference for backward prediction.\n @forward_ref_ts: timestamp of the V4L2 capture buffer to use as\n reference for forward prediction. These timestamp refers to the\n timestamp field in struct v4l2_buffer. Use v4l2_timeval_to_ns()\n to convert the struct timeval to a __u64.\n @flags: see V4L2_MPEG2_PIC_FLAG_{}.\n @f_code: see MPEG-2 specification.\n @picture_coding_type: see MPEG-2 specification.\n @picture_structure: see V4L2_MPEG2_PIC_{}_FIELD.\n @intra_dc_precision: see MPEG-2 specification.\n @reserved: padding field. Should be zeroed by applications."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_picture { + pub backward_ref_ts: __u64, + pub forward_ref_ts: __u64, + pub flags: __u32, + pub f_code: [[__u8; 2usize]; 2usize], + pub picture_coding_type: __u8, + pub picture_structure: __u8, + pub intra_dc_precision: __u8, + pub reserved: [__u8; 5usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_picture() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_picture)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_picture)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).backward_ref_ts) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(backward_ref_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).forward_ref_ts) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(forward_ref_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f_code) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(f_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).picture_coding_type) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(picture_coding_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).picture_structure) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(picture_structure) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intra_dc_precision) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(intra_dc_precision) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_picture), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_ctrl_mpeg2_quantisation - MPEG-2 quantisation\n\n Quantisation matrices as specified by section 6.3.7\n \"Quant matrix extension\".\n\n @intra_quantiser_matrix: The quantisation matrix coefficients\n for intra-coded frames, in zigzag scanning order. It is relevant\n for both luma and chroma components, although it can be superseded\n by the chroma-specific matrix for non-4:2:0 YUV formats.\n @non_intra_quantiser_matrix: The quantisation matrix coefficients\n for non-intra-coded frames, in zigzag scanning order. It is relevant\n for both luma and chroma components, although it can be superseded\n by the chroma-specific matrix for non-4:2:0 YUV formats.\n @chroma_intra_quantiser_matrix: The quantisation matrix coefficients\n for the chominance component of intra-coded frames, in zigzag scanning\n order. Only relevant for 4:2:2 and 4:4:4 YUV formats.\n @chroma_non_intra_quantiser_matrix: The quantisation matrix coefficients\n for the chrominance component of non-intra-coded frames, in zigzag scanning\n order. Only relevant for 4:2:2 and 4:4:4 YUV formats."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_mpeg2_quantisation { + pub intra_quantiser_matrix: [__u8; 64usize], + pub non_intra_quantiser_matrix: [__u8; 64usize], + pub chroma_intra_quantiser_matrix: [__u8; 64usize], + pub chroma_non_intra_quantiser_matrix: [__u8; 64usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_mpeg2_quantisation() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(v4l2_ctrl_mpeg2_quantisation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_mpeg2_quantisation)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intra_quantiser_matrix) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).non_intra_quantiser_matrix) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(non_intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_intra_quantiser_matrix) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(chroma_intra_quantiser_matrix) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).chroma_non_intra_quantiser_matrix) as usize - ptr as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_mpeg2_quantisation), + "::", + stringify!(chroma_non_intra_quantiser_matrix) + ) + ); +} +pub const v4l2_stateless_hevc_decode_mode_V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED: + v4l2_stateless_hevc_decode_mode = 0; +pub const v4l2_stateless_hevc_decode_mode_V4L2_STATELESS_HEVC_DECODE_MODE_FRAME_BASED: + v4l2_stateless_hevc_decode_mode = 1; +pub type v4l2_stateless_hevc_decode_mode = ::std::os::raw::c_uint; +pub const v4l2_stateless_hevc_start_code_V4L2_STATELESS_HEVC_START_CODE_NONE: + v4l2_stateless_hevc_start_code = 0; +pub const v4l2_stateless_hevc_start_code_V4L2_STATELESS_HEVC_START_CODE_ANNEX_B: + v4l2_stateless_hevc_start_code = 1; +pub type v4l2_stateless_hevc_start_code = ::std::os::raw::c_uint; +#[doc = " struct v4l2_ctrl_hevc_sps - ITU-T Rec. H.265: Sequence parameter set\n\n @video_parameter_set_id: specifies the value of the\n\t\t\tvps_video_parameter_set_id of the active VPS\n @seq_parameter_set_id: provides an identifier for the SPS for\n\t\t\t reference by other syntax elements\n @pic_width_in_luma_samples:\tspecifies the width of each decoded picture\n\t\t\t\tin units of luma samples\n @pic_height_in_luma_samples: specifies the height of each decoded picture\n\t\t\t\tin units of luma samples\n @bit_depth_luma_minus8: this value plus 8specifies the bit depth of the\n samples of the luma array\n @bit_depth_chroma_minus8: this value plus 8 specifies the bit depth of the\n samples of the chroma arrays\n @log2_max_pic_order_cnt_lsb_minus4: this value plus 4 specifies the value of\n the variable MaxPicOrderCntLsb\n @sps_max_dec_pic_buffering_minus1: this value plus 1 specifies the maximum\n required size of the decoded picture\n buffer for the codec video sequence\n @sps_max_num_reorder_pics: indicates the maximum allowed number of pictures\n @sps_max_latency_increase_plus1: not equal to 0 is used to compute the\n\t\t\t\t value of SpsMaxLatencyPictures array\n @log2_min_luma_coding_block_size_minus3: plus 3 specifies the minimum\n\t\t\t\t\t luma coding block size\n @log2_diff_max_min_luma_coding_block_size: specifies the difference between\n\t\t\t\t\t the maximum and minimum luma\n\t\t\t\t\t coding block size\n @log2_min_luma_transform_block_size_minus2: plus 2 specifies the minimum luma\n\t\t\t\t\t transform block size\n @log2_diff_max_min_luma_transform_block_size: specifies the difference between\n\t\t\t\t\t\t the maximum and minimum luma\n\t\t\t\t\t\t transform block size\n @max_transform_hierarchy_depth_inter: specifies the maximum hierarchy\n\t\t\t\t\t depth for transform units of\n\t\t\t\t\t coding units coded in inter\n\t\t\t\t\t prediction mode\n @max_transform_hierarchy_depth_intra: specifies the maximum hierarchy\n\t\t\t\t\t depth for transform units of\n\t\t\t\t\t coding units coded in intra\n\t\t\t\t\t prediction mode\n @pcm_sample_bit_depth_luma_minus1: this value plus 1 specifies the number of\n bits used to represent each of PCM sample\n values of the luma component\n @pcm_sample_bit_depth_chroma_minus1: this value plus 1 specifies the number\n of bits used to represent each of PCM\n sample values of the chroma components\n @log2_min_pcm_luma_coding_block_size_minus3: this value plus 3 specifies the\n minimum size of coding blocks\n @log2_diff_max_min_pcm_luma_coding_block_size: specifies the difference between\n\t\t\t\t\t\t the maximum and minimum size of\n\t\t\t\t\t\t coding blocks\n @num_short_term_ref_pic_sets: specifies the number of st_ref_pic_set()\n\t\t\t\t syntax structures included in the SPS\n @num_long_term_ref_pics_sps: specifies the number of candidate long-term\n\t\t\t\treference pictures that are specified in the SPS\n @chroma_format_idc: specifies the chroma sampling\n @sps_max_sub_layers_minus1: this value plus 1 specifies the maximum number\n of temporal sub-layers\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_SPS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_sps { + pub video_parameter_set_id: __u8, + pub seq_parameter_set_id: __u8, + pub pic_width_in_luma_samples: __u16, + pub pic_height_in_luma_samples: __u16, + pub bit_depth_luma_minus8: __u8, + pub bit_depth_chroma_minus8: __u8, + pub log2_max_pic_order_cnt_lsb_minus4: __u8, + pub sps_max_dec_pic_buffering_minus1: __u8, + pub sps_max_num_reorder_pics: __u8, + pub sps_max_latency_increase_plus1: __u8, + pub log2_min_luma_coding_block_size_minus3: __u8, + pub log2_diff_max_min_luma_coding_block_size: __u8, + pub log2_min_luma_transform_block_size_minus2: __u8, + pub log2_diff_max_min_luma_transform_block_size: __u8, + pub max_transform_hierarchy_depth_inter: __u8, + pub max_transform_hierarchy_depth_intra: __u8, + pub pcm_sample_bit_depth_luma_minus1: __u8, + pub pcm_sample_bit_depth_chroma_minus1: __u8, + pub log2_min_pcm_luma_coding_block_size_minus3: __u8, + pub log2_diff_max_min_pcm_luma_coding_block_size: __u8, + pub num_short_term_ref_pic_sets: __u8, + pub num_long_term_ref_pics_sps: __u8, + pub chroma_format_idc: __u8, + pub sps_max_sub_layers_minus1: __u8, + pub reserved: [__u8; 6usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_sps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_sps)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_sps)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).video_parameter_set_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(video_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seq_parameter_set_id) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(seq_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_width_in_luma_samples) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pic_width_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_height_in_luma_samples) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pic_height_in_luma_samples) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_luma_minus8) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(bit_depth_luma_minus8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth_chroma_minus8) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(bit_depth_chroma_minus8) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_max_pic_order_cnt_lsb_minus4) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_max_pic_order_cnt_lsb_minus4) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sps_max_dec_pic_buffering_minus1) as usize - ptr as usize + }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_dec_pic_buffering_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_max_num_reorder_pics) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_num_reorder_pics) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sps_max_latency_increase_plus1) as usize - ptr as usize + }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_latency_increase_plus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_luma_coding_block_size_minus3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_coding_block_size) as usize + - ptr as usize + }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_luma_transform_block_size_minus2) as usize + - ptr as usize + }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_luma_transform_block_size_minus2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_luma_transform_block_size) as usize + - ptr as usize + }, + 15usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_luma_transform_block_size) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_inter) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(max_transform_hierarchy_depth_inter) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_transform_hierarchy_depth_intra) as usize - ptr as usize + }, + 17usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(max_transform_hierarchy_depth_intra) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_luma_minus1) as usize - ptr as usize + }, + 18usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pcm_sample_bit_depth_luma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pcm_sample_bit_depth_chroma_minus1) as usize - ptr as usize + }, + 19usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(pcm_sample_bit_depth_chroma_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_min_pcm_luma_coding_block_size_minus3) as usize + - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_min_pcm_luma_coding_block_size_minus3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_diff_max_min_pcm_luma_coding_block_size) as usize + - ptr as usize + }, + 21usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(log2_diff_max_min_pcm_luma_coding_block_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_short_term_ref_pic_sets) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(num_short_term_ref_pic_sets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_long_term_ref_pics_sps) as usize - ptr as usize }, + 23usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(num_long_term_ref_pics_sps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_format_idc) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(chroma_format_idc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps_max_sub_layers_minus1) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(sps_max_sub_layers_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_sps), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_pps - ITU-T Rec. H.265: Picture parameter set\n\n @pic_parameter_set_id: identifies the PPS for reference by other\n\t\t\t syntax elements\n @num_extra_slice_header_bits: specifies the number of extra slice header\n\t\t\t\t bits that are present in the slice header RBSP\n\t\t\t\t for coded pictures referring to the PPS.\n @num_ref_idx_l0_default_active_minus1: this value plus 1 specifies the\n inferred value of num_ref_idx_l0_active_minus1\n @num_ref_idx_l1_default_active_minus1: this value plus 1 specifies the\n inferred value of num_ref_idx_l1_active_minus1\n @init_qp_minus26: this value plus 26 specifies the initial value of SliceQp Y for\n\t\t each slice referring to the PPS\n @diff_cu_qp_delta_depth: specifies the difference between the luma coding\n\t\t\t tree block size and the minimum luma coding block\n\t\t\t size of coding units that convey cu_qp_delta_abs\n\t\t\t and cu_qp_delta_sign_flag\n @pps_cb_qp_offset: specify the offsets to the luma quantization parameter Cb\n @pps_cr_qp_offset: specify the offsets to the luma quantization parameter Cr\n @num_tile_columns_minus1: this value plus 1 specifies the number of tile columns\n\t\t\t partitioning the picture\n @num_tile_rows_minus1: this value plus 1 specifies the number of tile rows partitioning\n\t\t\t the picture\n @column_width_minus1: this value plus 1 specifies the width of the each tile column in\n\t\t\t units of coding tree blocks\n @row_height_minus1: this value plus 1 specifies the height of the each tile row in\n\t\t units of coding tree blocks\n @pps_beta_offset_div2: specify the default deblocking parameter offsets for\n\t\t\t beta divided by 2\n @pps_tc_offset_div2: specify the default deblocking parameter offsets for tC\n\t\t\tdivided by 2\n @log2_parallel_merge_level_minus2: this value plus 2 specifies the value of\n the variable Log2ParMrgLevel\n @reserved: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_PPS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_pps { + pub pic_parameter_set_id: __u8, + pub num_extra_slice_header_bits: __u8, + pub num_ref_idx_l0_default_active_minus1: __u8, + pub num_ref_idx_l1_default_active_minus1: __u8, + pub init_qp_minus26: __s8, + pub diff_cu_qp_delta_depth: __u8, + pub pps_cb_qp_offset: __s8, + pub pps_cr_qp_offset: __s8, + pub num_tile_columns_minus1: __u8, + pub num_tile_rows_minus1: __u8, + pub column_width_minus1: [__u8; 20usize], + pub row_height_minus1: [__u8; 22usize], + pub pps_beta_offset_div2: __s8, + pub pps_tc_offset_div2: __s8, + pub log2_parallel_merge_level_minus2: __u8, + pub reserved: __u8, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_pps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_pps)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_pps)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_parameter_set_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pic_parameter_set_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_extra_slice_header_bits) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_extra_slice_header_bits) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_default_active_minus1) as usize + - ptr as usize + }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_ref_idx_l0_default_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_default_active_minus1) as usize + - ptr as usize + }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_ref_idx_l1_default_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).init_qp_minus26) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(init_qp_minus26) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).diff_cu_qp_delta_depth) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(diff_cu_qp_delta_depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cb_qp_offset) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_cr_qp_offset) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_columns_minus1) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_tile_columns_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_tile_rows_minus1) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(num_tile_rows_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).column_width_minus1) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(column_width_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).row_height_minus1) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(row_height_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_beta_offset_div2) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pps_tc_offset_div2) as usize - ptr as usize }, + 53usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(pps_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).log2_parallel_merge_level_minus2) as usize - ptr as usize + }, + 54usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(log2_parallel_merge_level_minus2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 55usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_pps), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_hevc_dpb_entry - HEVC decoded picture buffer entry\n\n @timestamp: timestamp of the V4L2 capture buffer to use as reference.\n @flags: long term flag for the reference frame\n @field_pic: whether the reference is a field picture or a frame.\n @reserved: padding field. Should be zeroed by applications.\n @pic_order_cnt_val: the picture order count of the current picture."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_hevc_dpb_entry { + pub timestamp: __u64, + pub flags: __u8, + pub field_pic: __u8, + pub reserved: __u16, + pub pic_order_cnt_val: __s32, +} +#[test] +fn bindgen_test_layout_v4l2_hevc_dpb_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_hevc_dpb_entry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_hevc_dpb_entry)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(timestamp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).field_pic) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(field_pic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_val) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_dpb_entry), + "::", + stringify!(pic_order_cnt_val) + ) + ); +} +#[doc = " struct v4l2_hevc_pred_weight_table - HEVC weighted prediction parameters\n\n @delta_luma_weight_l0: the difference of the weighting factor applied\n\t\t\t to the luma prediction value for list 0\n @luma_offset_l0: the additive offset applied to the luma prediction value\n\t\t for list 0\n @delta_chroma_weight_l0: the difference of the weighting factor applied\n\t\t\t to the chroma prediction values for list 0\n @chroma_offset_l0: the difference of the additive offset applied to\n\t\t the chroma prediction values for list 0\n @delta_luma_weight_l1: the difference of the weighting factor applied\n\t\t\t to the luma prediction value for list 1\n @luma_offset_l1: the additive offset applied to the luma prediction value\n\t\t for list 1\n @delta_chroma_weight_l1: the difference of the weighting factor applied\n\t\t\t to the chroma prediction values for list 1\n @chroma_offset_l1: the difference of the additive offset applied to\n\t\t the chroma prediction values for list 1\n @luma_log2_weight_denom: the base 2 logarithm of the denominator for\n\t\t\t all luma weighting factors\n @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm\n\t\t\t\t of the denominator for all chroma\n\t\t\t\t weighting factors"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_hevc_pred_weight_table { + pub delta_luma_weight_l0: [__s8; 16usize], + pub luma_offset_l0: [__s8; 16usize], + pub delta_chroma_weight_l0: [[__s8; 2usize]; 16usize], + pub chroma_offset_l0: [[__s8; 2usize]; 16usize], + pub delta_luma_weight_l1: [__s8; 16usize], + pub luma_offset_l1: [__s8; 16usize], + pub delta_chroma_weight_l1: [[__s8; 2usize]; 16usize], + pub chroma_offset_l1: [[__s8; 2usize]; 16usize], + pub luma_log2_weight_denom: __u8, + pub delta_chroma_log2_weight_denom: __s8, +} +#[test] +fn bindgen_test_layout_v4l2_hevc_pred_weight_table() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 194usize, + concat!("Size of: ", stringify!(v4l2_hevc_pred_weight_table)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_hevc_pred_weight_table)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l0) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_luma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l0) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l0) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_weight_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l0) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(chroma_offset_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_luma_weight_l1) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_luma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_offset_l1) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_chroma_weight_l1) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_weight_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chroma_offset_l1) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(chroma_offset_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).luma_log2_weight_denom) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(luma_log2_weight_denom) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).delta_chroma_log2_weight_denom) as usize - ptr as usize + }, + 193usize, + concat!( + "Offset of field: ", + stringify!(v4l2_hevc_pred_weight_table), + "::", + stringify!(delta_chroma_log2_weight_denom) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_slice_params - HEVC slice parameters\n\n This control is a dynamically sized 1-dimensional array,\n V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.\n\n @bit_size: size (in bits) of the current slice data\n @data_byte_offset: offset (in bytes) to the video data in the current slice data\n @num_entry_point_offsets: specifies the number of entry point offset syntax\n\t\t\t elements in the slice header.\n @nal_unit_type: specifies the coding type of the slice (B, P or I)\n @nuh_temporal_id_plus1: minus 1 specifies a temporal identifier for the NAL unit\n @slice_type: see V4L2_HEVC_SLICE_TYPE_{}\n @colour_plane_id: specifies the colour plane associated with the current slice\n @slice_pic_order_cnt: specifies the picture order count\n @num_ref_idx_l0_active_minus1: this value plus 1 specifies the maximum\n reference index for reference picture list 0\n that may be used to decode the slice\n @num_ref_idx_l1_active_minus1: this value plus 1 specifies the maximum\n reference index for reference picture list 1\n that may be used to decode the slice\n @collocated_ref_idx: specifies the reference index of the collocated picture used\n\t\t\tfor temporal motion vector prediction\n @five_minus_max_num_merge_cand: specifies the maximum number of merging\n\t\t\t\t motion vector prediction candidates supported in\n\t\t\t\t the slice subtracted from 5\n @slice_qp_delta: specifies the initial value of QpY to be used for the coding\n\t\t blocks in the slice\n @slice_cb_qp_offset: specifies a difference to be added to the value of pps_cb_qp_offset\n @slice_cr_qp_offset: specifies a difference to be added to the value of pps_cr_qp_offset\n @slice_act_y_qp_offset: screen content extension parameters\n @slice_act_cb_qp_offset: screen content extension parameters\n @slice_act_cr_qp_offset: screen content extension parameters\n @slice_beta_offset_div2: specify the deblocking parameter offsets for beta divided by 2\n @slice_tc_offset_div2: specify the deblocking parameter offsets for tC divided by 2\n @pic_struct: indicates whether a picture should be displayed as a frame or as one or\n\t\tmore fields\n @reserved0: padding field. Should be zeroed by applications.\n @slice_segment_addr: specifies the address of the first coding tree block in\n\t\t\tthe slice segment\n @ref_idx_l0: the list of L0 reference elements as indices in the DPB\n @ref_idx_l1: the list of L1 reference elements as indices in the DPB\n @short_term_ref_pic_set_size: specifies the size of short-term reference\n\t\t\t\t pictures set included in the SPS\n @long_term_ref_pic_set_size: specifies the size of long-term reference\n\t\t\t\tpictures set include in the SPS\n @pred_weight_table: the prediction weight coefficients for inter-picture\n\t\t prediction\n @reserved1: padding field. Should be zeroed by applications.\n @flags: see V4L2_HEVC_SLICE_PARAMS_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_slice_params { + pub bit_size: __u32, + pub data_byte_offset: __u32, + pub num_entry_point_offsets: __u32, + pub nal_unit_type: __u8, + pub nuh_temporal_id_plus1: __u8, + pub slice_type: __u8, + pub colour_plane_id: __u8, + pub slice_pic_order_cnt: __s32, + pub num_ref_idx_l0_active_minus1: __u8, + pub num_ref_idx_l1_active_minus1: __u8, + pub collocated_ref_idx: __u8, + pub five_minus_max_num_merge_cand: __u8, + pub slice_qp_delta: __s8, + pub slice_cb_qp_offset: __s8, + pub slice_cr_qp_offset: __s8, + pub slice_act_y_qp_offset: __s8, + pub slice_act_cb_qp_offset: __s8, + pub slice_act_cr_qp_offset: __s8, + pub slice_beta_offset_div2: __s8, + pub slice_tc_offset_div2: __s8, + pub pic_struct: __u8, + pub reserved0: [__u8; 3usize], + pub slice_segment_addr: __u32, + pub ref_idx_l0: [__u8; 16usize], + pub ref_idx_l1: [__u8; 16usize], + pub short_term_ref_pic_set_size: __u16, + pub long_term_ref_pic_set_size: __u16, + pub pred_weight_table: v4l2_hevc_pred_weight_table, + pub reserved1: [__u8; 2usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_slice_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 280usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_slice_params)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_slice_params)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(bit_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_byte_offset) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(data_byte_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_entry_point_offsets) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_entry_point_offsets) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nal_unit_type) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(nal_unit_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nuh_temporal_id_plus1) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(nuh_temporal_id_plus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_type) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).colour_plane_id) as usize - ptr as usize }, + 15usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(colour_plane_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_pic_order_cnt) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_pic_order_cnt) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l0_active_minus1) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_ref_idx_l0_active_minus1) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).num_ref_idx_l1_active_minus1) as usize - ptr as usize + }, + 21usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(num_ref_idx_l1_active_minus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).collocated_ref_idx) as usize - ptr as usize }, + 22usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(collocated_ref_idx) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).five_minus_max_num_merge_cand) as usize - ptr as usize + }, + 23usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(five_minus_max_num_merge_cand) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_qp_delta) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_qp_delta) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cb_qp_offset) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_cr_qp_offset) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_y_qp_offset) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_y_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cb_qp_offset) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_cb_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_act_cr_qp_offset) as usize - ptr as usize }, + 29usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_act_cr_qp_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_beta_offset_div2) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_beta_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_tc_offset_div2) as usize - ptr as usize }, + 31usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_tc_offset_div2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_struct) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(pic_struct) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(reserved0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slice_segment_addr) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(slice_segment_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_idx_l0) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(ref_idx_l0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_idx_l1) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(ref_idx_l1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_size) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(short_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_ref_pic_set_size) as usize - ptr as usize }, + 74usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(long_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pred_weight_table) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(pred_weight_table) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 270usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_slice_params), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_decode_params - HEVC decode parameters\n\n @pic_order_cnt_val: picture order count\n @short_term_ref_pic_set_size: specifies the size of short-term reference\n\t\t\t\t pictures set included in the SPS of the first slice\n @long_term_ref_pic_set_size: specifies the size of long-term reference\n\t\t\t\tpictures set include in the SPS of the first slice\n @num_active_dpb_entries: the number of entries in dpb\n @num_poc_st_curr_before: the number of reference pictures in the short-term\n\t\t\t set that come before the current frame\n @num_poc_st_curr_after: the number of reference pictures in the short-term\n\t\t\t set that come after the current frame\n @num_poc_lt_curr: the number of reference pictures in the long-term set\n @poc_st_curr_before: provides the index of the short term before references\n\t\t\tin DPB array\n @poc_st_curr_after: provides the index of the short term after references\n\t\t in DPB array\n @poc_lt_curr: provides the index of the long term references in DPB array\n @reserved: padding field. Should be zeroed by applications.\n @dpb: the decoded picture buffer, for meta-data about reference frames\n @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{}"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_decode_params { + pub pic_order_cnt_val: __s32, + pub short_term_ref_pic_set_size: __u16, + pub long_term_ref_pic_set_size: __u16, + pub num_active_dpb_entries: __u8, + pub num_poc_st_curr_before: __u8, + pub num_poc_st_curr_after: __u8, + pub num_poc_lt_curr: __u8, + pub poc_st_curr_before: [__u8; 16usize], + pub poc_st_curr_after: [__u8; 16usize], + pub poc_lt_curr: [__u8; 16usize], + pub reserved: [__u8; 4usize], + pub dpb: [v4l2_hevc_dpb_entry; 16usize], + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_decode_params() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 328usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_decode_params)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_decode_params)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pic_order_cnt_val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(pic_order_cnt_val) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).short_term_ref_pic_set_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(short_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_term_ref_pic_set_size) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(long_term_ref_pic_set_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_active_dpb_entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_active_dpb_entries) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_st_curr_before) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_st_curr_before) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_st_curr_after) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_st_curr_after) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_poc_lt_curr) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(num_poc_lt_curr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_st_curr_before) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_st_curr_before) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_st_curr_after) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_st_curr_after) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poc_lt_curr) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(poc_lt_curr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dpb) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(dpb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 320usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_decode_params), + "::", + stringify!(flags) + ) + ); +} +#[doc = " struct v4l2_ctrl_hevc_scaling_matrix - HEVC scaling lists parameters\n\n @scaling_list_4x4: scaling list is used for the scaling process for\n\t\t transform coefficients. The values on each scaling\n\t\t list are expected in raster scan order\n @scaling_list_8x8: scaling list is used for the scaling process for\n\t\t transform coefficients. The values on each scaling\n\t\t list are expected in raster scan order\n @scaling_list_16x16:\tscaling list is used for the scaling process for\n\t\t\ttransform coefficients. The values on each scaling\n\t\t\tlist are expected in raster scan order\n @scaling_list_32x32:\tscaling list is used for the scaling process for\n\t\t\ttransform coefficients. The values on each scaling\n\t\t\tlist are expected in raster scan order\n @scaling_list_dc_coef_16x16:\tscaling list is used for the scaling process\n\t\t\t\tfor transform coefficients. The values on each\n\t\t\t\tscaling list are expected in raster scan order.\n @scaling_list_dc_coef_32x32:\tscaling list is used for the scaling process\n\t\t\t\tfor transform coefficients. The values on each\n\t\t\t\tscaling list are expected in raster scan order."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hevc_scaling_matrix { + pub scaling_list_4x4: [[__u8; 16usize]; 6usize], + pub scaling_list_8x8: [[__u8; 64usize]; 6usize], + pub scaling_list_16x16: [[__u8; 64usize]; 6usize], + pub scaling_list_32x32: [[__u8; 64usize]; 2usize], + pub scaling_list_dc_coef_16x16: [__u8; 6usize], + pub scaling_list_dc_coef_32x32: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hevc_scaling_matrix() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1000usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hevc_scaling_matrix)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hevc_scaling_matrix)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_4x4) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_4x4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_8x8) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_8x8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_16x16) as usize - ptr as usize }, + 480usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_32x32) as usize - ptr as usize }, + 864usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_32x32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_dc_coef_16x16) as usize - ptr as usize }, + 992usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_dc_coef_16x16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scaling_list_dc_coef_32x32) as usize - ptr as usize }, + 998usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hevc_scaling_matrix), + "::", + stringify!(scaling_list_dc_coef_32x32) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hdr10_cll_info { + pub max_content_light_level: __u16, + pub max_pic_average_light_level: __u16, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hdr10_cll_info() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hdr10_cll_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_hdr10_cll_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_content_light_level) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_cll_info), + "::", + stringify!(max_content_light_level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_pic_average_light_level) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_cll_info), + "::", + stringify!(max_pic_average_light_level) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_hdr10_mastering_display { + pub display_primaries_x: [__u16; 3usize], + pub display_primaries_y: [__u16; 3usize], + pub white_point_x: __u16, + pub white_point_y: __u16, + pub max_display_mastering_luminance: __u32, + pub min_display_mastering_luminance: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_hdr10_mastering_display() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(v4l2_ctrl_hdr10_mastering_display)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(v4l2_ctrl_hdr10_mastering_display) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).display_primaries_x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(display_primaries_x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).display_primaries_y) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(display_primaries_y) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).white_point_x) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(white_point_x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).white_point_y) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(white_point_y) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).max_display_mastering_luminance) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(max_display_mastering_luminance) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).min_display_mastering_luminance) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_hdr10_mastering_display), + "::", + stringify!(min_display_mastering_luminance) + ) + ); +} +#[doc = " struct v4l2_vp9_loop_filter - VP9 loop filter parameters\n\n @ref_deltas: contains the adjustment needed for the filter level based on the\n chosen reference frame. If this syntax element is not present in the bitstream,\n users should pass its last value.\n @mode_deltas: contains the adjustment needed for the filter level based on the\n chosen mode.\tIf this syntax element is not present in the bitstream, users should\n pass its last value.\n @level: indicates the loop filter strength.\n @sharpness: indicates the sharpness level.\n @flags: combination of V4L2_VP9_LOOP_FILTER_FLAG_{} flags.\n @reserved: padding field. Should be zeroed by applications.\n\n This structure contains all loop filter related parameters. See sections\n '7.2.8 Loop filter semantics' of the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_loop_filter { + pub ref_deltas: [__s8; 4usize], + pub mode_deltas: [__s8; 2usize], + pub level: __u8, + pub sharpness: __u8, + pub flags: __u8, + pub reserved: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_loop_filter() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_vp9_loop_filter)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_loop_filter)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_deltas) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(ref_deltas) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mode_deltas) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(mode_deltas) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(level) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharpness) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(sharpness) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_loop_filter), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_quantization - VP9 quantization parameters\n\n @base_q_idx: indicates the base frame qindex.\n @delta_q_y_dc: indicates the Y DC quantizer relative to base_q_idx.\n @delta_q_uv_dc: indicates the UV DC quantizer relative to base_q_idx.\n @delta_q_uv_ac: indicates the UV AC quantizer relative to base_q_idx.\n @reserved: padding field. Should be zeroed by applications.\n\n Encodes the quantization parameters. See section '7.2.9 Quantization params\n syntax' of the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_quantization { + pub base_q_idx: __u8, + pub delta_q_y_dc: __s8, + pub delta_q_uv_dc: __s8, + pub delta_q_uv_ac: __s8, + pub reserved: [__u8; 4usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_quantization() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_vp9_quantization)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_quantization)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_q_idx) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(base_q_idx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_y_dc) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_y_dc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_uv_dc) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_uv_dc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).delta_q_uv_ac) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(delta_q_uv_ac) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_quantization), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_segmentation - VP9 segmentation parameters\n\n @feature_data: data attached to each feature. Data entry is only valid if\n the feature is enabled. The array shall be indexed with segment number as\n the first dimension (0..7) and one of V4L2_VP9_SEG_{} as the second dimension.\n @feature_enabled: bitmask defining which features are enabled in each segment.\n The value for each segment is a combination of V4L2_VP9_SEGMENT_FEATURE_ENABLED(id)\n values where id is one of V4L2_VP9_SEG_LVL_{}.\n @tree_probs: specifies the probability values to be used when decoding a\n Segment-ID. See '5.15. Segmentation map' section of the VP9 specification\n for more details.\n @pred_probs: specifies the probability values to be used when decoding a\n Predicted-Segment-ID. See '6.4.14. Get segment id syntax' section of :ref:`vp9`\n for more details.\n @flags: combination of V4L2_VP9_SEGMENTATION_FLAG_{} flags.\n @reserved: padding field. Should be zeroed by applications.\n\n Encodes the quantization parameters. See section '7.2.10 Segmentation params syntax' of\n the VP9 specification for more details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_segmentation { + pub feature_data: [[__s16; 4usize]; 8usize], + pub feature_enabled: [__u8; 8usize], + pub tree_probs: [__u8; 7usize], + pub pred_probs: [__u8; 3usize], + pub flags: __u8, + pub reserved: [__u8; 5usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_segmentation() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!("Size of: ", stringify!(v4l2_vp9_segmentation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(v4l2_vp9_segmentation)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature_data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(feature_data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature_enabled) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(feature_enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tree_probs) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(tree_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pred_probs) as usize - ptr as usize }, + 79usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(pred_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 82usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 83usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_segmentation), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp9_frame - VP9 frame decoding control\n\n @lf: loop filter parameters. See &v4l2_vp9_loop_filter for more details.\n @quant: quantization parameters. See &v4l2_vp9_quantization for more details.\n @seg: segmentation parameters. See &v4l2_vp9_segmentation for more details.\n @flags: combination of V4L2_VP9_FRAME_FLAG_{} flags.\n @compressed_header_size: compressed header size in bytes.\n @uncompressed_header_size: uncompressed header size in bytes.\n @frame_width_minus_1: add 1 to it and you'll get the frame width expressed in pixels.\n @frame_height_minus_1: add 1 to it and you'll get the frame height expressed in pixels.\n @render_width_minus_1: add 1 to it and you'll get the expected render width expressed in\n pixels. This is not used during the decoding process but might be used by HW scalers\n to prepare a frame that's ready for scanout.\n @render_height_minus_1: add 1 to it and you'll get the expected render height expressed in\n pixels. This is not used during the decoding process but might be used by HW scalers\n to prepare a frame that's ready for scanout.\n @last_frame_ts: \"last\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @golden_frame_ts: \"golden\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @alt_frame_ts: \"alt\" reference buffer timestamp.\n The timestamp refers to the timestamp field in struct v4l2_buffer.\n Use v4l2_timeval_to_ns() to convert the struct timeval to a __u64.\n @ref_frame_sign_bias: a bitfield specifying whether the sign bias is set for a given\n reference frame. Either of V4L2_VP9_SIGN_BIAS_{}.\n @reset_frame_context: specifies whether the frame context should be reset to default values.\n Either of V4L2_VP9_RESET_FRAME_CTX_{}.\n @frame_context_idx: frame context that should be used/updated.\n @profile: VP9 profile. Can be 0, 1, 2 or 3.\n @bit_depth: bits per components. Can be 8, 10 or 12. Note that not all profiles support\n 10 and/or 12 bits depths.\n @interpolation_filter: specifies the filter selection used for performing inter prediction.\n Set to one of V4L2_VP9_INTERP_FILTER_{}.\n @tile_cols_log2: specifies the base 2 logarithm of the width of each tile (where the width\n is measured in units of 8x8 blocks). Shall be less than or equal to 6.\n @tile_rows_log2: specifies the base 2 logarithm of the height of each tile (where the height\n is measured in units of 8x8 blocks).\n @reference_mode: specifies the type of inter prediction to be used.\n Set to one of V4L2_VP9_REFERENCE_MODE_{}.\n @reserved: padding field. Should be zeroed by applications."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp9_frame { + pub lf: v4l2_vp9_loop_filter, + pub quant: v4l2_vp9_quantization, + pub seg: v4l2_vp9_segmentation, + pub flags: __u32, + pub compressed_header_size: __u16, + pub uncompressed_header_size: __u16, + pub frame_width_minus_1: __u16, + pub frame_height_minus_1: __u16, + pub render_width_minus_1: __u16, + pub render_height_minus_1: __u16, + pub last_frame_ts: __u64, + pub golden_frame_ts: __u64, + pub alt_frame_ts: __u64, + pub ref_frame_sign_bias: __u8, + pub reset_frame_context: __u8, + pub frame_context_idx: __u8, + pub profile: __u8, + pub bit_depth: __u8, + pub interpolation_filter: __u8, + pub tile_cols_log2: __u8, + pub tile_rows_log2: __u8, + pub reference_mode: __u8, + pub reserved: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp9_frame() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp9_frame)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp9_frame)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lf) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(lf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).quant) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(quant) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seg) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(seg) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compressed_header_size) as usize - ptr as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(compressed_header_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uncompressed_header_size) as usize - ptr as usize }, + 118usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(uncompressed_header_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_width_minus_1) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_width_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_height_minus_1) as usize - ptr as usize }, + 122usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_height_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).render_width_minus_1) as usize - ptr as usize }, + 124usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(render_width_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).render_height_minus_1) as usize - ptr as usize }, + 126usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(render_height_minus_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_frame_ts) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(last_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).golden_frame_ts) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(golden_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alt_frame_ts) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(alt_frame_ts) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ref_frame_sign_bias) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(ref_frame_sign_bias) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reset_frame_context) as usize - ptr as usize }, + 153usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reset_frame_context) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frame_context_idx) as usize - ptr as usize }, + 154usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(frame_context_idx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).profile) as usize - ptr as usize }, + 155usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(profile) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bit_depth) as usize - ptr as usize }, + 156usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(bit_depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interpolation_filter) as usize - ptr as usize }, + 157usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(interpolation_filter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tile_cols_log2) as usize - ptr as usize }, + 158usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(tile_cols_log2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tile_rows_log2) as usize - ptr as usize }, + 159usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(tile_rows_log2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reference_mode) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reference_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 161usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_frame), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " struct v4l2_vp9_mv_probs - VP9 Motion vector probability updates\n @joint: motion vector joint probability updates.\n @sign: motion vector sign probability updates.\n @classes: motion vector class probability updates.\n @class0_bit: motion vector class0 bit probability updates.\n @bits: motion vector bits probability updates.\n @class0_fr: motion vector class0 fractional bit probability updates.\n @fr: motion vector fractional bit probability updates.\n @class0_hp: motion vector class0 high precision fractional bit probability updates.\n @hp: motion vector high precision fractional bit probability updates.\n\n This structure contains new values of motion vector probabilities.\n A value of zero in an array element means there is no update of the relevant probability.\n See `struct v4l2_vp9_prob_updates` for details."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_vp9_mv_probs { + pub joint: [__u8; 3usize], + pub sign: [__u8; 2usize], + pub classes: [[__u8; 10usize]; 2usize], + pub class0_bit: [__u8; 2usize], + pub bits: [[__u8; 10usize]; 2usize], + pub class0_fr: [[[__u8; 3usize]; 2usize]; 2usize], + pub fr: [[__u8; 3usize]; 2usize], + pub class0_hp: [__u8; 2usize], + pub hp: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_v4l2_vp9_mv_probs() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 69usize, + concat!("Size of: ", stringify!(v4l2_vp9_mv_probs)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_vp9_mv_probs)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).joint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(joint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sign) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(sign) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).classes) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(classes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_bit) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_bit) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize }, + 27usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(bits) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_fr) as usize - ptr as usize }, + 47usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_fr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fr) as usize - ptr as usize }, + 59usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(fr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).class0_hp) as usize - ptr as usize }, + 65usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(class0_hp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hp) as usize - ptr as usize }, + 67usize, + concat!( + "Offset of field: ", + stringify!(v4l2_vp9_mv_probs), + "::", + stringify!(hp) + ) + ); +} +#[doc = " struct v4l2_ctrl_vp9_compressed_hdr - VP9 probability updates control\n @tx_mode: specifies the TX mode. Set to one of V4L2_VP9_TX_MODE_{}.\n @tx8: TX 8x8 probability updates.\n @tx16: TX 16x16 probability updates.\n @tx32: TX 32x32 probability updates.\n @coef: coefficient probability updates.\n @skip: skip probability updates.\n @inter_mode: inter mode probability updates.\n @interp_filter: interpolation filter probability updates.\n @is_inter: is inter-block probability updates.\n @comp_mode: compound prediction mode probability updates.\n @single_ref: single ref probability updates.\n @comp_ref: compound ref probability updates.\n @y_mode: Y prediction mode probability updates.\n @uv_mode: UV prediction mode probability updates.\n @partition: partition probability updates.\n @mv: motion vector probability updates.\n\n This structure holds the probabilities update as parsed in the compressed\n header (Spec 6.3). These values represent the value of probability update after\n being translated with inv_map_table[] (see 6.3.5). A value of zero in an array element\n means that there is no update of the relevant probability.\n\n This control is optional and needs to be used when dealing with the hardware which is\n not capable of parsing the compressed header itself. Only drivers which need it will\n implement it."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_ctrl_vp9_compressed_hdr { + pub tx_mode: __u8, + pub tx8: [[__u8; 1usize]; 2usize], + pub tx16: [[__u8; 2usize]; 2usize], + pub tx32: [[__u8; 3usize]; 2usize], + pub coef: [[[[[[__u8; 3usize]; 6usize]; 6usize]; 2usize]; 2usize]; 4usize], + pub skip: [__u8; 3usize], + pub inter_mode: [[__u8; 3usize]; 7usize], + pub interp_filter: [[__u8; 2usize]; 4usize], + pub is_inter: [__u8; 4usize], + pub comp_mode: [__u8; 5usize], + pub single_ref: [[__u8; 2usize]; 5usize], + pub comp_ref: [__u8; 5usize], + pub y_mode: [[__u8; 9usize]; 4usize], + pub uv_mode: [[__u8; 9usize]; 10usize], + pub partition: [[__u8; 3usize]; 16usize], + pub mv: v4l2_vp9_mv_probs, +} +#[test] +fn bindgen_test_layout_v4l2_ctrl_vp9_compressed_hdr() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2040usize, + concat!("Size of: ", stringify!(v4l2_ctrl_vp9_compressed_hdr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(v4l2_ctrl_vp9_compressed_hdr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx_mode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx8) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx16) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tx32) as usize - ptr as usize }, + 7usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(tx32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coef) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(coef) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize }, + 1741usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(skip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).inter_mode) as usize - ptr as usize }, + 1744usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(inter_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interp_filter) as usize - ptr as usize }, + 1765usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(interp_filter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).is_inter) as usize - ptr as usize }, + 1773usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(is_inter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).comp_mode) as usize - ptr as usize }, + 1777usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(comp_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).single_ref) as usize - ptr as usize }, + 1782usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(single_ref) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).comp_ref) as usize - ptr as usize }, + 1792usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(comp_ref) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y_mode) as usize - ptr as usize }, + 1797usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(y_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uv_mode) as usize - ptr as usize }, + 1833usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(uv_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition) as usize - ptr as usize }, + 1923usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(partition) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mv) as usize - ptr as usize }, + 1971usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ctrl_vp9_compressed_hdr), + "::", + stringify!(mv) + ) + ); +} +pub const v4l2_field_V4L2_FIELD_ANY: v4l2_field = 0; +pub const v4l2_field_V4L2_FIELD_NONE: v4l2_field = 1; +pub const v4l2_field_V4L2_FIELD_TOP: v4l2_field = 2; +pub const v4l2_field_V4L2_FIELD_BOTTOM: v4l2_field = 3; +pub const v4l2_field_V4L2_FIELD_INTERLACED: v4l2_field = 4; +pub const v4l2_field_V4L2_FIELD_SEQ_TB: v4l2_field = 5; +pub const v4l2_field_V4L2_FIELD_SEQ_BT: v4l2_field = 6; +pub const v4l2_field_V4L2_FIELD_ALTERNATE: v4l2_field = 7; +pub const v4l2_field_V4L2_FIELD_INTERLACED_TB: v4l2_field = 8; +pub const v4l2_field_V4L2_FIELD_INTERLACED_BT: v4l2_field = 9; +pub type v4l2_field = ::std::os::raw::c_uint; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE: v4l2_buf_type = 1; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT: v4l2_buf_type = 2; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OVERLAY: v4l2_buf_type = 3; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_CAPTURE: v4l2_buf_type = 4; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VBI_OUTPUT: v4l2_buf_type = 5; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: v4l2_buf_type = 6; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: v4l2_buf_type = 7; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: v4l2_buf_type = 8; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: v4l2_buf_type = 9; +pub const v4l2_buf_type_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: v4l2_buf_type = 10; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_CAPTURE: v4l2_buf_type = 11; +pub const v4l2_buf_type_V4L2_BUF_TYPE_SDR_OUTPUT: v4l2_buf_type = 12; +pub const v4l2_buf_type_V4L2_BUF_TYPE_META_CAPTURE: v4l2_buf_type = 13; +pub const v4l2_buf_type_V4L2_BUF_TYPE_META_OUTPUT: v4l2_buf_type = 14; +pub const v4l2_buf_type_V4L2_BUF_TYPE_PRIVATE: v4l2_buf_type = 128; +pub type v4l2_buf_type = ::std::os::raw::c_uint; +pub const v4l2_tuner_type_V4L2_TUNER_RADIO: v4l2_tuner_type = 1; +pub const v4l2_tuner_type_V4L2_TUNER_ANALOG_TV: v4l2_tuner_type = 2; +pub const v4l2_tuner_type_V4L2_TUNER_DIGITAL_TV: v4l2_tuner_type = 3; +pub const v4l2_tuner_type_V4L2_TUNER_SDR: v4l2_tuner_type = 4; +pub const v4l2_tuner_type_V4L2_TUNER_RF: v4l2_tuner_type = 5; +pub type v4l2_tuner_type = ::std::os::raw::c_uint; +pub const v4l2_memory_V4L2_MEMORY_MMAP: v4l2_memory = 1; +pub const v4l2_memory_V4L2_MEMORY_USERPTR: v4l2_memory = 2; +pub const v4l2_memory_V4L2_MEMORY_OVERLAY: v4l2_memory = 3; +pub const v4l2_memory_V4L2_MEMORY_DMABUF: v4l2_memory = 4; +pub type v4l2_memory = ::std::os::raw::c_uint; +pub const v4l2_colorspace_V4L2_COLORSPACE_DEFAULT: v4l2_colorspace = 0; +pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE170M: v4l2_colorspace = 1; +pub const v4l2_colorspace_V4L2_COLORSPACE_SMPTE240M: v4l2_colorspace = 2; +pub const v4l2_colorspace_V4L2_COLORSPACE_REC709: v4l2_colorspace = 3; +pub const v4l2_colorspace_V4L2_COLORSPACE_BT878: v4l2_colorspace = 4; +pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_M: v4l2_colorspace = 5; +pub const v4l2_colorspace_V4L2_COLORSPACE_470_SYSTEM_BG: v4l2_colorspace = 6; +pub const v4l2_colorspace_V4L2_COLORSPACE_JPEG: v4l2_colorspace = 7; +pub const v4l2_colorspace_V4L2_COLORSPACE_SRGB: v4l2_colorspace = 8; +pub const v4l2_colorspace_V4L2_COLORSPACE_OPRGB: v4l2_colorspace = 9; +pub const v4l2_colorspace_V4L2_COLORSPACE_BT2020: v4l2_colorspace = 10; +pub const v4l2_colorspace_V4L2_COLORSPACE_RAW: v4l2_colorspace = 11; +pub const v4l2_colorspace_V4L2_COLORSPACE_DCI_P3: v4l2_colorspace = 12; +pub type v4l2_colorspace = ::std::os::raw::c_uint; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_DEFAULT: v4l2_xfer_func = 0; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_709: v4l2_xfer_func = 1; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SRGB: v4l2_xfer_func = 2; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_OPRGB: v4l2_xfer_func = 3; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE240M: v4l2_xfer_func = 4; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_NONE: v4l2_xfer_func = 5; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_DCI_P3: v4l2_xfer_func = 6; +pub const v4l2_xfer_func_V4L2_XFER_FUNC_SMPTE2084: v4l2_xfer_func = 7; +pub type v4l2_xfer_func = ::std::os::raw::c_uint; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_DEFAULT: v4l2_ycbcr_encoding = 0; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_601: v4l2_ycbcr_encoding = 1; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_709: v4l2_ycbcr_encoding = 2; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV601: v4l2_ycbcr_encoding = 3; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_XV709: v4l2_ycbcr_encoding = 4; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SYCC: v4l2_ycbcr_encoding = 5; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020: v4l2_ycbcr_encoding = 6; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_BT2020_CONST_LUM: v4l2_ycbcr_encoding = 7; +pub const v4l2_ycbcr_encoding_V4L2_YCBCR_ENC_SMPTE240M: v4l2_ycbcr_encoding = 8; +pub type v4l2_ycbcr_encoding = ::std::os::raw::c_uint; +pub const v4l2_hsv_encoding_V4L2_HSV_ENC_180: v4l2_hsv_encoding = 128; +pub const v4l2_hsv_encoding_V4L2_HSV_ENC_256: v4l2_hsv_encoding = 129; +pub type v4l2_hsv_encoding = ::std::os::raw::c_uint; +pub const v4l2_quantization_V4L2_QUANTIZATION_DEFAULT: v4l2_quantization = 0; +pub const v4l2_quantization_V4L2_QUANTIZATION_FULL_RANGE: v4l2_quantization = 1; +pub const v4l2_quantization_V4L2_QUANTIZATION_LIM_RANGE: v4l2_quantization = 2; +pub type v4l2_quantization = ::std::os::raw::c_uint; +pub const v4l2_priority_V4L2_PRIORITY_UNSET: v4l2_priority = 0; +pub const v4l2_priority_V4L2_PRIORITY_BACKGROUND: v4l2_priority = 1; +pub const v4l2_priority_V4L2_PRIORITY_INTERACTIVE: v4l2_priority = 2; +pub const v4l2_priority_V4L2_PRIORITY_RECORD: v4l2_priority = 3; +pub const v4l2_priority_V4L2_PRIORITY_DEFAULT: v4l2_priority = 2; +pub type v4l2_priority = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_rect { + pub left: __s32, + pub top: __s32, + pub width: __u32, + pub height: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_rect() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(v4l2_rect)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_rect)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).left) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(left) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).top) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(top) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(v4l2_rect), + "::", + stringify!(height) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_fract { + pub numerator: __u32, + pub denominator: __u32, +} +#[test] +fn bindgen_test_layout_v4l2_fract() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(v4l2_fract)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(v4l2_fract)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_fract), + "::", + stringify!(numerator) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(v4l2_fract), + "::", + stringify!(denominator) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct v4l2_area { + pub width: __u32, + pub height: __u32, } #[test] fn bindgen_test_layout_v4l2_area() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -3657,7 +7028,7 @@ fn bindgen_test_layout_v4l2_area() { concat!("Alignment of ", stringify!(v4l2_area)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3667,7 +7038,7 @@ fn bindgen_test_layout_v4l2_area() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3677,15 +7048,7 @@ fn bindgen_test_layout_v4l2_area() { ) ); } -#[doc = " struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP"] -#[doc = ""] -#[doc = " @driver:\t name of the driver module (e.g. \"bttv\")"] -#[doc = " @card:\t name of the card (e.g. \"Hauppauge WinTV\")"] -#[doc = " @bus_info:\t name of the bus (e.g. \"PCI:\" + pci_name(pci_dev) )"] -#[doc = " @version:\t KERNEL_VERSION"] -#[doc = " @capabilities: capabilities of the physical device as a whole"] -#[doc = " @device_caps: capabilities accessed via this particular device (node)"] -#[doc = " @reserved:\t reserved fields for future extensions"] +#[doc = " struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP\n\n @driver:\t name of the driver module (e.g. \"bttv\")\n @card:\t name of the card (e.g. \"Hauppauge WinTV\")\n @bus_info:\t name of the bus (e.g. \"PCI:\" + pci_name(pci_dev) )\n @version:\t KERNEL_VERSION\n @capabilities: capabilities of the physical device as a whole\n @device_caps: capabilities accessed via this particular device (node)\n @reserved:\t reserved fields for future extensions"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_capability { @@ -3699,6 +7062,8 @@ pub struct v4l2_capability { } #[test] fn bindgen_test_layout_v4l2_capability() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 104usize, @@ -3710,7 +7075,7 @@ fn bindgen_test_layout_v4l2_capability() { concat!("Alignment of ", stringify!(v4l2_capability)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).driver as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).driver) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3720,7 +7085,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).card as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).card) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3730,7 +7095,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bus_info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bus_info) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -3740,7 +7105,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -3750,7 +7115,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -3760,7 +7125,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).device_caps as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).device_caps) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -3770,7 +7135,7 @@ fn bindgen_test_layout_v4l2_capability() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 92usize, concat!( "Offset of field: ", @@ -3804,6 +7169,9 @@ pub union v4l2_pix_format__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -3815,9 +7183,7 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_pix_format__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ycbcr_enc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3827,9 +7193,7 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hsv_enc as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).hsv_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3841,6 +7205,8 @@ fn bindgen_test_layout_v4l2_pix_format__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_pix_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -3852,7 +7218,7 @@ fn bindgen_test_layout_v4l2_pix_format() { concat!("Alignment of ", stringify!(v4l2_pix_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3862,7 +7228,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -3872,7 +7238,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3882,7 +7248,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -3892,7 +7258,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesperline as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -3902,7 +7268,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeimage as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -3912,7 +7278,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).colorspace as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -3922,7 +7288,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).priv_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).priv_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -3932,7 +7298,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -3942,7 +7308,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quantization as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -3952,7 +7318,7 @@ fn bindgen_test_layout_v4l2_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).xfer_func as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -3975,6 +7341,8 @@ pub struct v4l2_fmtdesc { } #[test] fn bindgen_test_layout_v4l2_fmtdesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -3986,7 +7354,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { concat!("Alignment of ", stringify!(v4l2_fmtdesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3996,7 +7364,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4006,7 +7374,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4016,7 +7384,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).description as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).description) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4026,7 +7394,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -4036,7 +7404,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbus_code as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mbus_code) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -4046,7 +7414,7 @@ fn bindgen_test_layout_v4l2_fmtdesc() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -4068,6 +7436,9 @@ pub struct v4l2_frmsize_discrete { } #[test] fn bindgen_test_layout_v4l2_frmsize_discrete() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -4079,7 +7450,7 @@ fn bindgen_test_layout_v4l2_frmsize_discrete() { concat!("Alignment of ", stringify!(v4l2_frmsize_discrete)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4089,7 +7460,7 @@ fn bindgen_test_layout_v4l2_frmsize_discrete() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4111,6 +7482,9 @@ pub struct v4l2_frmsize_stepwise { } #[test] fn bindgen_test_layout_v4l2_frmsize_stepwise() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4122,7 +7496,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { concat!("Alignment of ", stringify!(v4l2_frmsize_stepwise)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4132,7 +7506,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4142,9 +7516,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).step_width as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).step_width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4154,9 +7526,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).min_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).min_height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4166,9 +7536,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4178,9 +7546,7 @@ fn bindgen_test_layout_v4l2_frmsize_stepwise() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).step_height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).step_height) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -4207,6 +7573,9 @@ pub union v4l2_frmsizeenum__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4218,9 +7587,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_frmsizeenum__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).discrete as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).discrete) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4230,9 +7597,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stepwise as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stepwise) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4244,6 +7609,8 @@ fn bindgen_test_layout_v4l2_frmsizeenum__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_frmsizeenum() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -4255,7 +7622,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { concat!("Alignment of ", stringify!(v4l2_frmsizeenum)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4265,7 +7632,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixel_format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4275,7 +7642,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4285,7 +7652,7 @@ fn bindgen_test_layout_v4l2_frmsizeenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -4308,6 +7675,9 @@ pub struct v4l2_frmival_stepwise { } #[test] fn bindgen_test_layout_v4l2_frmival_stepwise() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4319,7 +7689,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { concat!("Alignment of ", stringify!(v4l2_frmival_stepwise)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4329,7 +7699,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4339,7 +7709,7 @@ fn bindgen_test_layout_v4l2_frmival_stepwise() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4368,6 +7738,9 @@ pub union v4l2_frmivalenum__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -4379,9 +7752,7 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_frmivalenum__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).discrete as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).discrete) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4391,9 +7762,7 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stepwise as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stepwise) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4405,6 +7774,8 @@ fn bindgen_test_layout_v4l2_frmivalenum__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_frmivalenum() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -4416,7 +7787,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { concat!("Alignment of ", stringify!(v4l2_frmivalenum)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4426,7 +7797,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixel_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixel_format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4436,7 +7807,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4446,7 +7817,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4456,7 +7827,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4466,7 +7837,7 @@ fn bindgen_test_layout_v4l2_frmivalenum() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -4489,6 +7860,8 @@ pub struct v4l2_timecode { } #[test] fn bindgen_test_layout_v4l2_timecode() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -4500,7 +7873,7 @@ fn bindgen_test_layout_v4l2_timecode() { concat!("Alignment of ", stringify!(v4l2_timecode)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4510,7 +7883,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4520,7 +7893,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frames as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frames) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4530,7 +7903,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).seconds as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).seconds) as usize - ptr as usize }, 9usize, concat!( "Offset of field: ", @@ -4540,7 +7913,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minutes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minutes) as usize - ptr as usize }, 10usize, concat!( "Offset of field: ", @@ -4550,7 +7923,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hours as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hours) as usize - ptr as usize }, 11usize, concat!( "Offset of field: ", @@ -4560,7 +7933,7 @@ fn bindgen_test_layout_v4l2_timecode() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).userbits as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).userbits) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4583,6 +7956,8 @@ pub struct v4l2_jpegcompression { } #[test] fn bindgen_test_layout_v4l2_jpegcompression() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 140usize, @@ -4594,7 +7969,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { concat!("Alignment of ", stringify!(v4l2_jpegcompression)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).quality as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).quality) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4604,7 +7979,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APPn as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APPn) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4614,7 +7989,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APP_len as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APP_len) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4624,7 +7999,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).APP_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).APP_data) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4634,7 +8009,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).COM_len as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).COM_len) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -4644,7 +8019,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).COM_data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).COM_data) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -4654,9 +8029,7 @@ fn bindgen_test_layout_v4l2_jpegcompression() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).jpeg_markers as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).jpeg_markers) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", @@ -4673,10 +8046,13 @@ pub struct v4l2_requestbuffers { pub type_: __u32, pub memory: __u32, pub capabilities: __u32, - pub reserved: [__u32; 1usize], + pub flags: __u8, + pub reserved: [__u8; 3usize], } #[test] fn bindgen_test_layout_v4l2_requestbuffers() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -4688,7 +8064,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { concat!("Alignment of ", stringify!(v4l2_requestbuffers)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4698,7 +8074,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4708,7 +8084,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4718,9 +8094,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -4730,8 +8104,18 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, + concat!( + "Offset of field: ", + stringify!(v4l2_requestbuffers), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 17usize, concat!( "Offset of field: ", stringify!(v4l2_requestbuffers), @@ -4740,24 +8124,7 @@ fn bindgen_test_layout_v4l2_requestbuffers() { ) ); } -#[doc = " struct v4l2_plane - plane info for multi-planar buffers"] -#[doc = " @bytesused:\t\tnumber of bytes occupied by data in the plane (payload)"] -#[doc = " @length:\t\tsize of this plane (NOT the payload) in bytes"] -#[doc = " @mem_offset:\t\twhen memory in the associated struct v4l2_buffer is"] -#[doc = "\t\t\tV4L2_MEMORY_MMAP, equals the offset from the start of"] -#[doc = "\t\t\tthe device memory for this plane (or is a \"cookie\" that"] -#[doc = "\t\t\tshould be passed to mmap() called on the video node)"] -#[doc = " @userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer"] -#[doc = "\t\t\tpointing to this plane"] -#[doc = " @fd:\t\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file"] -#[doc = "\t\t\tdescriptor associated with this plane"] -#[doc = " @data_offset:\toffset in the plane to the start of data; usually 0,"] -#[doc = "\t\t\tunless there is a header in front of the data"] -#[doc = ""] -#[doc = " Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer"] -#[doc = " with two planes can have one plane for Y, and another for interleaved CbCr"] -#[doc = " components. Each plane can reside in a separate memory buffer, or even in"] -#[doc = " a completely separate memory node (e.g. in embedded devices)."] +#[doc = " struct v4l2_plane - plane info for multi-planar buffers\n @bytesused:\t\tnumber of bytes occupied by data in the plane (payload)\n @length:\t\tsize of this plane (NOT the payload) in bytes\n @mem_offset:\t\twhen memory in the associated struct v4l2_buffer is\n\t\t\tV4L2_MEMORY_MMAP, equals the offset from the start of\n\t\t\tthe device memory for this plane (or is a \"cookie\" that\n\t\t\tshould be passed to mmap() called on the video node)\n @userptr:\t\twhen memory is V4L2_MEMORY_USERPTR, a userspace pointer\n\t\t\tpointing to this plane\n @fd:\t\t\twhen memory is V4L2_MEMORY_DMABUF, a userspace file\n\t\t\tdescriptor associated with this plane\n @m:\t\t\tunion of @mem_offset, @userptr and @fd\n @data_offset:\toffset in the plane to the start of data; usually 0,\n\t\t\tunless there is a header in front of the data\n @reserved:\t\tdrivers and applications must zero this array\n\n Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer\n with two planes can have one plane for Y, and another for interleaved CbCr\n components. Each plane can reside in a separate memory buffer, or even in\n a completely separate memory node (e.g. in embedded devices)."] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_plane { @@ -4776,6 +8143,9 @@ pub union v4l2_plane__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -4787,9 +8157,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_plane__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mem_offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).mem_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4799,9 +8167,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).userptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).userptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4811,7 +8177,7 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4823,6 +8189,8 @@ fn bindgen_test_layout_v4l2_plane__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_plane() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -4834,7 +8202,7 @@ fn bindgen_test_layout_v4l2_plane() { concat!("Alignment of ", stringify!(v4l2_plane)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesused as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesused) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4844,7 +8212,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4854,7 +8222,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4864,7 +8232,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data_offset) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -4874,7 +8242,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -4884,35 +8252,7 @@ fn bindgen_test_layout_v4l2_plane() { ) ); } -#[doc = " struct v4l2_buffer - video buffer info"] -#[doc = " @index:\tid number of the buffer"] -#[doc = " @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for"] -#[doc = "\t\tmultiplanar buffers);"] -#[doc = " @bytesused:\tnumber of bytes occupied by data in the buffer (payload);"] -#[doc = "\t\tunused (set to 0) for multiplanar buffers"] -#[doc = " @flags:\tbuffer informational flags"] -#[doc = " @field:\tenum v4l2_field; field order of the image in the buffer"] -#[doc = " @timestamp:\tframe timestamp"] -#[doc = " @timecode:\tframe timecode"] -#[doc = " @sequence:\tsequence count of this frame"] -#[doc = " @memory:\tenum v4l2_memory; the method, in which the actual video data is"] -#[doc = "\t\tpassed"] -#[doc = " @offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;"] -#[doc = "\t\toffset from the start of the device memory for this plane,"] -#[doc = "\t\t(or a \"cookie\" that should be passed to mmap() as offset)"] -#[doc = " @userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;"] -#[doc = "\t\ta userspace pointer pointing to this buffer"] -#[doc = " @fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;"] -#[doc = "\t\ta userspace file descriptor associated with this buffer"] -#[doc = " @planes:\tfor multiplanar buffers; userspace pointer to the array of plane"] -#[doc = "\t\tinfo structs for this buffer"] -#[doc = " @length:\tsize in bytes of the buffer (NOT its payload) for single-plane"] -#[doc = "\t\tbuffers (when type != *_MPLANE); number of elements in the"] -#[doc = "\t\tplanes array for multi-plane buffers"] -#[doc = " @request_fd: fd of the request that this buffer should use"] -#[doc = ""] -#[doc = " Contains data exchanged by application and driver using one of the Streaming"] -#[doc = " I/O methods."] +#[doc = " struct v4l2_buffer - video buffer info\n @index:\tid number of the buffer\n @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for\n\t\tmultiplanar buffers);\n @bytesused:\tnumber of bytes occupied by data in the buffer (payload);\n\t\tunused (set to 0) for multiplanar buffers\n @flags:\tbuffer informational flags\n @field:\tenum v4l2_field; field order of the image in the buffer\n @timestamp:\tframe timestamp\n @timecode:\tframe timecode\n @sequence:\tsequence count of this frame\n @memory:\tenum v4l2_memory; the method, in which the actual video data is\n\t\tpassed\n @offset:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;\n\t\toffset from the start of the device memory for this plane,\n\t\t(or a \"cookie\" that should be passed to mmap() as offset)\n @userptr:\tfor non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;\n\t\ta userspace pointer pointing to this buffer\n @fd:\t\tfor non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;\n\t\ta userspace file descriptor associated with this buffer\n @planes:\tfor multiplanar buffers; userspace pointer to the array of plane\n\t\tinfo structs for this buffer\n @m:\t\tunion of @offset, @userptr, @planes and @fd\n @length:\tsize in bytes of the buffer (NOT its payload) for single-plane\n\t\tbuffers (when type != *_MPLANE); number of elements in the\n\t\tplanes array for multi-plane buffers\n @reserved2:\tdrivers and applications must zero this field\n @request_fd: fd of the request that this buffer should use\n @reserved:\tfor backwards compatibility with applications that do not know\n\t\tabout @request_fd\n\n Contains data exchanged by application and driver using one of the Streaming\n I/O methods."] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_buffer { @@ -4940,6 +8280,9 @@ pub union v4l2_buffer__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -4951,9 +8294,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_buffer__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4963,9 +8304,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).userptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).userptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4975,9 +8314,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).planes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).planes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4987,7 +8324,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5005,6 +8342,9 @@ pub union v4l2_buffer__bindgen_ty_2 { } #[test] fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -5016,9 +8356,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { concat!("Alignment of ", stringify!(v4l2_buffer__bindgen_ty_2)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).request_fd as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).request_fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5028,9 +8366,7 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5042,6 +8378,8 @@ fn bindgen_test_layout_v4l2_buffer__bindgen_ty_2() { } #[test] fn bindgen_test_layout_v4l2_buffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, @@ -5053,7 +8391,7 @@ fn bindgen_test_layout_v4l2_buffer() { concat!("Alignment of ", stringify!(v4l2_buffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5063,7 +8401,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5073,7 +8411,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesused as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesused) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5083,7 +8421,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5093,7 +8431,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5103,7 +8441,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timestamp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5113,7 +8451,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timecode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timecode) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -5123,7 +8461,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sequence as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -5133,7 +8471,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -5143,7 +8481,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -5153,7 +8491,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -5163,7 +8501,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -5173,22 +8511,7 @@ fn bindgen_test_layout_v4l2_buffer() { ) ); } -#[doc = " struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor"] -#[doc = ""] -#[doc = " @index:\tid number of the buffer"] -#[doc = " @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for"] -#[doc = "\t\tmultiplanar buffers);"] -#[doc = " @plane:\tindex of the plane to be exported, 0 for single plane queues"] -#[doc = " @flags:\tflags for newly created file, currently only O_CLOEXEC is"] -#[doc = "\t\tsupported, refer to manual of open syscall for more details"] -#[doc = " @fd:\t\tfile descriptor associated with DMABUF (set by driver)"] -#[doc = ""] -#[doc = " Contains data used for exporting a video buffer as DMABUF file descriptor."] -#[doc = " The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF"] -#[doc = " (identical to the cookie used to mmap() the buffer to userspace). All"] -#[doc = " reserved fields must be set to zero. The field reserved0 is expected to"] -#[doc = " become a structure 'type' allowing an alternative layout of the structure"] -#[doc = " content. Therefore this field should not be used for any other extensions."] +#[doc = " struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor\n\n @index:\tid number of the buffer\n @type:\tenum v4l2_buf_type; buffer type (type == *_MPLANE for\n\t\tmultiplanar buffers);\n @plane:\tindex of the plane to be exported, 0 for single plane queues\n @flags:\tflags for newly created file, currently only O_CLOEXEC is\n\t\tsupported, refer to manual of open syscall for more details\n @fd:\t\tfile descriptor associated with DMABUF (set by driver)\n @reserved:\tdrivers and applications must zero this array\n\n Contains data used for exporting a video buffer as DMABUF file descriptor.\n The buffer is identified by a 'cookie' returned by VIDIOC_QUERYBUF\n (identical to the cookie used to mmap() the buffer to userspace). All\n reserved fields must be set to zero. The field reserved0 is expected to\n become a structure 'type' allowing an alternative layout of the structure\n content. Therefore this field should not be used for any other extensions."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_exportbuffer { @@ -5201,6 +8524,8 @@ pub struct v4l2_exportbuffer { } #[test] fn bindgen_test_layout_v4l2_exportbuffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -5212,7 +8537,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { concat!("Alignment of ", stringify!(v4l2_exportbuffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5222,7 +8547,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5232,7 +8557,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).plane as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).plane) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5242,7 +8567,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5252,7 +8577,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5262,7 +8587,7 @@ fn bindgen_test_layout_v4l2_exportbuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5294,6 +8619,9 @@ pub struct v4l2_framebuffer__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -5305,9 +8633,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_framebuffer__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5317,9 +8643,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5329,10 +8653,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pixelformat as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5342,9 +8663,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).field as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5354,10 +8673,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bytesperline as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5367,10 +8683,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeimage as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5380,10 +8693,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5393,9 +8703,7 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).priv_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).priv_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5407,6 +8715,8 @@ fn bindgen_test_layout_v4l2_framebuffer__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_framebuffer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -5418,7 +8728,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { concat!("Alignment of ", stringify!(v4l2_framebuffer)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5428,7 +8738,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5438,7 +8748,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5448,7 +8758,7 @@ fn bindgen_test_layout_v4l2_framebuffer() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5466,6 +8776,8 @@ pub struct v4l2_clip { } #[test] fn bindgen_test_layout_v4l2_clip() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -5477,7 +8789,7 @@ fn bindgen_test_layout_v4l2_clip() { concat!("Alignment of ", stringify!(v4l2_clip)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).c as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5487,7 +8799,7 @@ fn bindgen_test_layout_v4l2_clip() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5510,6 +8822,8 @@ pub struct v4l2_window { } #[test] fn bindgen_test_layout_v4l2_window() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -5521,7 +8835,7 @@ fn bindgen_test_layout_v4l2_window() { concat!("Alignment of ", stringify!(v4l2_window)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5531,7 +8845,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5541,7 +8855,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).chromakey as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).chromakey) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5551,7 +8865,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clips as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clips) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5561,7 +8875,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clipcount as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).clipcount) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -5571,7 +8885,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bitmap as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bitmap) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -5581,7 +8895,7 @@ fn bindgen_test_layout_v4l2_window() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).global_alpha as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).global_alpha) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -5603,6 +8917,8 @@ pub struct v4l2_captureparm { } #[test] fn bindgen_test_layout_v4l2_captureparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -5614,7 +8930,7 @@ fn bindgen_test_layout_v4l2_captureparm() { concat!("Alignment of ", stringify!(v4l2_captureparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5624,7 +8940,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capturemode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capturemode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5634,7 +8950,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timeperframe as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timeperframe) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5644,7 +8960,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).extendedmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extendedmode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5654,7 +8970,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).readbuffers as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).readbuffers) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5664,7 +8980,7 @@ fn bindgen_test_layout_v4l2_captureparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5686,6 +9002,8 @@ pub struct v4l2_outputparm { } #[test] fn bindgen_test_layout_v4l2_outputparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -5697,7 +9015,7 @@ fn bindgen_test_layout_v4l2_outputparm() { concat!("Alignment of ", stringify!(v4l2_outputparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5707,7 +9025,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).outputmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).outputmode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5717,7 +9035,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timeperframe as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timeperframe) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5727,7 +9045,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).extendedmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).extendedmode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5737,7 +9055,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).writebuffers as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).writebuffers) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5747,7 +9065,7 @@ fn bindgen_test_layout_v4l2_outputparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -5767,6 +9085,8 @@ pub struct v4l2_cropcap { } #[test] fn bindgen_test_layout_v4l2_cropcap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -5778,7 +9098,7 @@ fn bindgen_test_layout_v4l2_cropcap() { concat!("Alignment of ", stringify!(v4l2_cropcap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5788,7 +9108,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).bounds as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).bounds) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5798,7 +9118,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).defrect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).defrect) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -5808,7 +9128,7 @@ fn bindgen_test_layout_v4l2_cropcap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelaspect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelaspect) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -5826,6 +9146,8 @@ pub struct v4l2_crop { } #[test] fn bindgen_test_layout_v4l2_crop() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -5837,7 +9159,7 @@ fn bindgen_test_layout_v4l2_crop() { concat!("Alignment of ", stringify!(v4l2_crop)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5847,7 +9169,7 @@ fn bindgen_test_layout_v4l2_crop() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).c as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5857,17 +9179,7 @@ fn bindgen_test_layout_v4l2_crop() { ) ); } -#[doc = " struct v4l2_selection - selection info"] -#[doc = " @type:\tbuffer type (do not use *_MPLANE types)"] -#[doc = " @target:\tSelection target, used to choose one of possible rectangles;"] -#[doc = "\t\tdefined in v4l2-common.h; V4L2_SEL_TGT_* ."] -#[doc = " @flags:\tconstraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*."] -#[doc = " @r:\t\tcoordinates of selection window"] -#[doc = " @reserved:\tfor future use, rounds structure size to 64 bytes, set to zero"] -#[doc = ""] -#[doc = " Hardware may use multiple helper windows to process a video stream."] -#[doc = " The structure is used to exchange this selection areas between"] -#[doc = " an application and a driver."] +#[doc = " struct v4l2_selection - selection info\n @type:\tbuffer type (do not use *_MPLANE types)\n @target:\tSelection target, used to choose one of possible rectangles;\n\t\tdefined in v4l2-common.h; V4L2_SEL_TGT_* .\n @flags:\tconstraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.\n @r:\t\tcoordinates of selection window\n @reserved:\tfor future use, rounds structure size to 64 bytes, set to zero\n\n Hardware may use multiple helper windows to process a video stream.\n The structure is used to exchange this selection areas between\n an application and a driver."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_selection { @@ -5879,6 +9191,8 @@ pub struct v4l2_selection { } #[test] fn bindgen_test_layout_v4l2_selection() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -5890,7 +9204,7 @@ fn bindgen_test_layout_v4l2_selection() { concat!("Alignment of ", stringify!(v4l2_selection)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5900,7 +9214,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -5910,7 +9224,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5920,7 +9234,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).r as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -5930,7 +9244,7 @@ fn bindgen_test_layout_v4l2_selection() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -5953,6 +9267,8 @@ pub struct v4l2_standard { } #[test] fn bindgen_test_layout_v4l2_standard() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -5964,7 +9280,7 @@ fn bindgen_test_layout_v4l2_standard() { concat!("Alignment of ", stringify!(v4l2_standard)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -5974,7 +9290,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -5984,7 +9300,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -5994,7 +9310,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frameperiod as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frameperiod) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6004,7 +9320,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).framelines as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).framelines) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6014,7 +9330,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -6024,40 +9340,7 @@ fn bindgen_test_layout_v4l2_standard() { ) ); } -#[doc = " struct v4l2_bt_timings - BT.656/BT.1120 timing data"] -#[doc = " @width:\ttotal width of the active video in pixels"] -#[doc = " @height:\ttotal height of the active video in lines"] -#[doc = " @interlaced:\tInterlaced or progressive"] -#[doc = " @polarities:\tPositive or negative polarities"] -#[doc = " @pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @hfrontporch:Horizontal front porch in pixels"] -#[doc = " @hsync:\tHorizontal Sync length in pixels"] -#[doc = " @hbackporch:\tHorizontal back porch in pixels"] -#[doc = " @vfrontporch:Vertical front porch in lines"] -#[doc = " @vsync:\tVertical Sync length in lines"] -#[doc = " @vbackporch:\tVertical back porch in lines"] -#[doc = " @il_vfrontporch:Vertical front porch for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @il_vsync:\tVertical Sync length for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @il_vbackporch:Vertical back porch for the even field"] -#[doc = "\t\t(aka field 2) of interlaced field formats"] -#[doc = " @standards:\tStandards the timing belongs to"] -#[doc = " @flags:\tFlags"] -#[doc = " @picture_aspect: The picture aspect ratio (hor/vert)."] -#[doc = " @cea861_vic:\tVIC code as per the CEA-861 standard."] -#[doc = " @hdmi_vic:\tVIC code as per the HDMI standard."] -#[doc = " @reserved:\tReserved fields, must be zeroed."] -#[doc = ""] -#[doc = " A note regarding vertical interlaced timings: height refers to the total"] -#[doc = " height of the active video frame (= two fields). The blanking timings refer"] -#[doc = " to the blanking of each field. So the height of the total frame is"] -#[doc = " calculated as follows:"] -#[doc = ""] -#[doc = " tot_height = height + vfrontporch + vsync + vbackporch +"] -#[doc = " il_vfrontporch + il_vsync + il_vbackporch"] -#[doc = ""] -#[doc = " The active height of each field is height / 2."] +#[doc = " struct v4l2_bt_timings - BT.656/BT.1120 timing data\n @width:\ttotal width of the active video in pixels\n @height:\ttotal height of the active video in lines\n @interlaced:\tInterlaced or progressive\n @polarities:\tPositive or negative polarities\n @pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @hfrontporch:Horizontal front porch in pixels\n @hsync:\tHorizontal Sync length in pixels\n @hbackporch:\tHorizontal back porch in pixels\n @vfrontporch:Vertical front porch in lines\n @vsync:\tVertical Sync length in lines\n @vbackporch:\tVertical back porch in lines\n @il_vfrontporch:Vertical front porch for the even field\n\t\t(aka field 2) of interlaced field formats\n @il_vsync:\tVertical Sync length for the even field\n\t\t(aka field 2) of interlaced field formats\n @il_vbackporch:Vertical back porch for the even field\n\t\t(aka field 2) of interlaced field formats\n @standards:\tStandards the timing belongs to\n @flags:\tFlags\n @picture_aspect: The picture aspect ratio (hor/vert).\n @cea861_vic:\tVIC code as per the CEA-861 standard.\n @hdmi_vic:\tVIC code as per the HDMI standard.\n @reserved:\tReserved fields, must be zeroed.\n\n A note regarding vertical interlaced timings: height refers to the total\n height of the active video frame (= two fields). The blanking timings refer\n to the blanking of each field. So the height of the total frame is\n calculated as follows:\n\n tot_height = height + vfrontporch + vsync + vbackporch +\n il_vfrontporch + il_vsync + il_vbackporch\n\n The active height of each field is height / 2."] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_bt_timings { @@ -6084,6 +9367,8 @@ pub struct v4l2_bt_timings { } #[test] fn bindgen_test_layout_v4l2_bt_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 124usize, @@ -6095,7 +9380,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { concat!("Alignment of ", stringify!(v4l2_bt_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6105,7 +9390,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6115,7 +9400,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).interlaced as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).interlaced) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6125,7 +9410,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).polarities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).polarities) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6135,7 +9420,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelclock as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelclock) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6145,7 +9430,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hfrontporch) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -6155,7 +9440,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hsync) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -6165,7 +9450,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hbackporch) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -6175,7 +9460,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vfrontporch) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6185,7 +9470,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vsync) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6195,7 +9480,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vbackporch) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6205,7 +9490,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vfrontporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vfrontporch) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6215,7 +9500,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vsync) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -6225,7 +9510,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).il_vbackporch as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).il_vbackporch) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6235,7 +9520,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).standards as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).standards) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6245,7 +9530,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -6255,7 +9540,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).picture_aspect as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).picture_aspect) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -6265,7 +9550,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cea861_vic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cea861_vic) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -6275,7 +9560,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).hdmi_vic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hdmi_vic) as usize - ptr as usize }, 77usize, concat!( "Offset of field: ", @@ -6285,7 +9570,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 78usize, concat!( "Offset of field: ", @@ -6295,9 +9580,7 @@ fn bindgen_test_layout_v4l2_bt_timings() { ) ); } -#[doc = " struct v4l2_dv_timings - DV timings"] -#[doc = " @type:\tthe type of the timings"] -#[doc = " @bt:\tBT656/1120 timings"] +#[doc = " struct v4l2_dv_timings - DV timings\n @type:\tthe type of the timings\n @bt:\tBT656/1120 timings"] #[repr(C, packed)] #[derive(Copy, Clone)] pub struct v4l2_dv_timings { @@ -6312,6 +9595,9 @@ pub union v4l2_dv_timings__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -6323,9 +9609,7 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_dv_timings__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bt) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6335,9 +9619,7 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6349,6 +9631,8 @@ fn bindgen_test_layout_v4l2_dv_timings__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dv_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 132usize, @@ -6360,7 +9644,7 @@ fn bindgen_test_layout_v4l2_dv_timings() { concat!("Alignment of ", stringify!(v4l2_dv_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6370,12 +9654,7 @@ fn bindgen_test_layout_v4l2_dv_timings() { ) ); } -#[doc = " struct v4l2_enum_dv_timings - DV timings enumeration"] -#[doc = " @index:\tenumeration index"] -#[doc = " @pad:\tthe pad number for which to enumerate timings (used with"] -#[doc = "\t\tv4l-subdev nodes only)"] -#[doc = " @reserved:\tmust be zeroed"] -#[doc = " @timings:\tthe timings for the given index"] +#[doc = " struct v4l2_enum_dv_timings - DV timings enumeration\n @index:\tenumeration index\n @pad:\tthe pad number for which to enumerate timings (used with\n\t\tv4l-subdev nodes only)\n @reserved:\tmust be zeroed\n @timings:\tthe timings for the given index"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_enum_dv_timings { @@ -6386,6 +9665,8 @@ pub struct v4l2_enum_dv_timings { } #[test] fn bindgen_test_layout_v4l2_enum_dv_timings() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 148usize, @@ -6397,7 +9678,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { concat!("Alignment of ", stringify!(v4l2_enum_dv_timings)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6407,7 +9688,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6417,7 +9698,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6427,7 +9708,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timings as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timings) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6437,16 +9718,7 @@ fn bindgen_test_layout_v4l2_enum_dv_timings() { ) ); } -#[doc = " struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities"] -#[doc = " @min_width:\t\twidth in pixels"] -#[doc = " @max_width:\t\twidth in pixels"] -#[doc = " @min_height:\t\theight in lines"] -#[doc = " @max_height:\t\theight in lines"] -#[doc = " @min_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @max_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000"] -#[doc = " @standards:\t\tSupported standards"] -#[doc = " @capabilities:\tSupported capabilities"] -#[doc = " @reserved:\t\tMust be zeroed"] +#[doc = " struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities\n @min_width:\t\twidth in pixels\n @max_width:\t\twidth in pixels\n @min_height:\t\theight in lines\n @max_height:\t\theight in lines\n @min_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @max_pixelclock:\tPixel clock in HZ. Ex. 74.25MHz->74250000\n @standards:\t\tSupported standards\n @capabilities:\tSupported capabilities\n @reserved:\t\tMust be zeroed"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_bt_timings_cap { @@ -6462,6 +9734,8 @@ pub struct v4l2_bt_timings_cap { } #[test] fn bindgen_test_layout_v4l2_bt_timings_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 104usize, @@ -6473,7 +9747,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { concat!("Alignment of ", stringify!(v4l2_bt_timings_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6483,7 +9757,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6493,7 +9767,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).min_height) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6503,7 +9777,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).max_height) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -6513,9 +9787,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).min_pixelclock as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).min_pixelclock) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -6525,9 +9797,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).max_pixelclock as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).max_pixelclock) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -6537,7 +9807,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).standards as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).standards) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -6547,9 +9817,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6559,7 +9827,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6569,11 +9837,7 @@ fn bindgen_test_layout_v4l2_bt_timings_cap() { ) ); } -#[doc = " struct v4l2_dv_timings_cap - DV timings capabilities"] -#[doc = " @type:\tthe type of the timings (same as in struct v4l2_dv_timings)"] -#[doc = " @pad:\tthe pad number for which to query capabilities (used with"] -#[doc = "\t\tv4l-subdev nodes only)"] -#[doc = " @bt:\t\tthe BT656/1120 timings capabilities"] +#[doc = " struct v4l2_dv_timings_cap - DV timings capabilities\n @type:\tthe type of the timings (same as in struct v4l2_dv_timings)\n @pad:\tthe pad number for which to query capabilities (used with\n\t\tv4l-subdev nodes only)\n @bt:\t\tthe BT656/1120 timings capabilities"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_dv_timings_cap { @@ -6590,6 +9854,9 @@ pub union v4l2_dv_timings_cap__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, @@ -6604,9 +9871,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bt) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6616,10 +9881,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6631,6 +9893,8 @@ fn bindgen_test_layout_v4l2_dv_timings_cap__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dv_timings_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, @@ -6642,7 +9906,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { concat!("Alignment of ", stringify!(v4l2_dv_timings_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6652,7 +9916,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6662,7 +9926,7 @@ fn bindgen_test_layout_v4l2_dv_timings_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -6687,6 +9951,8 @@ pub struct v4l2_input { } #[test] fn bindgen_test_layout_v4l2_input() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 80usize, @@ -6698,7 +9964,7 @@ fn bindgen_test_layout_v4l2_input() { concat!("Alignment of ", stringify!(v4l2_input)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6708,7 +9974,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6718,7 +9984,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6728,7 +9994,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audioset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audioset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6738,7 +10004,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6748,7 +10014,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).std as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).std) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6758,7 +10024,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6768,7 +10034,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6778,7 +10044,7 @@ fn bindgen_test_layout_v4l2_input() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -6802,6 +10068,8 @@ pub struct v4l2_output { } #[test] fn bindgen_test_layout_v4l2_output() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -6813,7 +10081,7 @@ fn bindgen_test_layout_v4l2_output() { concat!("Alignment of ", stringify!(v4l2_output)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6823,7 +10091,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6833,7 +10101,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -6843,7 +10111,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audioset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audioset) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -6853,7 +10121,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).modulator as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).modulator) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -6863,7 +10131,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).std as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).std) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -6873,7 +10141,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capabilities as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -6883,7 +10151,7 @@ fn bindgen_test_layout_v4l2_output() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -6901,6 +10169,8 @@ pub struct v4l2_control { } #[test] fn bindgen_test_layout_v4l2_control() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -6912,7 +10182,7 @@ fn bindgen_test_layout_v4l2_control() { concat!("Alignment of ", stringify!(v4l2_control)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6922,7 +10192,7 @@ fn bindgen_test_layout_v4l2_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -6957,10 +10227,24 @@ pub union v4l2_ext_control__bindgen_ty_1 { pub p_h264_slice_params: *mut v4l2_ctrl_h264_slice_params, pub p_h264_decode_params: *mut v4l2_ctrl_h264_decode_params, pub p_fwht_params: *mut v4l2_ctrl_fwht_params, + pub p_vp8_frame: *mut v4l2_ctrl_vp8_frame, + pub p_mpeg2_sequence: *mut v4l2_ctrl_mpeg2_sequence, + pub p_mpeg2_picture: *mut v4l2_ctrl_mpeg2_picture, + pub p_mpeg2_quantisation: *mut v4l2_ctrl_mpeg2_quantisation, + pub p_vp9_compressed_hdr_probs: *mut v4l2_ctrl_vp9_compressed_hdr, + pub p_vp9_frame: *mut v4l2_ctrl_vp9_frame, + pub p_hevc_sps: *mut v4l2_ctrl_hevc_sps, + pub p_hevc_pps: *mut v4l2_ctrl_hevc_pps, + pub p_hevc_slice_params: *mut v4l2_ctrl_hevc_slice_params, + pub p_hevc_scaling_matrix: *mut v4l2_ctrl_hevc_scaling_matrix, + pub p_hevc_decode_params: *mut v4l2_ctrl_hevc_decode_params, pub ptr: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -6972,9 +10256,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_ext_control__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6984,9 +10266,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value64 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -6996,9 +10276,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).string as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).string) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7008,9 +10286,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u8 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7020,9 +10296,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u16 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u16) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7032,9 +10306,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_u32 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_u32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7044,9 +10316,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_area as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_area) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7056,10 +10326,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_sps as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_sps) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7069,10 +10336,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_pps as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_pps) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7082,10 +10346,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_scaling_matrix - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_scaling_matrix) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7095,10 +10356,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_pred_weights - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_pred_weights) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7108,10 +10366,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_slice_params - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_slice_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7121,10 +10376,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_h264_decode_params - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_h264_decode_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7134,10 +10386,7 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).p_fwht_params as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_fwht_params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7147,9 +10396,117 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ptr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).p_vp8_frame) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp8_frame) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_sequence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_sequence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_picture) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_picture) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_mpeg2_quantisation) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_mpeg2_quantisation) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_vp9_compressed_hdr_probs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp9_compressed_hdr_probs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_vp9_frame) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_vp9_frame) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_sps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_sps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_pps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_pps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_slice_params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_slice_params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_scaling_matrix) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_scaling_matrix) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).p_hevc_decode_params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(v4l2_ext_control__bindgen_ty_1), + "::", + stringify!(p_hevc_decode_params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7161,6 +10518,8 @@ fn bindgen_test_layout_v4l2_ext_control__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_ext_control() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -7172,7 +10531,7 @@ fn bindgen_test_layout_v4l2_ext_control() { concat!("Alignment of ", stringify!(v4l2_ext_control)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7182,7 +10541,7 @@ fn bindgen_test_layout_v4l2_ext_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7192,7 +10551,7 @@ fn bindgen_test_layout_v4l2_ext_control() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7220,6 +10579,9 @@ pub union v4l2_ext_controls__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -7231,10 +10593,7 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_ext_controls__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ctrl_class as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ctrl_class) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7244,9 +10603,7 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).which as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).which) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7258,6 +10615,8 @@ fn bindgen_test_layout_v4l2_ext_controls__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_ext_controls() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -7269,7 +10628,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { concat!("Alignment of ", stringify!(v4l2_ext_controls)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7279,7 +10638,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).error_idx as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).error_idx) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7289,7 +10648,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).request_fd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).request_fd) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -7299,7 +10658,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -7309,7 +10668,7 @@ fn bindgen_test_layout_v4l2_ext_controls() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).controls as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).controls) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -7333,6 +10692,8 @@ pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U8: v4l2_ctrl_type = 256; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U16: v4l2_ctrl_type = 257; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_U32: v4l2_ctrl_type = 258; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_AREA: v4l2_ctrl_type = 262; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HDR10_CLL_INFO: v4l2_ctrl_type = 272; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY: v4l2_ctrl_type = 273; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SPS: v4l2_ctrl_type = 512; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_PPS: v4l2_ctrl_type = 513; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SCALING_MATRIX: v4l2_ctrl_type = 514; @@ -7340,6 +10701,17 @@ pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_SLICE_PARAMS: v4l2_ctrl_type = 515; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_DECODE_PARAMS: v4l2_ctrl_type = 516; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_H264_PRED_WEIGHTS: v4l2_ctrl_type = 517; pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_FWHT_PARAMS: v4l2_ctrl_type = 544; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP8_FRAME: v4l2_ctrl_type = 576; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_QUANTISATION: v4l2_ctrl_type = 592; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_SEQUENCE: v4l2_ctrl_type = 593; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_MPEG2_PICTURE: v4l2_ctrl_type = 594; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR: v4l2_ctrl_type = 608; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_VP9_FRAME: v4l2_ctrl_type = 609; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SPS: v4l2_ctrl_type = 624; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_PPS: v4l2_ctrl_type = 625; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS: v4l2_ctrl_type = 626; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX: v4l2_ctrl_type = 627; +pub const v4l2_ctrl_type_V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS: v4l2_ctrl_type = 628; pub type v4l2_ctrl_type = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7356,6 +10728,8 @@ pub struct v4l2_queryctrl { } #[test] fn bindgen_test_layout_v4l2_queryctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -7367,7 +10741,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { concat!("Alignment of ", stringify!(v4l2_queryctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7377,7 +10751,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7387,7 +10761,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7397,7 +10771,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7407,7 +10781,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7417,7 +10791,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7427,7 +10801,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7437,7 +10811,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7447,7 +10821,7 @@ fn bindgen_test_layout_v4l2_queryctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -7476,6 +10850,8 @@ pub struct v4l2_query_ext_ctrl { } #[test] fn bindgen_test_layout_v4l2_query_ext_ctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 232usize, @@ -7487,7 +10863,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { concat!("Alignment of ", stringify!(v4l2_query_ext_ctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7497,7 +10873,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7507,7 +10883,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -7517,7 +10893,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7527,7 +10903,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7537,7 +10913,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7547,9 +10923,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).default_value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -7559,7 +10933,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -7569,7 +10943,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).elem_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).elem_size) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -7579,7 +10953,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).elems as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).elems) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -7589,7 +10963,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).nr_of_dims as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).nr_of_dims) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", @@ -7599,7 +10973,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dims as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).dims) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", @@ -7609,7 +10983,7 @@ fn bindgen_test_layout_v4l2_query_ext_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -7635,6 +11009,9 @@ pub union v4l2_querymenu__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -7646,9 +11023,7 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_querymenu__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7658,9 +11033,7 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7672,6 +11045,8 @@ fn bindgen_test_layout_v4l2_querymenu__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_querymenu() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -7683,7 +11058,7 @@ fn bindgen_test_layout_v4l2_querymenu() { concat!("Alignment of ", stringify!(v4l2_querymenu)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7693,7 +11068,7 @@ fn bindgen_test_layout_v4l2_querymenu() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7703,7 +11078,7 @@ fn bindgen_test_layout_v4l2_querymenu() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7730,6 +11105,8 @@ pub struct v4l2_tuner { } #[test] fn bindgen_test_layout_v4l2_tuner() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 84usize, @@ -7741,7 +11118,7 @@ fn bindgen_test_layout_v4l2_tuner() { concat!("Alignment of ", stringify!(v4l2_tuner)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7751,7 +11128,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7761,7 +11138,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -7771,7 +11148,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7781,7 +11158,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7791,7 +11168,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7801,7 +11178,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rxsubchans as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rxsubchans) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7811,7 +11188,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).audmode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).audmode) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7821,7 +11198,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).signal as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).signal) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -7831,7 +11208,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).afc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).afc) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -7841,7 +11218,7 @@ fn bindgen_test_layout_v4l2_tuner() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -7865,6 +11242,8 @@ pub struct v4l2_modulator { } #[test] fn bindgen_test_layout_v4l2_modulator() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 68usize, @@ -7876,7 +11255,7 @@ fn bindgen_test_layout_v4l2_modulator() { concat!("Alignment of ", stringify!(v4l2_modulator)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7886,7 +11265,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7896,7 +11275,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -7906,7 +11285,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -7916,7 +11295,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -7926,7 +11305,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).txsubchans as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).txsubchans) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -7936,7 +11315,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", @@ -7946,7 +11325,7 @@ fn bindgen_test_layout_v4l2_modulator() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -7966,6 +11345,8 @@ pub struct v4l2_frequency { } #[test] fn bindgen_test_layout_v4l2_frequency() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -7977,7 +11358,7 @@ fn bindgen_test_layout_v4l2_frequency() { concat!("Alignment of ", stringify!(v4l2_frequency)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -7987,7 +11368,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -7997,7 +11378,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).frequency as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).frequency) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8007,7 +11388,7 @@ fn bindgen_test_layout_v4l2_frequency() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8031,6 +11412,8 @@ pub struct v4l2_frequency_band { } #[test] fn bindgen_test_layout_v4l2_frequency_band() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8042,7 +11425,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { concat!("Alignment of ", stringify!(v4l2_frequency_band)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8052,7 +11435,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8062,7 +11445,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8072,7 +11455,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8082,7 +11465,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8092,7 +11475,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8102,7 +11485,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).modulation as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).modulation) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8112,7 +11495,7 @@ fn bindgen_test_layout_v4l2_frequency_band() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -8136,6 +11519,8 @@ pub struct v4l2_hw_freq_seek { } #[test] fn bindgen_test_layout_v4l2_hw_freq_seek() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -8147,7 +11532,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { concat!("Alignment of ", stringify!(v4l2_hw_freq_seek)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).tuner as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).tuner) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8157,7 +11542,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8167,7 +11552,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek_upward as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).seek_upward) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8177,7 +11562,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).wrap_around as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).wrap_around) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8187,7 +11572,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).spacing as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).spacing) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8197,7 +11582,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangelow as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangelow) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8207,7 +11592,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).rangehigh as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).rangehigh) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8217,7 +11602,7 @@ fn bindgen_test_layout_v4l2_hw_freq_seek() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -8236,6 +11621,8 @@ pub struct v4l2_rds_data { } #[test] fn bindgen_test_layout_v4l2_rds_data() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 3usize, @@ -8247,7 +11634,7 @@ fn bindgen_test_layout_v4l2_rds_data() { concat!("Alignment of ", stringify!(v4l2_rds_data)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).lsb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).lsb) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8257,7 +11644,7 @@ fn bindgen_test_layout_v4l2_rds_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).msb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).msb) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -8267,7 +11654,7 @@ fn bindgen_test_layout_v4l2_rds_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).block as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).block) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -8288,6 +11675,8 @@ pub struct v4l2_audio { } #[test] fn bindgen_test_layout_v4l2_audio() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -8299,7 +11688,7 @@ fn bindgen_test_layout_v4l2_audio() { concat!("Alignment of ", stringify!(v4l2_audio)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8309,7 +11698,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8319,7 +11708,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8329,7 +11718,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -8339,7 +11728,7 @@ fn bindgen_test_layout_v4l2_audio() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -8360,6 +11749,8 @@ pub struct v4l2_audioout { } #[test] fn bindgen_test_layout_v4l2_audioout() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 52usize, @@ -8371,7 +11762,7 @@ fn bindgen_test_layout_v4l2_audioout() { concat!("Alignment of ", stringify!(v4l2_audioout)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8381,7 +11772,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8391,7 +11782,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).capability as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).capability) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8401,7 +11792,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -8411,7 +11802,7 @@ fn bindgen_test_layout_v4l2_audioout() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", @@ -8432,6 +11823,8 @@ pub struct v4l2_enc_idx_entry { } #[test] fn bindgen_test_layout_v4l2_enc_idx_entry() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8443,7 +11836,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { concat!("Alignment of ", stringify!(v4l2_enc_idx_entry)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8453,7 +11846,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pts as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8463,7 +11856,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8473,7 +11866,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -8483,7 +11876,7 @@ fn bindgen_test_layout_v4l2_enc_idx_entry() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8503,6 +11896,8 @@ pub struct v4l2_enc_idx { } #[test] fn bindgen_test_layout_v4l2_enc_idx() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2072usize, @@ -8514,7 +11909,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { concat!("Alignment of ", stringify!(v4l2_enc_idx)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entries as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8524,7 +11919,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entries_cap as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entries_cap) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8534,7 +11929,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8544,7 +11939,7 @@ fn bindgen_test_layout_v4l2_enc_idx() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).entry as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8573,6 +11968,9 @@ pub struct v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8590,10 +11988,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).data - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8605,6 +12000,9 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -8616,9 +12014,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_encoder_cmd__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8630,6 +12026,8 @@ fn bindgen_test_layout_v4l2_encoder_cmd__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_encoder_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -8641,7 +12039,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd() { concat!("Alignment of ", stringify!(v4l2_encoder_cmd)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cmd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8651,7 +12049,7 @@ fn bindgen_test_layout_v4l2_encoder_cmd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8682,6 +12080,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8699,10 +12100,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pts as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pts) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8720,6 +12118,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -8737,10 +12138,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).speed - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).speed) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8750,10 +12148,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_2() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).format - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8770,6 +12165,9 @@ pub struct v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3 { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8787,10 +12185,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).data - as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8802,6 +12197,9 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1__bindgen_ty_3() { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -8813,9 +12211,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_decoder_cmd__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).stop as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).stop) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8825,9 +12221,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).start as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8837,9 +12231,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8851,6 +12243,8 @@ fn bindgen_test_layout_v4l2_decoder_cmd__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_decoder_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 72usize, @@ -8862,7 +12256,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd() { concat!("Alignment of ", stringify!(v4l2_decoder_cmd)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).cmd as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8872,7 +12266,7 @@ fn bindgen_test_layout_v4l2_decoder_cmd() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8896,6 +12290,8 @@ pub struct v4l2_vbi_format { } #[test] fn bindgen_test_layout_v4l2_vbi_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 44usize, @@ -8907,7 +12303,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { concat!("Alignment of ", stringify!(v4l2_vbi_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sampling_rate as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sampling_rate) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -8917,7 +12313,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -8927,9 +12323,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).samples_per_line as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).samples_per_line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -8939,7 +12333,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sample_format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sample_format) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -8949,7 +12343,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -8959,7 +12353,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -8969,7 +12363,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -8979,7 +12373,7 @@ fn bindgen_test_layout_v4l2_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -8999,6 +12393,9 @@ pub struct v4l2_sliced_vbi_format { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_format() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 112usize, @@ -9010,9 +12407,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_format)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_set as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_set) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9022,9 +12417,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_lines as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_lines) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -9034,7 +12427,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).io_size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).io_size) as usize - ptr as usize }, 100usize, concat!( "Offset of field: ", @@ -9044,7 +12437,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -9064,6 +12457,8 @@ pub struct v4l2_sliced_vbi_cap { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 116usize, @@ -9075,7 +12470,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_cap)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).service_set as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).service_set) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9085,9 +12480,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).service_lines as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).service_lines) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", @@ -9097,7 +12490,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 100usize, concat!( "Offset of field: ", @@ -9107,7 +12500,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_cap() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", @@ -9128,6 +12521,8 @@ pub struct v4l2_sliced_vbi_data { } #[test] fn bindgen_test_layout_v4l2_sliced_vbi_data() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -9139,7 +12534,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { concat!("Alignment of ", stringify!(v4l2_sliced_vbi_data)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9149,7 +12544,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9159,7 +12554,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9169,7 +12564,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -9179,7 +12574,7 @@ fn bindgen_test_layout_v4l2_sliced_vbi_data() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -9197,6 +12592,9 @@ pub struct v4l2_mpeg_vbi_itv0_line { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 43usize, @@ -9208,7 +12606,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_itv0_line)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9218,7 +12616,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0_line() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", @@ -9236,6 +12634,8 @@ pub struct v4l2_mpeg_vbi_itv0 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1513usize, @@ -9247,7 +12647,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_itv0)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).linemask as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).linemask) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9257,7 +12657,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_itv0() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9274,6 +12674,8 @@ pub struct v4l2_mpeg_vbi_ITV0 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_ITV0() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1548usize, @@ -9285,7 +12687,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_ITV0() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_ITV0)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9309,6 +12711,9 @@ pub union v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1548usize, @@ -9326,10 +12731,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).itv0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).itv0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9339,10 +12741,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ITV0 as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ITV0) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9354,6 +12753,9 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1552usize, @@ -9365,7 +12767,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { concat!("Alignment of ", stringify!(v4l2_mpeg_vbi_fmt_ivtv)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).magic as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9375,11 +12777,7 @@ fn bindgen_test_layout_v4l2_mpeg_vbi_fmt_ivtv() { ) ); } -#[doc = " struct v4l2_plane_pix_format - additional, per-plane format definition"] -#[doc = " @sizeimage:\t\tmaximum size in bytes required for data, for which"] -#[doc = "\t\t\tthis plane will be used"] -#[doc = " @bytesperline:\tdistance in bytes between the leftmost pixels in two"] -#[doc = "\t\t\tadjacent lines"] +#[doc = " struct v4l2_plane_pix_format - additional, per-plane format definition\n @sizeimage:\t\tmaximum size in bytes required for data, for which\n\t\t\tthis plane will be used\n @bytesperline:\tdistance in bytes between the leftmost pixels in two\n\t\t\tadjacent lines\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_plane_pix_format { @@ -9389,6 +12787,9 @@ pub struct v4l2_plane_pix_format { } #[test] fn bindgen_test_layout_v4l2_plane_pix_format() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -9400,7 +12801,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { concat!("Alignment of ", stringify!(v4l2_plane_pix_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sizeimage as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sizeimage) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9410,9 +12811,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).bytesperline as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).bytesperline) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9422,7 +12821,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9432,18 +12831,7 @@ fn bindgen_test_layout_v4l2_plane_pix_format() { ) ); } -#[doc = " struct v4l2_pix_format_mplane - multiplanar format definition"] -#[doc = " @width:\t\timage width in pixels"] -#[doc = " @height:\t\timage height in pixels"] -#[doc = " @pixelformat:\tlittle endian four character code (fourcc)"] -#[doc = " @field:\t\tenum v4l2_field; field order (for interlaced video)"] -#[doc = " @colorspace:\t\tenum v4l2_colorspace; supplemental to pixelformat"] -#[doc = " @plane_fmt:\t\tper-plane information"] -#[doc = " @num_planes:\t\tnumber of planes for this format"] -#[doc = " @flags:\t\tformat flags (V4L2_PIX_FMT_FLAG_*)"] -#[doc = " @ycbcr_enc:\t\tenum v4l2_ycbcr_encoding, Y'CbCr encoding"] -#[doc = " @quantization:\tenum v4l2_quantization, colorspace quantization"] -#[doc = " @xfer_func:\t\tenum v4l2_xfer_func, colorspace transfer function"] +#[doc = " struct v4l2_pix_format_mplane - multiplanar format definition\n @width:\t\timage width in pixels\n @height:\t\timage height in pixels\n @pixelformat:\tlittle endian four character code (fourcc)\n @field:\t\tenum v4l2_field; field order (for interlaced video)\n @colorspace:\t\tenum v4l2_colorspace; supplemental to pixelformat\n @plane_fmt:\t\tper-plane information\n @num_planes:\t\tnumber of planes for this format\n @flags:\t\tformat flags (V4L2_PIX_FMT_FLAG_*)\n @ycbcr_enc:\t\tenum v4l2_ycbcr_encoding, Y'CbCr encoding\n @hsv_enc:\t\tenum v4l2_hsv_encoding, HSV encoding\n @quantization:\tenum v4l2_quantization, colorspace quantization\n @xfer_func:\t\tenum v4l2_xfer_func, colorspace transfer function\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Copy, Clone)] pub struct v4l2_pix_format_mplane { @@ -9468,6 +12856,9 @@ pub union v4l2_pix_format_mplane__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, @@ -9485,10 +12876,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ycbcr_enc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).ycbcr_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9498,10 +12886,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hsv_enc as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).hsv_enc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9513,6 +12898,9 @@ fn bindgen_test_layout_v4l2_pix_format_mplane__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_pix_format_mplane() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 192usize, @@ -9524,7 +12912,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { concat!("Alignment of ", stringify!(v4l2_pix_format_mplane)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9534,7 +12922,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9544,9 +12932,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pixelformat as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9556,7 +12942,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -9566,9 +12952,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).colorspace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).colorspace) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -9578,9 +12962,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).plane_fmt as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).plane_fmt) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -9590,9 +12972,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_planes as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).num_planes) as usize - ptr as usize }, 180usize, concat!( "Offset of field: ", @@ -9602,7 +12982,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 181usize, concat!( "Offset of field: ", @@ -9612,9 +12992,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).quantization as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).quantization) as usize - ptr as usize }, 183usize, concat!( "Offset of field: ", @@ -9624,9 +13002,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).xfer_func as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).xfer_func) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", @@ -9636,7 +13012,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 185usize, concat!( "Offset of field: ", @@ -9646,9 +13022,7 @@ fn bindgen_test_layout_v4l2_pix_format_mplane() { ) ); } -#[doc = " struct v4l2_sdr_format - SDR format definition"] -#[doc = " @pixelformat:\tlittle endian four character code (fourcc)"] -#[doc = " @buffersize:\t\tmaximum size in bytes required for data"] +#[doc = " struct v4l2_sdr_format - SDR format definition\n @pixelformat:\tlittle endian four character code (fourcc)\n @buffersize:\t\tmaximum size in bytes required for data\n @reserved:\t\tdrivers and applications must zero this array"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_sdr_format { @@ -9658,6 +13032,8 @@ pub struct v4l2_sdr_format { } #[test] fn bindgen_test_layout_v4l2_sdr_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -9669,7 +13045,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { concat!("Alignment of ", stringify!(v4l2_sdr_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pixelformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pixelformat) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9679,7 +13055,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffersize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffersize) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9689,7 +13065,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9699,9 +13075,7 @@ fn bindgen_test_layout_v4l2_sdr_format() { ) ); } -#[doc = " struct v4l2_meta_format - metadata format definition"] -#[doc = " @dataformat:\t\tlittle endian four character code (fourcc)"] -#[doc = " @buffersize:\t\tmaximum size in bytes required for data"] +#[doc = " struct v4l2_meta_format - metadata format definition\n @dataformat:\t\tlittle endian four character code (fourcc)\n @buffersize:\t\tmaximum size in bytes required for data"] #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct v4l2_meta_format { @@ -9710,6 +13084,8 @@ pub struct v4l2_meta_format { } #[test] fn bindgen_test_layout_v4l2_meta_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -9721,7 +13097,7 @@ fn bindgen_test_layout_v4l2_meta_format() { concat!("Alignment of ", stringify!(v4l2_meta_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).dataformat as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).dataformat) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9731,7 +13107,7 @@ fn bindgen_test_layout_v4l2_meta_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffersize as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).buffersize) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -9741,14 +13117,7 @@ fn bindgen_test_layout_v4l2_meta_format() { ) ); } -#[doc = " struct v4l2_format - stream data format"] -#[doc = " @type:\tenum v4l2_buf_type; type of the data stream"] -#[doc = " @pix:\tdefinition of an image format"] -#[doc = " @pix_mp:\tdefinition of a multiplanar image format"] -#[doc = " @win:\tdefinition of an overlaid image"] -#[doc = " @vbi:\traw VBI capture or output parameters"] -#[doc = " @sliced:\tsliced VBI capture or output parameters"] -#[doc = " @raw_data:\tplaceholder for future extensions and custom formats"] +#[doc = " struct v4l2_format - stream data format\n @type:\tenum v4l2_buf_type; type of the data stream\n @pix:\tdefinition of an image format\n @pix_mp:\tdefinition of a multiplanar image format\n @win:\tdefinition of an overlaid image\n @vbi:\traw VBI capture or output parameters\n @sliced:\tsliced VBI capture or output parameters\n @raw_data:\tplaceholder for future extensions and custom formats\n @fmt:\tunion of @pix, @pix_mp, @win, @vbi, @sliced, @sdr, @meta\n\t\tand @raw_data"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_format { @@ -9769,6 +13138,9 @@ pub union v4l2_format__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -9780,7 +13152,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_format__bindgen_ty_1)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pix as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pix) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9790,9 +13162,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pix_mp as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pix_mp) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9802,7 +13172,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).win as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).win) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9812,7 +13182,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vbi as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vbi) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9822,9 +13192,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sliced as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).sliced) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9834,7 +13202,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdr as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sdr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9844,7 +13212,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).meta) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9854,9 +13222,7 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9868,6 +13234,8 @@ fn bindgen_test_layout_v4l2_format__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_format() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 208usize, @@ -9879,7 +13247,7 @@ fn bindgen_test_layout_v4l2_format() { concat!("Alignment of ", stringify!(v4l2_format)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9889,7 +13257,7 @@ fn bindgen_test_layout_v4l2_format() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fmt) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -9914,6 +13282,9 @@ pub union v4l2_streamparm__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -9925,9 +13296,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_streamparm__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capture as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capture) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9937,9 +13306,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).output as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).output) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9949,9 +13316,7 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).raw_data as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).raw_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9963,6 +13328,8 @@ fn bindgen_test_layout_v4l2_streamparm__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_streamparm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 204usize, @@ -9974,7 +13341,7 @@ fn bindgen_test_layout_v4l2_streamparm() { concat!("Alignment of ", stringify!(v4l2_streamparm)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -9984,7 +13351,7 @@ fn bindgen_test_layout_v4l2_streamparm() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).parm as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).parm) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10001,6 +13368,8 @@ pub struct v4l2_event_vsync { } #[test] fn bindgen_test_layout_v4l2_event_vsync() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, @@ -10012,7 +13381,7 @@ fn bindgen_test_layout_v4l2_event_vsync() { concat!("Alignment of ", stringify!(v4l2_event_vsync)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).field as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10042,6 +13411,9 @@ pub union v4l2_event_ctrl__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -10053,9 +13425,7 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_event_ctrl__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10065,9 +13435,7 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).value64 as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).value64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10079,6 +13447,8 @@ fn bindgen_test_layout_v4l2_event_ctrl__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_event_ctrl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -10090,7 +13460,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { concat!("Alignment of ", stringify!(v4l2_event_ctrl)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).changes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).changes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10100,7 +13470,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10110,7 +13480,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -10120,7 +13490,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).minimum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).minimum) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", @@ -10130,7 +13500,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maximum as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).maximum) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -10140,7 +13510,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).step as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", @@ -10150,7 +13520,7 @@ fn bindgen_test_layout_v4l2_event_ctrl() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).default_value as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).default_value) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -10167,6 +13537,9 @@ pub struct v4l2_event_frame_sync { } #[test] fn bindgen_test_layout_v4l2_event_frame_sync() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -10178,9 +13551,7 @@ fn bindgen_test_layout_v4l2_event_frame_sync() { concat!("Alignment of ", stringify!(v4l2_event_frame_sync)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sequence as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sequence) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10197,6 +13568,9 @@ pub struct v4l2_event_src_change { } #[test] fn bindgen_test_layout_v4l2_event_src_change() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, @@ -10208,7 +13582,7 @@ fn bindgen_test_layout_v4l2_event_src_change() { concat!("Alignment of ", stringify!(v4l2_event_src_change)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).changes as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).changes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10218,11 +13592,7 @@ fn bindgen_test_layout_v4l2_event_src_change() { ) ); } -#[doc = " struct v4l2_event_motion_det - motion detection event"] -#[doc = " @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the"] -#[doc = " frame_sequence field is valid."] -#[doc = " @frame_sequence: the frame sequence number associated with this event."] -#[doc = " @region_mask: which regions detected motion."] +#[doc = " struct v4l2_event_motion_det - motion detection event\n @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the\n frame_sequence field is valid.\n @frame_sequence: the frame sequence number associated with this event.\n @region_mask: which regions detected motion."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct v4l2_event_motion_det { @@ -10232,6 +13602,9 @@ pub struct v4l2_event_motion_det { } #[test] fn bindgen_test_layout_v4l2_event_motion_det() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -10243,7 +13616,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { concat!("Alignment of ", stringify!(v4l2_event_motion_det)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10253,9 +13626,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sequence as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sequence) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10265,9 +13636,7 @@ fn bindgen_test_layout_v4l2_event_motion_det() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).region_mask as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).region_mask) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10300,6 +13669,9 @@ pub union v4l2_event__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -10311,7 +13683,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_event__bindgen_ty_1)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).vsync as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).vsync) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10321,7 +13693,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).ctrl as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ctrl) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10331,9 +13703,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).frame_sync as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).frame_sync) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10343,9 +13713,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).src_change as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).src_change) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10355,9 +13723,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).motion_det as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).motion_det) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10367,7 +13733,7 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10379,6 +13745,8 @@ fn bindgen_test_layout_v4l2_event__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_event() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 136usize, @@ -10390,7 +13758,7 @@ fn bindgen_test_layout_v4l2_event() { concat!("Alignment of ", stringify!(v4l2_event)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10400,7 +13768,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10410,7 +13778,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).pending as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pending) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -10420,7 +13788,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).sequence as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).sequence) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -10430,7 +13798,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).timestamp as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", @@ -10440,7 +13808,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", @@ -10450,7 +13818,7 @@ fn bindgen_test_layout_v4l2_event() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 100usize, concat!( "Offset of field: ", @@ -10470,6 +13838,9 @@ pub struct v4l2_event_subscription { } #[test] fn bindgen_test_layout_v4l2_event_subscription() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -10481,7 +13852,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { concat!("Alignment of ", stringify!(v4l2_event_subscription)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10491,7 +13862,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10501,7 +13872,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10511,9 +13882,7 @@ fn bindgen_test_layout_v4l2_event_subscription() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", @@ -10537,6 +13906,9 @@ pub union v4l2_dbg_match__bindgen_ty_1 { } #[test] fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -10548,9 +13920,7 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { concat!("Alignment of ", stringify!(v4l2_dbg_match__bindgen_ty_1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).addr as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10560,9 +13930,7 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).name as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10574,6 +13942,8 @@ fn bindgen_test_layout_v4l2_dbg_match__bindgen_ty_1() { } #[test] fn bindgen_test_layout_v4l2_dbg_match() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 36usize, @@ -10585,7 +13955,7 @@ fn bindgen_test_layout_v4l2_dbg_match() { concat!("Alignment of ", stringify!(v4l2_dbg_match)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10605,6 +13975,8 @@ pub struct v4l2_dbg_register { } #[test] fn bindgen_test_layout_v4l2_dbg_register() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -10616,7 +13988,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { concat!("Alignment of ", stringify!(v4l2_dbg_register)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).match_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).match_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10626,7 +13998,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -10636,7 +14008,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reg) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -10646,7 +14018,7 @@ fn bindgen_test_layout_v4l2_dbg_register() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -10666,6 +14038,8 @@ pub struct v4l2_dbg_chip_info { } #[test] fn bindgen_test_layout_v4l2_dbg_chip_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 200usize, @@ -10677,7 +14051,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { concat!("Alignment of ", stringify!(v4l2_dbg_chip_info)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).match_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).match_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10687,7 +14061,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", @@ -10697,7 +14071,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", @@ -10707,7 +14081,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -10717,14 +14091,7 @@ fn bindgen_test_layout_v4l2_dbg_chip_info() { ) ); } -#[doc = " struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument"] -#[doc = " @index:\ton return, index of the first created buffer"] -#[doc = " @count:\tentry: number of requested buffers,"] -#[doc = "\t\treturn: number of created buffers"] -#[doc = " @memory:\tenum v4l2_memory; buffer memory type"] -#[doc = " @format:\tframe format, for which buffers are requested"] -#[doc = " @capabilities: capabilities of this buffer type."] -#[doc = " @reserved:\tfuture extensions"] +#[doc = " struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument\n @index:\ton return, index of the first created buffer\n @count:\tentry: number of requested buffers,\n\t\treturn: number of created buffers\n @memory:\tenum v4l2_memory; buffer memory type\n @format:\tframe format, for which buffers are requested\n @capabilities: capabilities of this buffer type.\n @flags:\tadditional buffer management attributes (ignored unless the\n\t\tqueue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability\n\t\tand configured for MMAP streaming I/O).\n @reserved:\tfuture extensions"] #[repr(C)] #[derive(Copy, Clone)] pub struct v4l2_create_buffers { @@ -10733,10 +14100,13 @@ pub struct v4l2_create_buffers { pub memory: __u32, pub format: v4l2_format, pub capabilities: __u32, - pub reserved: [__u32; 7usize], + pub flags: __u32, + pub reserved: [__u32; 6usize], } #[test] fn bindgen_test_layout_v4l2_create_buffers() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 256usize, @@ -10748,7 +14118,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { concat!("Alignment of ", stringify!(v4l2_create_buffers)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).index as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -10758,7 +14128,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -10768,7 +14138,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memory as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -10778,7 +14148,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -10788,9 +14158,7 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).capabilities as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).capabilities) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", @@ -10800,8 +14168,18 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 228usize, + concat!( + "Offset of field: ", + stringify!(v4l2_create_buffers), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 232usize, concat!( "Offset of field: ", stringify!(v4l2_create_buffers), @@ -10810,3 +14188,14 @@ fn bindgen_test_layout_v4l2_create_buffers() { ) ); } +pub const V4L2_FWHT_FL_IS_INTERLACED: ::std::os::raw::c_ulong = 1; +pub const V4L2_FWHT_FL_IS_BOTTOM_FIRST: ::std::os::raw::c_ulong = 2; +pub const V4L2_FWHT_FL_IS_ALTERNATE: ::std::os::raw::c_ulong = 4; +pub const V4L2_FWHT_FL_IS_BOTTOM_FIELD: ::std::os::raw::c_ulong = 8; +pub const V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 16; +pub const V4L2_FWHT_FL_CB_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 32; +pub const V4L2_FWHT_FL_CR_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 64; +pub const V4L2_FWHT_FL_CHROMA_FULL_HEIGHT: ::std::os::raw::c_ulong = 128; +pub const V4L2_FWHT_FL_CHROMA_FULL_WIDTH: ::std::os::raw::c_ulong = 256; +pub const V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED: ::std::os::raw::c_ulong = 512; +pub const V4L2_FWHT_FL_I_FRAME: ::std::os::raw::c_ulong = 1024;