diff --git a/Cargo.toml b/Cargo.toml index 950508a..ec3d043 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,16 +11,25 @@ categories = ["multimedia::encoding", "hardware-support", "external-ffi-bindings edition = "2021" rust-version = "1.85" -# Dev-only tooling; not needed to build the crate from the published tarball. -exclude = ["flake.nix", "flake.lock", "justfile", "deny.toml", "rust-toolchain.toml", ".rustfmt.toml"] +# Dev-only tooling and the headers `just bindgen` reads; not needed to build the +# crate from the published tarball. +exclude = [ + "flake.nix", + "flake.lock", + "justfile", + "deny.toml", + "rust-toolchain.toml", + ".rustfmt.toml", + "libva/", + "libva-wrapper.h", +] -# bindgen reads the vendored libva headers checked into `libva/` (refreshed by -# `just vendor`, pinned to a known VA-API version so a system libva bump can't -# drift the bindings). libva is not linked: bindgen's dynamic-loading mode emits a -# `Va` struct that dlopen's libva.so at runtime (see bindgen_gen.rs), so the build -# needs only libclang + the vendored headers, the binary carries no NEEDED libva -# (a libva-less host loads and lets the caller fall back), and the crate builds on -# any OS (macOS, docs.rs) without libva installed. +# The libva bindings are generated from the vendored headers in `libva/` (pinned +# to a known VA-API version, so a system libva bump can't drift them) by `just +# bindgen`, and checked in: the build needs no libclang, no libva, and no build +# script. libva is not linked either: the bindings' `Va` struct dlopen's it at +# runtime, so the binary carries no NEEDED libva (a libva-less host loads and +# lets the caller fall back), and the crate builds on any OS (macOS, docs.rs). [dependencies] anyhow = "1" @@ -29,7 +38,3 @@ bitflags = "2.5" log = "0" # Runtime dlopen of libva; the bindgen `Va` struct is built on libloading::Library. libloading = "0.8" - -[build-dependencies] -bindgen = "0.70.1" -regex = "1.11.1" diff --git a/README.md b/README.md index 3699868..94ff3bd 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,15 @@ pulled in as a git dependency. Meteor Lake (iHD 26.1.5) for constrained baseline, main with B-frames, high at 720p, and a cropped non-macroblock-aligned size. The main-with-B-frames case runs as a test wherever ffmpeg and a VA-API device are both present. -- **Pinned, vendored headers.** libva's headers are vendored into - [`libva/`](./libva) (see `just vendor`) and fed to bindgen, so generating the - bindings needs **no system libva-dev** — only `libclang` — and the pinned - version means a system libva bump can't drift the bindings. +- **Checked-in bindings from pinned headers.** libva's headers are vendored + into [`libva/`](./libva) (see `just vendor`), and `just bindgen` generates + [`src/bindings/libva.rs`](./src/bindings/libva.rs) from them. The output is + checked in, so building the crate needs **no libclang, no libva-dev, and no + build script**, and the pinned version means a system libva bump can't drift + the bindings. The file is portable: fixed-width C types, no layout tests, and + the two VPP structs whose padding libva sizes by pointer width carry both + layouts under a `cfg`. `just ci` fails if the file is not what the headers + generate. - **Loads system libva at runtime on Linux.** The generated `Va` function table loads `libva` / `libva-drm` with `libloading`. Building needs no system libva, and a binary can start without it; opening a display reports a missing driver @@ -70,7 +75,7 @@ This run checked all five cros-libva commits and the one cros-codecs commit: | --- | --- | | cros-libva [`838808ce`](https://github.com/chromeos/cros-libva/commit/838808cebfeff64f5c3543c873dbc604857b3702), protected-content headers | Not needed: no protected-content consumer or Android build in this crate. | | cros-libva [`89454d66`](https://github.com/chromeos/cros-libva/commit/89454d660411627a4a463116fdea00ac1ac888bc), explicit image lifetimes | Already present in `Image::create_from` and `Picture::{derive_image,create_image}`. | -| cros-libva [`9f3c0d92`](https://github.com/chromeos/cros-libva/commit/9f3c0d9264ec04b4fa792764178b879341ce33b1), packed-header bindings | Already present in `bindgen_gen.rs`, `buffer.rs`, and the H.264 encoder. | +| cros-libva [`9f3c0d92`](https://github.com/chromeos/cros-libva/commit/9f3c0d9264ec04b4fa792764178b879341ce33b1), packed-header bindings | Already present in the `bindgen` allowlist, `buffer.rs`, and the H.264 encoder. | | cros-libva [`ed9c63b7`](https://github.com/chromeos/cros-libva/commit/ed9c63b743ce9490e1079a8b0c1a24b8e879324f), borrowed input buffers | Optional copy avoidance, not a correctness fix. Keep the existing owned-buffer API; no new public API or optimization without measurement. | | cros-libva [`59384456`](https://github.com/chromeos/cros-libva/commit/59384456ac2ae78c0c3e5515f41ef1efd9b802cf), libva 2.23 VP9 fields | Build compatibility already covered by `..Default::default()` in the retained VP9 wrapper against pinned 2.23 headers. The codec drivers support H.264 only, so no VP9 segmentation control is needed. | | cros-codecs [`a050c6cd`](https://github.com/chromeos/cros-codecs/commit/a050c6cde530e563197ee9e3e72ab01f48a0c41f), release log filtering | Ported: remove `log/release_max_level_debug`, which conflicts with a consumer selecting another release level. `just ci` checks feature unification with `log/release_max_level_trace`. | @@ -91,7 +96,8 @@ advisories checked, not a guarantee that no undisclosed vulnerabilities exist. and decode drivers (`encode`, `decode`), DMA-BUF import (`dmabuf`), video post-processing (`vpp`), and the color space both share (`color`). - `libva/` — vendored libva headers (checked in; refreshed by `just vendor`). -- `build.rs` + `bindgen_gen.rs` + `libva-wrapper.h` — bindgen setup. +- `libva-wrapper.h` + the `bindgen` recipe in `justfile` — what generates + `src/bindings/libva.rs`. ## Development @@ -99,8 +105,9 @@ Recipes run inside the nix devShell: ```sh nix develop --command just check # clippy + fmt -nix develop --command just ci # check + cargo-deny -nix develop --command just vendor # refresh libva/ headers from upstream +nix develop --command just ci # check + tests + bindings drift + cargo-deny +nix develop --command just vendor # refresh libva/ headers from upstream, then the bindings +nix develop --command just bindgen # regenerate src/bindings/libva.rs ``` The crate compiles on macOS for development, with no link-time dependency on diff --git a/bindgen_gen.rs b/bindgen_gen.rs deleted file mode 100644 index 5a5003e..0000000 --- a/bindgen_gen.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 The ChromiumOS Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -/// The allow list of VA functions, structures and enum values. -const ALLOW_LIST_TYPE : &str = ".*ExternalBuffers.*|.*PRIME.*|.*MPEG2.*|.*VP8.*|.*VP9.*|.*H264.*|.*HEVC.*|.*JPEG.*|VACodedBufferSegment|.*AV1.*|VAEncMisc.*|VASurfaceDecodeMBErrors|VADecodeErrorType|.*VAProc.*|VAEncPacked.*"; - -// The common bindgen builder for VA-API. -pub fn vaapi_gen_builder(builder: bindgen::Builder) -> bindgen::Builder { - builder - .derive_default(true) - .derive_eq(true) - .layout_tests(false) - .constified_enum_module("VA.*") - .allowlist_var("VA.*") - .allowlist_function("va.*") - .allowlist_type(ALLOW_LIST_TYPE) - // Emit a `Va` struct of libloading-resolved function pointers instead of - // link-time `extern "C"` decls, so libva is dlopen'd at runtime (no - // build-time or load-time libva dependency). `require_all(false)` lets a - // system libva older than the vendored headers still load: a missing - // symbol only errors if actually called, not at `Va::new`. - .dynamic_library_name("Va") - .dynamic_link_require_all(false) -} diff --git a/build.rs b/build.rs deleted file mode 100644 index e4154db..0000000 --- a/build.rs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2022 The ChromiumOS Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Vendored verbatim from cros-libva (BSD-3-Clause); not subject to strict lints. -#![allow(clippy::all)] - -use regex::Regex; -use std::env::{self}; -use std::fs::read_to_string; -use std::path::{Path, PathBuf}; - -mod bindgen_gen; -use bindgen_gen::vaapi_gen_builder; - -/// Wrapper file to use as input of bindgen. -const WRAPPER_PATH: &str = "libva-wrapper.h"; - -/// Generate `va_version.h` from the vendored `va_version.h.in` template by -/// extracting version numbers from `meson.build`. The `libva/` headers are -/// checked into the repo and refreshed by `just vendor`. -fn generate_vendored_version_header(out_dir: &Path) -> (u32, u32) { - let meson_build = - read_to_string("libva/meson.build").expect("failed to read libva/meson.build — run `just vendor`"); - - // Extract va_api_{major,minor,micro}_version from meson.build - let extract = |var_name: &str| -> String { - let re = Regex::new(&format!(r"{}\s*=\s*(\d+)", var_name)).unwrap(); - re.captures(&meson_build) - .unwrap_or_else(|| panic!("{} not found in libva/meson.build", var_name))[1] - .to_string() - }; - - let major = extract("va_api_major_version"); - let minor = extract("va_api_minor_version"); - let micro = extract("va_api_micro_version"); - let version = format!("{}.{}.{}", major, minor, micro); - - let template = read_to_string("libva/va/va_version.h.in").expect("failed to read libva/va/va_version.h.in"); - - let generated = template - .replace("@VA_API_MAJOR_VERSION@", &major) - .replace("@VA_API_MINOR_VERSION@", &minor) - .replace("@VA_API_MICRO_VERSION@", µ) - .replace("@VA_API_VERSION@", &version); - - let va_dir = out_dir.join("va"); - std::fs::create_dir_all(&va_dir).expect("failed to create va dir in OUT_DIR"); - std::fs::write(va_dir.join("va_version.h"), generated).expect("failed to write va_version.h"); - - // libva keeps va_drm.h under va/drm/ in its source tree, but installs it (and - // the wrapper includes it) as . Stage it next to the generated - // va_version.h so the OUT_DIR include path resolves . - std::fs::copy("libva/va/drm/va_drm.h", va_dir.join("va_drm.h")).expect("failed to stage va/drm/va_drm.h"); - - ( - major.parse().expect("invalid major version"), - minor.parse().expect("invalid minor version"), - ) -} - -fn main() { - // NOTE: do not short-circuit for docs builds (CARGO_DOC / DOCS_RS). `src/bindings.rs` - // `include!`s the generated `$OUT_DIR/bindings.rs`, so skipping bindgen makes - // `cargo doc` (and docs.rs) fail to compile. The build is hermetic — it only needs - // libclang and the vendored headers, both available on docs.rs — so always generate. - let out_dir = PathBuf::from(env::var("OUT_DIR").expect("`OUT_DIR` is not set")); - - // Bindings are generated from the vendored libva headers (checked into `libva/`, - // pinned to a known VA-API version so a system libva bump can't drift them). - // libva itself is linked on Linux (see below). The rlib compile needs only - // libclang + the vendored headers, so it builds on any OS for development. - let (major, minor) = generate_vendored_version_header(&out_dir); - println!("cargo:rerun-if-changed=libva/meson.build"); - println!("cargo:rerun-if-changed=libva/va/va_version.h.in"); - - // Two include paths: the vendored `libva/` root so `#include ` - // resolves to `libva/va/va.h`, and OUT_DIR for the generated - // `` and the staged ``. - let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("`CARGO_MANIFEST_DIR` is not set")); - let va_h_path = manifest_dir.join("libva"); - assert!( - va_h_path.join("meson.build").exists(), - "{} is missing the vendored libva headers — run `just vendor`", - va_h_path.display() - ); - - println!("libva {}.{} is used to generate bindings", major, minor); - let va_check_version = |desired_major: u32, desired_minor: u32| { - major > desired_major || (major == desired_major && minor >= desired_minor) - }; - - // Declare the custom cfg flags to avoid warnings - println!("cargo::rustc-check-cfg=cfg(libva_1_21_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_20_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_19_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_16_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_15_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_14_or_higher)"); - println!("cargo::rustc-check-cfg=cfg(libva_1_10_or_higher)"); - - // Set the cfg flags based on version - if va_check_version(1, 21) { - println!("cargo::rustc-cfg=libva_1_21_or_higher"); - } - if va_check_version(1, 20) { - println!("cargo::rustc-cfg=libva_1_20_or_higher") - } - if va_check_version(1, 19) { - println!("cargo::rustc-cfg=libva_1_19_or_higher") - } - if va_check_version(1, 16) { - println!("cargo::rustc-cfg=libva_1_16_or_higher") - } - if va_check_version(1, 15) { - println!("cargo::rustc-cfg=libva_1_15_or_higher"); - } - if va_check_version(1, 14) { - println!("cargo::rustc-cfg=libva_1_14_or_higher"); - } - if va_check_version(1, 10) { - println!("cargo::rustc-cfg=libva_1_10_or_higher"); - } - - // No link step: bindgen emits a `Va` struct that dlopen's libva at runtime - // (see bindgen_gen.rs and src/bindings.rs). So the build needs only libclang - // plus the vendored headers, and the binary carries no NEEDED libva, matching - // how the NVENC backend loads its driver. This is what lets docs.rs (and any - // libva-less Linux host) build the crate. - let bindings = vaapi_gen_builder(bindgen::builder()) - .header(WRAPPER_PATH) - .clang_arg(format!("-I{}", va_h_path.display())) - .clang_arg(format!("-I{}", out_dir.display())) - .generate() - .expect("unable to generate bindings"); - - bindings - .write_to_file(out_dir.join("bindings.rs")) - .expect("Couldn't write bindings!"); -} diff --git a/flake.nix b/flake.nix index c4442be..48a793f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "moq-vaapi - VA-API H.264 encoder (vendored libva)"; + description = "moq-vaapi - VA-API hardware video codecs (vendored libva)"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; @@ -44,19 +44,14 @@ just git cargo-deny - # bindgen needs libclang to parse the vendored libva headers. - clang + # `just bindgen` regenerates the checked-in bindings; builds need neither it nor libclang. + rust-bindgen ] ++ pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [ # libva is dlopen'd at runtime (not linked at build), so this is only # needed to actually run vaapi encode in the devShell. macOS has no VAAPI. libva ]; - - # bindgen locates libclang via this. - shellHook = '' - export LIBCLANG_PATH="${pkgs.libclang.lib}/lib" - ''; }; formatter = pkgs.nixfmt-tree; diff --git a/justfile b/justfile index 5e69402..25070a0 100644 --- a/justfile +++ b/justfile @@ -15,9 +15,12 @@ check: cargo clippy --all-targets -- -D warnings cargo fmt --all --check -# Full CI: check, unit tests, and dependency hygiene. +# Full CI: check, unit tests, bindings drift, and dependency hygiene. ci: just check + # The checked-in bindings must be what the vendored headers generate. + just bindgen + git diff --exit-code src/bindings/libva.rs cargo test --lib # A consumer must be able to choose its own release logging level. cargo check --lib --features log/release_max_level_trace @@ -28,9 +31,8 @@ fix: cargo clippy --fix --allow-staged --allow-dirty --all-targets cargo fmt --all -# Refresh the vendored libva headers in `libva/` from upstream at {{ LIBVA_TAG }}. -# We check the headers in (rather than a submodule) so the crate is a -# self-contained, crates.io-publishable tarball. Only the files bindgen needs are +# Refresh the vendored libva headers in `libva/` from upstream at {{ LIBVA_TAG }}, +# then regenerate the bindings from them. Only the files bindgen needs are # copied: meson.build (version), va/*.h{,.in}, and va/drm/va_drm.h. vendor: #!/usr/bin/env bash @@ -45,3 +47,62 @@ vendor: cp "$tmp/va/drm/va_drm.h" libva/va/drm/va_drm.h cp "$tmp/COPYING" LICENSE.libva echo "vendored libva {{ LIBVA_TAG }} into libva/ ($(find libva -type f | wc -l | tr -d ' ') files)" + just bindgen + +# Regenerate src/bindings/libva.rs from the vendored headers in `libva/`. +# Builds need neither this nor libclang: the output is checked in, and the C +# types it uses are fixed-width or symbolic (`c_char`), so one file serves every +# target. The exception is libva's own: two VPP structs pad to a constant size +# with a reserved array whose length depends on the pointer width, so both +# layouts are generated and the lines that differ are kept under a `cfg`. +bindgen: + #!/usr/bin/env bash + set -euo pipefail + work=$(mktemp -d) + trap 'rm -rf "$work"' EXIT + # libva generates va_version.h from a template at build time, and installs + # va_drm.h beside va.h; stage both where `#include ` finds them. + mkdir -p "$work/va" + version() { sed -nE "s/^$1\s*=\s*([0-9]+).*/\1/p" libva/meson.build; } + major=$(version va_api_major_version) + minor=$(version va_api_minor_version) + micro=$(version va_api_micro_version) + sed -e "s/@VA_API_MAJOR_VERSION@/$major/" -e "s/@VA_API_MINOR_VERSION@/$minor/" \ + -e "s/@VA_API_MICRO_VERSION@/$micro/" -e "s/@VA_API_VERSION@/$major.$minor.$micro/" \ + libva/va/va_version.h.in > "$work/va/va_version.h" + cp libva/va/drm/va_drm.h "$work/va/va_drm.h" + # `--dynamic-loading` emits a `Va` struct of function pointers that + # libloading resolves at runtime, rather than link-time externs, so libva is + # dlopen'd. A symbol a system libva older than these headers lacks errors + # only when called, not when the library loads. Freestanding, so the host's + # C library cannot change the output. + generate() { + bindgen libva-wrapper.h \ + --rust-target 1.85 \ + --rust-edition 2021 \ + --no-layout-tests \ + --with-derive-default \ + --with-derive-eq \ + --constified-enum-module 'VA.*' \ + --allowlist-var 'VA.*' \ + --allowlist-function 'va.*' \ + --allowlist-type '.*ExternalBuffers.*|.*PRIME.*|.*MPEG2.*|.*VP8.*|.*VP9.*|.*H264.*|.*HEVC.*|.*JPEG.*|VACodedBufferSegment|.*AV1.*|VAEncMisc.*|VASurfaceDecodeMBErrors|VADecodeErrorType|.*VAProc.*|VAEncPacked.*' \ + --dynamic-loading Va \ + --output "$2" \ + -- -Ilibva -I"$work" -ffreestanding --target="$1" + } + generate x86_64-unknown-linux-gnu "$work/wide.rs" + generate i686-unknown-linux-gnu "$work/narrow.rs" + # Only the reserved padding may differ; anything else needs a look before + # it is papered over with a cfg. + unexpected=$(diff "$work/wide.rs" "$work/narrow.rs" | grep -E '^[<>]' | grep -vE '^[<>]\s*pub va_reserved: \[u(16|32); [0-9]+usize\],$' || true) + if [ -n "$unexpected" ]; then + printf 'the bindings differ by pointer width in more than libva'"'"'s reserved padding:\n%s\n' "$unexpected" >&2 + exit 1 + fi + # The condition libva's headers pad on: x86_64, or LP64. + wide='any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows)))' + diff --unchanged-line-format='%L' \ + --old-line-format=$'\t#[cfg('"$wide"$')]\n%L' \ + --new-line-format=$'\t#[cfg(not('"$wide"$'))]\n%L' \ + "$work/wide.rs" "$work/narrow.rs" > src/bindings/libva.rs || [ $? -eq 1 ] diff --git a/src/bindings.rs b/src/bindings.rs index 9703763..caa61f4 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -15,7 +15,9 @@ // bare URLs and other rustdoc-unfriendly markup. Don't lint generated docs. #![allow(rustdoc::all)] -include!(concat!(env!("OUT_DIR"), "/bindings.rs")); +// Generated from the vendored headers by `just bindgen` and checked in, so a +// build needs neither bindgen nor libclang. +include!("bindings/libva.rs"); use std::sync::OnceLock; diff --git a/src/bindings/libva.rs b/src/bindings/libva.rs new file mode 100644 index 0000000..4897ab4 --- /dev/null +++ b/src/bindings/libva.rs @@ -0,0 +1,37436 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::std::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::std::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::std::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const VA_MAJOR_VERSION: u32 = 1; +pub const VA_MINOR_VERSION: u32 = 23; +pub const VA_MICRO_VERSION: u32 = 0; +pub const VA_VERSION_S: &[u8; 7] = b"1.23.0\0"; +pub const VA_VERSION_HEX: u32 = 18284544; +pub const VA_STATUS_SUCCESS: u32 = 0; +pub const VA_STATUS_ERROR_OPERATION_FAILED: u32 = 1; +pub const VA_STATUS_ERROR_ALLOCATION_FAILED: u32 = 2; +pub const VA_STATUS_ERROR_INVALID_DISPLAY: u32 = 3; +pub const VA_STATUS_ERROR_INVALID_CONFIG: u32 = 4; +pub const VA_STATUS_ERROR_INVALID_CONTEXT: u32 = 5; +pub const VA_STATUS_ERROR_INVALID_SURFACE: u32 = 6; +pub const VA_STATUS_ERROR_INVALID_BUFFER: u32 = 7; +pub const VA_STATUS_ERROR_INVALID_IMAGE: u32 = 8; +pub const VA_STATUS_ERROR_INVALID_SUBPICTURE: u32 = 9; +pub const VA_STATUS_ERROR_ATTR_NOT_SUPPORTED: u32 = 10; +pub const VA_STATUS_ERROR_MAX_NUM_EXCEEDED: u32 = 11; +pub const VA_STATUS_ERROR_UNSUPPORTED_PROFILE: u32 = 12; +pub const VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT: u32 = 13; +pub const VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT: u32 = 14; +pub const VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: u32 = 15; +pub const VA_STATUS_ERROR_SURFACE_BUSY: u32 = 16; +pub const VA_STATUS_ERROR_FLAG_NOT_SUPPORTED: u32 = 17; +pub const VA_STATUS_ERROR_INVALID_PARAMETER: u32 = 18; +pub const VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED: u32 = 19; +pub const VA_STATUS_ERROR_UNIMPLEMENTED: u32 = 20; +pub const VA_STATUS_ERROR_SURFACE_IN_DISPLAYING: u32 = 21; +pub const VA_STATUS_ERROR_INVALID_IMAGE_FORMAT: u32 = 22; +pub const VA_STATUS_ERROR_DECODING_ERROR: u32 = 23; +pub const VA_STATUS_ERROR_ENCODING_ERROR: u32 = 24; +pub const VA_STATUS_ERROR_INVALID_VALUE: u32 = 25; +pub const VA_STATUS_ERROR_UNSUPPORTED_FILTER: u32 = 32; +pub const VA_STATUS_ERROR_INVALID_FILTER_CHAIN: u32 = 33; +pub const VA_STATUS_ERROR_HW_BUSY: u32 = 34; +pub const VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: u32 = 36; +pub const VA_STATUS_ERROR_NOT_ENOUGH_BUFFER: u32 = 37; +pub const VA_STATUS_ERROR_TIMEDOUT: u32 = 38; +pub const VA_STATUS_ERROR_UNKNOWN: u32 = 4294967295; +pub const VA_FRAME_PICTURE: u32 = 0; +pub const VA_TOP_FIELD: u32 = 1; +pub const VA_BOTTOM_FIELD: u32 = 2; +pub const VA_TOP_FIELD_FIRST: u32 = 4; +pub const VA_BOTTOM_FIELD_FIRST: u32 = 8; +pub const VA_ENABLE_BLEND: u32 = 4; +pub const VA_CLEAR_DRAWABLE: u32 = 8; +pub const VA_SRC_COLOR_MASK: u32 = 240; +pub const VA_SRC_BT601: u32 = 16; +pub const VA_SRC_BT709: u32 = 32; +pub const VA_SRC_SMPTE_240: u32 = 64; +pub const VA_FILTER_SCALING_DEFAULT: u32 = 0; +pub const VA_FILTER_SCALING_FAST: u32 = 256; +pub const VA_FILTER_SCALING_HQ: u32 = 512; +pub const VA_FILTER_SCALING_NL_ANAMORPHIC: u32 = 768; +pub const VA_FILTER_SCALING_MASK: u32 = 3840; +pub const VA_FILTER_INTERPOLATION_DEFAULT: u32 = 0; +pub const VA_FILTER_INTERPOLATION_NEAREST_NEIGHBOR: u32 = 4096; +pub const VA_FILTER_INTERPOLATION_BILINEAR: u32 = 8192; +pub const VA_FILTER_INTERPOLATION_ADVANCED: u32 = 12288; +pub const VA_FILTER_INTERPOLATION_MASK: u32 = 61440; +pub const VA_PADDING_LOW: u32 = 4; +pub const VA_PADDING_MEDIUM: u32 = 8; +pub const VA_PADDING_HIGH: u32 = 16; +pub const VA_PADDING_LARGE: u32 = 32; +pub const VA_EXEC_SYNC: u32 = 0; +pub const VA_EXEC_ASYNC: u32 = 1; +pub const VA_EXEC_MODE_DEFAULT: u32 = 0; +pub const VA_EXEC_MODE_POWER_SAVING: u32 = 1; +pub const VA_EXEC_MODE_PERFORMANCE: u32 = 2; +pub const VA_FEATURE_NOT_SUPPORTED: u32 = 0; +pub const VA_FEATURE_SUPPORTED: u32 = 1; +pub const VA_FEATURE_REQUIRED: u32 = 2; +pub const VA_RT_FORMAT_YUV420: u32 = 1; +pub const VA_RT_FORMAT_YUV422: u32 = 2; +pub const VA_RT_FORMAT_YUV444: u32 = 4; +pub const VA_RT_FORMAT_YUV411: u32 = 8; +pub const VA_RT_FORMAT_YUV400: u32 = 16; +pub const VA_RT_FORMAT_YUV420_10: u32 = 256; +pub const VA_RT_FORMAT_YUV422_10: u32 = 512; +pub const VA_RT_FORMAT_YUV444_10: u32 = 1024; +pub const VA_RT_FORMAT_YUV420_12: u32 = 4096; +pub const VA_RT_FORMAT_YUV422_12: u32 = 8192; +pub const VA_RT_FORMAT_YUV444_12: u32 = 16384; +pub const VA_RT_FORMAT_RGB16: u32 = 65536; +pub const VA_RT_FORMAT_RGB32: u32 = 131072; +pub const VA_RT_FORMAT_RGBP: u32 = 1048576; +pub const VA_RT_FORMAT_RGB32_10: u32 = 2097152; +pub const VA_RT_FORMAT_PROTECTED: u32 = 2147483648; +pub const VA_RT_FORMAT_RGB32_10BPP: u32 = 2097152; +pub const VA_RT_FORMAT_YUV420_10BPP: u32 = 256; +pub const VA_RC_NONE: u32 = 1; +pub const VA_RC_CBR: u32 = 2; +pub const VA_RC_VBR: u32 = 4; +pub const VA_RC_VCM: u32 = 8; +pub const VA_RC_CQP: u32 = 16; +pub const VA_RC_VBR_CONSTRAINED: u32 = 32; +pub const VA_RC_ICQ: u32 = 64; +pub const VA_RC_MB: u32 = 128; +pub const VA_RC_CFS: u32 = 256; +pub const VA_RC_PARALLEL: u32 = 512; +pub const VA_RC_QVBR: u32 = 1024; +pub const VA_RC_AVBR: u32 = 2048; +pub const VA_RC_TCBRC: u32 = 4096; +pub const VA_DEC_SLICE_MODE_NORMAL: u32 = 1; +pub const VA_DEC_SLICE_MODE_BASE: u32 = 2; +pub const VA_DEC_PROCESSING_NONE: u32 = 0; +pub const VA_DEC_PROCESSING: u32 = 1; +pub const VA_ENC_PACKED_HEADER_NONE: u32 = 0; +pub const VA_ENC_PACKED_HEADER_SEQUENCE: u32 = 1; +pub const VA_ENC_PACKED_HEADER_PICTURE: u32 = 2; +pub const VA_ENC_PACKED_HEADER_SLICE: u32 = 4; +pub const VA_ENC_PACKED_HEADER_MISC: u32 = 8; +pub const VA_ENC_PACKED_HEADER_RAW_DATA: u32 = 16; +pub const VA_ENC_INTERLACED_NONE: u32 = 0; +pub const VA_ENC_INTERLACED_FRAME: u32 = 1; +pub const VA_ENC_INTERLACED_FIELD: u32 = 2; +pub const VA_ENC_INTERLACED_MBAFF: u32 = 4; +pub const VA_ENC_INTERLACED_PAFF: u32 = 8; +pub const VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS: u32 = 1; +pub const VA_ENC_SLICE_STRUCTURE_ARBITRARY_MACROBLOCKS: u32 = 2; +pub const VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS: u32 = 4; +pub const VA_ENC_SLICE_STRUCTURE_MAX_SLICE_SIZE: u32 = 8; +pub const VA_ENC_SLICE_STRUCTURE_ARBITRARY_ROWS: u32 = 16; +pub const VA_ENC_SLICE_STRUCTURE_EQUAL_MULTI_ROWS: u32 = 32; +pub const VA_ENC_QUANTIZATION_NONE: u32 = 0; +pub const VA_ENC_QUANTIZATION_TRELLIS_SUPPORTED: u32 = 1; +pub const VA_PREDICTION_DIRECTION_PREVIOUS: u32 = 1; +pub const VA_PREDICTION_DIRECTION_FUTURE: u32 = 2; +pub const VA_PREDICTION_DIRECTION_BI_NOT_EMPTY: u32 = 4; +pub const VA_ENC_INTRA_REFRESH_NONE: u32 = 0; +pub const VA_ENC_INTRA_REFRESH_ROLLING_COLUMN: u32 = 1; +pub const VA_ENC_INTRA_REFRESH_ROLLING_ROW: u32 = 2; +pub const VA_ENC_INTRA_REFRESH_ADAPTIVE: u32 = 16; +pub const VA_ENC_INTRA_REFRESH_CYCLIC: u32 = 32; +pub const VA_ENC_INTRA_REFRESH_P_FRAME: u32 = 65536; +pub const VA_ENC_INTRA_REFRESH_B_FRAME: u32 = 131072; +pub const VA_ENC_INTRA_REFRESH_MULTI_REF: u32 = 262144; +pub const VA_PC_CIPHER_AES: u32 = 1; +pub const VA_PC_BLOCK_SIZE_128: u32 = 1; +pub const VA_PC_BLOCK_SIZE_192: u32 = 2; +pub const VA_PC_BLOCK_SIZE_256: u32 = 4; +pub const VA_PC_CIPHER_MODE_ECB: u32 = 1; +pub const VA_PC_CIPHER_MODE_CBC: u32 = 2; +pub const VA_PC_CIPHER_MODE_CTR: u32 = 4; +pub const VA_PC_SAMPLE_TYPE_FULLSAMPLE: u32 = 1; +pub const VA_PC_SAMPLE_TYPE_SUBSAMPLE: u32 = 2; +pub const VA_PC_USAGE_DEFAULT: u32 = 0; +pub const VA_PC_USAGE_WIDEVINE: u32 = 1; +pub const VA_PROCESSING_RATE_NONE: u32 = 0; +pub const VA_PROCESSING_RATE_ENCODE: u32 = 1; +pub const VA_PROCESSING_RATE_DECODE: u32 = 2; +pub const VA_SEGID_BLOCK_16X16: u32 = 0; +pub const VA_SEGID_BLOCK_32X32: u32 = 1; +pub const VA_SEGID_BLOCK_64X64: u32 = 2; +pub const VA_SEGID_BLOCK_8X8: u32 = 3; +pub const VA_ATTRIB_NOT_SUPPORTED: u32 = 2147483648; +pub const VA_INVALID_ID: u32 = 4294967295; +pub const VA_INVALID_SURFACE: u32 = 4294967295; +pub const VA_SURFACE_ATTRIB_NOT_SUPPORTED: u32 = 0; +pub const VA_SURFACE_ATTRIB_GETTABLE: u32 = 1; +pub const VA_SURFACE_ATTRIB_SETTABLE: u32 = 2; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_VA: u32 = 1; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_V4L2: u32 = 2; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR: u32 = 4; +pub const VA_SURFACE_EXTBUF_DESC_ENABLE_TILING: u32 = 1; +pub const VA_SURFACE_EXTBUF_DESC_CACHED: u32 = 2; +pub const VA_SURFACE_EXTBUF_DESC_UNCACHED: u32 = 4; +pub const VA_SURFACE_EXTBUF_DESC_WC: u32 = 8; +pub const VA_SURFACE_EXTBUF_DESC_PROTECTED: u32 = 2147483648; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC: u32 = 0; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_DECODER: u32 = 1; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER: u32 = 2; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ: u32 = 4; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE: u32 = 8; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY: u32 = 16; +pub const VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT: u32 = 32; +pub const VA_PROGRESSIVE: u32 = 1; +pub const VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR: u32 = 1; +pub const VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC: u32 = 2; +pub const VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR: u32 = 4; +pub const VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC: u32 = 8; +pub const VA_SLICE_DATA_FLAG_ALL: u32 = 0; +pub const VA_SLICE_DATA_FLAG_BEGIN: u32 = 1; +pub const VA_SLICE_DATA_FLAG_MIDDLE: u32 = 2; +pub const VA_SLICE_DATA_FLAG_END: u32 = 4; +pub const VA_MB_TYPE_MOTION_FORWARD: u32 = 2; +pub const VA_MB_TYPE_MOTION_BACKWARD: u32 = 4; +pub const VA_MB_TYPE_MOTION_PATTERN: u32 = 8; +pub const VA_MB_TYPE_MOTION_INTRA: u32 = 16; +pub const VA_PICTURE_H264_INVALID: u32 = 1; +pub const VA_PICTURE_H264_TOP_FIELD: u32 = 2; +pub const VA_PICTURE_H264_BOTTOM_FIELD: u32 = 4; +pub const VA_PICTURE_H264_SHORT_TERM_REFERENCE: u32 = 8; +pub const VA_PICTURE_H264_LONG_TERM_REFERENCE: u32 = 16; +pub const VA_CODED_BUF_STATUS_PICTURE_AVE_QP_MASK: u32 = 255; +pub const VA_CODED_BUF_STATUS_LARGE_SLICE_MASK: u32 = 256; +pub const VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK: u32 = 512; +pub const VA_CODED_BUF_STATUS_BITRATE_OVERFLOW: u32 = 1024; +pub const VA_CODED_BUF_STATUS_BITRATE_HIGH: u32 = 2048; +pub const VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW: u32 = 4096; +pub const VA_CODED_BUF_STATUS_BAD_BITSTREAM: u32 = 32768; +pub const VA_CODED_BUF_STATUS_AIR_MB_OVER_THRESHOLD: u32 = 16711680; +pub const VA_CODED_BUF_STATUS_NUMBER_PASSES_MASK: u32 = 251658240; +pub const VA_CODED_BUF_STATUS_SINGLE_NALU: u32 = 268435456; +pub const VA_MAPBUFFER_FLAG_DEFAULT: u32 = 0; +pub const VA_MAPBUFFER_FLAG_READ: u32 = 1; +pub const VA_MAPBUFFER_FLAG_WRITE: u32 = 2; +pub const VA_EXPORT_SURFACE_READ_ONLY: u32 = 1; +pub const VA_EXPORT_SURFACE_WRITE_ONLY: u32 = 2; +pub const VA_EXPORT_SURFACE_READ_WRITE: u32 = 3; +pub const VA_EXPORT_SURFACE_SEPARATE_LAYERS: u32 = 4; +pub const VA_EXPORT_SURFACE_COMPOSED_LAYERS: u32 = 8; +pub const VA_TIMEOUT_INFINITE: i32 = -1; +pub const VA_FOURCC_NV12: u32 = 842094158; +pub const VA_FOURCC_NV21: u32 = 825382478; +pub const VA_FOURCC_AI44: u32 = 875839817; +pub const VA_FOURCC_RGBA: u32 = 1094862674; +pub const VA_FOURCC_RGBX: u32 = 1480738642; +pub const VA_FOURCC_BGRA: u32 = 1095911234; +pub const VA_FOURCC_BGRX: u32 = 1481787202; +pub const VA_FOURCC_ARGB: u32 = 1111970369; +pub const VA_FOURCC_XRGB: u32 = 1111970392; +pub const VA_FOURCC_ABGR: u32 = 1380401729; +pub const VA_FOURCC_XBGR: u32 = 1380401752; +pub const VA_FOURCC_UYVY: u32 = 1498831189; +pub const VA_FOURCC_YUY2: u32 = 844715353; +pub const VA_FOURCC_AYUV: u32 = 1448433985; +pub const VA_FOURCC_NV11: u32 = 825316942; +pub const VA_FOURCC_YV12: u32 = 842094169; +pub const VA_FOURCC_P208: u32 = 942682704; +pub const VA_FOURCC_I420: u32 = 808596553; +pub const VA_FOURCC_YV24: u32 = 875714137; +pub const VA_FOURCC_YV32: u32 = 842225241; +pub const VA_FOURCC_Y800: u32 = 808466521; +pub const VA_FOURCC_IMC3: u32 = 860048713; +pub const VA_FOURCC_411P: u32 = 1345401140; +pub const VA_FOURCC_411R: u32 = 1378955572; +pub const VA_FOURCC_422H: u32 = 1211249204; +pub const VA_FOURCC_422V: u32 = 1446130228; +pub const VA_FOURCC_444P: u32 = 1345598516; +pub const VA_FOURCC_RGBP: u32 = 1346520914; +pub const VA_FOURCC_BGRP: u32 = 1347569474; +pub const VA_FOURCC_RGB565: u32 = 909199186; +pub const VA_FOURCC_BGR565: u32 = 909199170; +pub const VA_FOURCC_Y210: u32 = 808530521; +pub const VA_FOURCC_Y212: u32 = 842084953; +pub const VA_FOURCC_Y216: u32 = 909193817; +pub const VA_FOURCC_Y410: u32 = 808531033; +pub const VA_FOURCC_Y412: u32 = 842085465; +pub const VA_FOURCC_Y416: u32 = 909194329; +pub const VA_FOURCC_YV16: u32 = 909203033; +pub const VA_FOURCC_P010: u32 = 808530000; +pub const VA_FOURCC_P012: u32 = 842084432; +pub const VA_FOURCC_P016: u32 = 909193296; +pub const VA_FOURCC_I010: u32 = 808529993; +pub const VA_FOURCC_IYUV: u32 = 1448433993; +pub const VA_FOURCC_A2R10G10B10: u32 = 808669761; +pub const VA_FOURCC_A2B10G10R10: u32 = 808665665; +pub const VA_FOURCC_X2R10G10B10: u32 = 808669784; +pub const VA_FOURCC_X2B10G10R10: u32 = 808665688; +pub const VA_FOURCC_Y8: u32 = 538982489; +pub const VA_FOURCC_Y16: u32 = 540422489; +pub const VA_FOURCC_VYUY: u32 = 1498765654; +pub const VA_FOURCC_YVYU: u32 = 1431918169; +pub const VA_FOURCC_ARGB64: u32 = 877089345; +pub const VA_FOURCC_ABGR64: u32 = 877085249; +pub const VA_FOURCC_XYUV: u32 = 1448434008; +pub const VA_FOURCC_Q416: u32 = 909194321; +pub const VA_LSB_FIRST: u32 = 1; +pub const VA_MSB_FIRST: u32 = 2; +pub const VA_SUBPICTURE_CHROMA_KEYING: u32 = 1; +pub const VA_SUBPICTURE_GLOBAL_ALPHA: u32 = 2; +pub const VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD: u32 = 4; +pub const VA_ROTATION_NONE: u32 = 0; +pub const VA_ROTATION_90: u32 = 1; +pub const VA_ROTATION_180: u32 = 2; +pub const VA_ROTATION_270: u32 = 3; +pub const VA_MIRROR_NONE: u32 = 0; +pub const VA_MIRROR_HORIZONTAL: u32 = 1; +pub const VA_MIRROR_VERTICAL: u32 = 2; +pub const VA_OOL_DEBLOCKING_FALSE: u32 = 0; +pub const VA_OOL_DEBLOCKING_TRUE: u32 = 1; +pub const VA_RENDER_MODE_UNDEFINED: u32 = 0; +pub const VA_RENDER_MODE_LOCAL_OVERLAY: u32 = 1; +pub const VA_RENDER_MODE_LOCAL_GPU: u32 = 2; +pub const VA_RENDER_MODE_EXTERNAL_OVERLAY: u32 = 4; +pub const VA_RENDER_MODE_EXTERNAL_GPU: u32 = 8; +pub const VA_RENDER_DEVICE_UNDEFINED: u32 = 0; +pub const VA_RENDER_DEVICE_LOCAL: u32 = 1; +pub const VA_RENDER_DEVICE_EXTERNAL: u32 = 2; +pub const VA_DISPLAY_ATTRIB_NOT_SUPPORTED: u32 = 0; +pub const VA_DISPLAY_ATTRIB_GETTABLE: u32 = 1; +pub const VA_DISPLAY_ATTRIB_SETTABLE: u32 = 2; +pub const VA_PICTURE_HEVC_INVALID: u32 = 1; +pub const VA_PICTURE_HEVC_FIELD_PIC: u32 = 2; +pub const VA_PICTURE_HEVC_BOTTOM_FIELD: u32 = 4; +pub const VA_PICTURE_HEVC_LONG_TERM_REFERENCE: u32 = 8; +pub const VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE: u32 = 16; +pub const VA_PICTURE_HEVC_RPS_ST_CURR_AFTER: u32 = 32; +pub const VA_PICTURE_HEVC_RPS_LT_CURR: u32 = 64; +pub const VA_PICTURE_VVC_INVALID: u32 = 1; +pub const VA_PICTURE_VVC_LONG_TERM_REFERENCE: u32 = 2; +pub const VA_PICTURE_VVC_UNAVAILABLE_REFERENCE: u32 = 4; +pub const VA_FEI_FUNCTION_ENC: u32 = 1; +pub const VA_FEI_FUNCTION_PAK: u32 = 2; +pub const VA_FEI_FUNCTION_ENC_PAK: u32 = 4; +pub const VA_PICTURE_STATS_INVALID: u32 = 1; +pub const VA_PICTURE_STATS_PROGRESSIVE: u32 = 0; +pub const VA_PICTURE_STATS_TOP_FIELD: u32 = 2; +pub const VA_PICTURE_STATS_BOTTOM_FIELD: u32 = 4; +pub const VA_PICTURE_STATS_CONTENT_UPDATED: u32 = 16; +pub const VA_MB_PRED_AVAIL_TOP_LEFT: u32 = 4; +pub const VA_MB_PRED_AVAIL_TOP: u32 = 16; +pub const VA_MB_PRED_AVAIL_TOP_RIGHT: u32 = 8; +pub const VA_MB_PRED_AVAIL_LEFT: u32 = 64; +pub const VA_AV1_MAX_SEGMENTS: u32 = 8; +pub const VA_AV1_SEG_LVL_MAX: u32 = 8; +pub const VA_BLEND_GLOBAL_ALPHA: u32 = 1; +pub const VA_BLEND_PREMULTIPLIED_ALPHA: u32 = 2; +pub const VA_BLEND_LUMA_KEY: u32 = 16; +pub const VA_PROC_PIPELINE_SUBPICTURES: u32 = 1; +pub const VA_PROC_PIPELINE_FAST: u32 = 2; +pub const VA_PROC_FILTER_MANDATORY: u32 = 1; +pub const VA_PIPELINE_FLAG_END: u32 = 4; +pub const VA_CHROMA_SITING_UNKNOWN: u32 = 0; +pub const VA_CHROMA_SITING_VERTICAL_TOP: u32 = 1; +pub const VA_CHROMA_SITING_VERTICAL_CENTER: u32 = 2; +pub const VA_CHROMA_SITING_VERTICAL_BOTTOM: u32 = 3; +pub const VA_CHROMA_SITING_HORIZONTAL_LEFT: u32 = 4; +pub const VA_CHROMA_SITING_HORIZONTAL_CENTER: u32 = 8; +pub const VA_SOURCE_RANGE_UNKNOWN: u32 = 0; +pub const VA_SOURCE_RANGE_REDUCED: u32 = 1; +pub const VA_SOURCE_RANGE_FULL: u32 = 2; +pub const VA_TONE_MAPPING_HDR_TO_HDR: u32 = 1; +pub const VA_TONE_MAPPING_HDR_TO_SDR: u32 = 2; +pub const VA_TONE_MAPPING_HDR_TO_EDR: u32 = 4; +pub const VA_TONE_MAPPING_SDR_TO_HDR: u32 = 8; +pub const VA_DEINTERLACING_BOTTOM_FIELD_FIRST: u32 = 1; +pub const VA_DEINTERLACING_BOTTOM_FIELD: u32 = 2; +pub const VA_DEINTERLACING_ONE_FIELD: u32 = 4; +pub const VA_DEINTERLACING_FMD_ENABLE: u32 = 8; +pub const VA_DEINTERLACING_SCD_ENABLE: u32 = 16; +pub const VA_PROC_HVS_DENOISE_DEFAULT: u32 = 0; +pub const VA_PROC_HVS_DENOISE_AUTO_BDRATE: u32 = 1; +pub const VA_PROC_HVS_DENOISE_AUTO_SUBJECTIVE: u32 = 2; +pub const VA_PROC_HVS_DENOISE_MANUAL: u32 = 3; +pub const VA_3DLUT_CHANNEL_UNKNOWN: u32 = 0; +pub const VA_3DLUT_CHANNEL_RGB_RGB: u32 = 1; +pub const VA_3DLUT_CHANNEL_YUV_RGB: u32 = 2; +pub const VA_3DLUT_CHANNEL_VUY_RGB: u32 = 4; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM: u32 = 268435456; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME: u32 = 536870912; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2: u32 = 1073741824; +pub const VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3: u32 = 134217728; +#[doc = "Overview\n\nThe VA API is intended to provide an interface between a video decode/encode/processing\napplication (client) and a hardware accelerator (server), to off-load\nvideo decode/encode/processing operations from the host to the hardware accelerator at various\nentry-points.\n\nThe basic operation steps are:\n\n- Negotiate a mutually acceptable configuration with the server to lock\ndown profile, entrypoints, and other attributes that will not change on\na frame-by-frame basis.\n- Create a video decode, encode or processing context which represents a\n\"virtualized\" hardware device\n- Get and fill the render buffers with the corresponding data (depending on\nprofiles and entrypoints)\n- Pass the render buffers to the server to handle the current frame\n\nInitialization & Configuration Management\n\n- Find out supported profiles\n- Find out entrypoints for a given profile\n- Find out configuration attributes for a given profile/entrypoint pair\n- Create a configuration for use by the application"] +pub type VADisplay = *mut ::std::os::raw::c_void; +pub type VAStatus = ::std::os::raw::c_int; +#[doc = " \\brief Structure to describe rectangle."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VARectangle { + pub x: i16, + pub y: i16, + pub width: u16, + pub height: u16, +} +#[doc = " \\brief Structure to describe rectangle."] +pub type VARectangle = _VARectangle; +#[doc = " \\brief Generic motion vector data structure."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAMotionVector { + #[doc = " \\brief Past reference\n\n - \\c [0]: horizontal motion vector for past reference\n - \\c [1]: vertical motion vector for past reference"] + pub mv0: [i16; 2usize], + #[doc = " \\brief Future reference\n\n - \\c [0]: horizontal motion vector for future reference\n - \\c [1]: vertical motion vector for future reference"] + pub mv1: [i16; 2usize], +} +#[doc = " \\brief Generic motion vector data structure."] +pub type VAMotionVector = _VAMotionVector; +#[doc = " Type of a message callback, used for both error and info log."] +pub type VAMessageCallback = ::std::option::Option< + unsafe extern "C" fn(user_context: *mut ::std::os::raw::c_void, message: *const ::std::os::raw::c_char), +>; +pub type VAPrivFunc = ::std::option::Option ::std::os::raw::c_int>; +pub mod VAProfile { + #[doc = " Currently defined profiles"] + pub type Type = ::std::os::raw::c_int; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileNone: Type = -1; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileMPEG2Simple: Type = 0; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileMPEG2Main: Type = 1; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileMPEG4Simple: Type = 2; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileMPEG4AdvancedSimple: Type = 3; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileMPEG4Main: Type = 4; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264Baseline: Type = 5; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264Main: Type = 6; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264High: Type = 7; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVC1Simple: Type = 8; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVC1Main: Type = 9; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVC1Advanced: Type = 10; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH263Baseline: Type = 11; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileJPEGBaseline: Type = 12; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264ConstrainedBaseline: Type = 13; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVP8Version0_3: Type = 14; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264MultiviewHigh: Type = 15; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileH264StereoHigh: Type = 16; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain: Type = 17; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain10: Type = 18; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVP9Profile0: Type = 19; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVP9Profile1: Type = 20; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVP9Profile2: Type = 21; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileVP9Profile3: Type = 22; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain12: Type = 23; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain422_10: Type = 24; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain422_12: Type = 25; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain444: Type = 26; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain444_10: Type = 27; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCMain444_12: Type = 28; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCSccMain: Type = 29; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCSccMain10: Type = 30; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCSccMain444: Type = 31; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileAV1Profile0: Type = 32; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileAV1Profile1: Type = 33; + #[doc = " \\brief Profile ID used for video processing."] + pub const VAProfileHEVCSccMain444_10: Type = 34; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileProtected: Type = 35; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileH264High10: Type = 36; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileVVCMain10: Type = 37; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileVVCMultilayerMain10: Type = 38; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileAV1Profile2: Type = 39; + #[doc = " \\brief Profile ID used for protected video playback."] + pub const VAProfileH264High422: Type = 40; +} +pub mod VAEntrypoint { + #[doc = " Currently defined entrypoints"] + pub type Type = ::std::os::raw::c_uint; + pub const VAEntrypointVLD: Type = 1; + pub const VAEntrypointIZZ: Type = 2; + pub const VAEntrypointIDCT: Type = 3; + pub const VAEntrypointMoComp: Type = 4; + pub const VAEntrypointDeblocking: Type = 5; + pub const VAEntrypointEncSlice: Type = 6; + pub const VAEntrypointEncPicture: Type = 7; + pub const VAEntrypointEncSliceLP: Type = 8; + #[doc = "< Video pre/post-processing."] + pub const VAEntrypointVideoProc: Type = 10; + #[doc = " \\brief VAEntrypointFEI\n\n The purpose of FEI (Flexible Encoding Infrastructure) is to allow applications to\n have more controls and trade off quality for speed with their own IPs.\n The application can optionally provide input to ENC for extra encode control\n and get the output from ENC. Application can chose to modify the ENC\n output/PAK input during encoding, but the performance impact is significant.\n\n On top of the existing buffers for normal encode, there will be\n one extra input buffer (VAEncMiscParameterFEIFrameControl) and\n three extra output buffers (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType\n and VAEncFEIDistortionBufferType) for VAEntrypointFEI entry function.\n If separate PAK is set, two extra input buffers\n (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType) are needed for PAK input."] + pub const VAEntrypointFEI: Type = 11; + #[doc = " \\brief VAEntrypointStats\n\n A pre-processing function for getting some statistics and motion vectors is added,\n and some extra controls for Encode pipeline are provided. The application can\n optionally call the statistics function to get motion vectors and statistics like\n variances, distortions before calling Encode function via this entry point.\n\n Checking whether Statistics is supported can be performed with vaQueryConfigEntrypoints().\n If Statistics entry point is supported, then the list of returned entry-points will\n include #VAEntrypointStats. Supported pixel format, maximum resolution and statistics\n specific attributes can be obtained via normal attribute query. One input buffer\n (VAStatsStatisticsParameterBufferType) and one or two output buffers\n (VAStatsStatisticsBufferType, VAStatsStatisticsBottomFieldBufferType (for interlace only)\n and VAStatsMVBufferType) are needed for this entry point."] + pub const VAEntrypointStats: Type = 12; + #[doc = " \\brief VAEntrypointProtectedTEEComm\n\n A function for communicating with TEE (Trusted Execution Environment)."] + pub const VAEntrypointProtectedTEEComm: Type = 13; + #[doc = " \\brief VAEntrypointProtectedContent\n\n A function for protected content to decrypt encrypted content."] + pub const VAEntrypointProtectedContent: Type = 14; +} +pub mod VAConfigAttribType { + #[doc = " Currently defined configuration attribute types"] + pub type Type = ::std::os::raw::c_uint; + pub const VAConfigAttribRTFormat: Type = 0; + pub const VAConfigAttribSpatialResidual: Type = 1; + pub const VAConfigAttribSpatialClipping: Type = 2; + pub const VAConfigAttribIntraResidual: Type = 3; + pub const VAConfigAttribEncryption: Type = 4; + pub const VAConfigAttribRateControl: Type = 5; + #[doc = " @name Attributes for decoding */\n/**@{*/\n/**\n \\brief Slice Decoding mode. Read/write.\n\n This attribute determines what mode the driver supports for slice\n decoding, through vaGetConfigAttributes(); and what mode the user\n will be providing to the driver, through vaCreateConfig(), if the\n driver supports those. If this attribute is not set by the user then\n it is assumed that VA_DEC_SLICE_MODE_NORMAL mode is used.\n\n See \\c VA_DEC_SLICE_MODE_xxx for the list of slice decoding modes."] + pub const VAConfigAttribDecSliceMode: Type = 6; + #[doc = " \\brief JPEG decoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n JPEG implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValDecJPEG union."] + pub const VAConfigAttribDecJPEG: Type = 7; + #[doc = " \\brief Decode processing support. Read/write.\n\n This attribute determines if the driver supports video processing\n with decoding using the decoding context in a single call, through\n vaGetConfigAttributes(); and if the user may use this feature,\n through vaCreateConfig(), if the driver supports the user scenario.\n The user will essentially create a regular decode VAContext. Therefore,\n the parameters of vaCreateContext() such as picture_width, picture_height\n and render_targets are in relation to the decode output parameters\n (not processing output parameters) as normal.\n If this attribute is not set by the user then it is assumed that no\n extra processing is done after decoding for this decode context.\n\n Since essentially the application is creating a decoder config and context,\n all function calls that take in the config (e.g. vaQuerySurfaceAttributes())\n or context are in relation to the decoder, except those video processing\n function specified in the next paragraph.\n\n Once the decode config and context are created, the user must further\n query the supported processing filters using vaQueryVideoProcFilters(),\n vaQueryVideoProcFilterCaps(), vaQueryVideoProcPipelineCaps() by specifying\n the created decode context. The user must provide processing information\n and extra processing output surfaces as \"additional_outputs\" to the driver\n through VAProcPipelineParameterBufferType. The render_target specified\n at vaBeginPicture() time refers to the decode output surface. The\n target surface for the output of processing needs to be a different\n surface since the decode process requires the original reconstructed buffer.\n The \"surface\" member of VAProcPipelineParameterBuffer should be set to the\n same as \"render_target\" set in vaBeginPicture(), but the driver may choose\n to ignore this parameter."] + pub const VAConfigAttribDecProcessing: Type = 8; + #[doc = " @name Attributes for encoding */\n/**@{*/\n/**\n \\brief Packed headers mode. Read/write.\n\n This attribute determines what packed headers the driver supports,\n through vaGetConfigAttributes(); and what packed headers the user\n will be providing to the driver, through vaCreateConfig(), if the\n driver supports those.\n\n See \\c VA_ENC_PACKED_HEADER_xxx for the list of packed headers."] + pub const VAConfigAttribEncPackedHeaders: Type = 10; + #[doc = " \\brief Interlaced mode. Read/write.\n\n This attribute determines what kind of interlaced encoding mode\n the driver supports.\n\n See \\c VA_ENC_INTERLACED_xxx for the list of interlaced modes."] + pub const VAConfigAttribEncInterlaced: Type = 11; + #[doc = " \\brief Maximum number of reference frames. Read-only.\n\n This attribute determines the maximum number of reference\n frames supported for encoding.\n\n Note: for H.264 encoding, the value represents the maximum number\n of reference frames for both the reference picture list 0 (bottom\n 16 bits) and the reference picture list 1 (top 16 bits)."] + pub const VAConfigAttribEncMaxRefFrames: Type = 13; + #[doc = " \\brief Maximum number of slices per frame. Read-only.\n\n This attribute determines the maximum number of slices the\n driver can support to encode a single frame."] + pub const VAConfigAttribEncMaxSlices: Type = 14; + #[doc = " \\brief Slice structure. Read-only.\n\n This attribute determines slice structures supported by the\n driver for encoding. This attribute is a hint to the user so\n that he can choose a suitable surface size and how to arrange\n the encoding process of multiple slices per frame.\n\n More specifically, for H.264 encoding, this attribute\n determines the range of accepted values to\n VAEncSliceParameterBufferH264::macroblock_address and\n VAEncSliceParameterBufferH264::num_macroblocks.\n\n See \\c VA_ENC_SLICE_STRUCTURE_xxx for the supported slice\n structure types."] + pub const VAConfigAttribEncSliceStructure: Type = 15; + #[doc = " \\brief Macroblock information. Read-only.\n\n This attribute determines whether the driver supports extra\n encoding information per-macroblock. e.g. QP.\n\n More specifically, for H.264 encoding, if the driver returns a non-zero\n value for this attribute, this means the application can create\n additional #VAEncMacroblockParameterBufferH264 buffers referenced\n through VAEncSliceParameterBufferH264::macroblock_info."] + pub const VAConfigAttribEncMacroblockInfo: Type = 16; + #[doc = " \\brief Maximum picture width. Read-only.\n\n This attribute determines the maximum picture width the driver supports\n for a given configuration."] + pub const VAConfigAttribMaxPictureWidth: Type = 18; + #[doc = " \\brief Maximum picture height. Read-only.\n\n This attribute determines the maximum picture height the driver supports\n for a given configuration."] + pub const VAConfigAttribMaxPictureHeight: Type = 19; + #[doc = " \\brief JPEG encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n JPEG implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncJPEG union."] + pub const VAConfigAttribEncJPEG: Type = 20; + #[doc = " \\brief Encoding quality range attribute. Read-only.\n\n This attribute conveys whether the driver supports different quality level settings\n for encoding. A value less than or equal to 1 means that the encoder only has a single\n quality setting, and a value greater than 1 represents the number of quality levels\n that can be configured. e.g. a value of 2 means there are two distinct quality levels."] + pub const VAConfigAttribEncQualityRange: Type = 21; + #[doc = " \\brief Encoding quantization attribute. Read-only.\n\n This attribute conveys whether the driver supports certain types of quantization methods\n for encoding (e.g. trellis). See \\c VA_ENC_QUANTIZATION_xxx for the list of quantization methods"] + pub const VAConfigAttribEncQuantization: Type = 22; + #[doc = " \\brief Encoding intra refresh attribute. Read-only.\n\n This attribute conveys whether the driver supports certain types of intra refresh methods\n for encoding (e.g. adaptive intra refresh or rolling intra refresh).\n See \\c VA_ENC_INTRA_REFRESH_xxx for intra refresh methods"] + pub const VAConfigAttribEncIntraRefresh: Type = 23; + #[doc = " \\brief Encoding skip frame attribute. Read-only.\n\n This attribute conveys whether the driver supports sending skip frame parameters\n (VAEncMiscParameterTypeSkipFrame) to the encoder's rate control, when the user has\n externally skipped frames."] + pub const VAConfigAttribEncSkipFrame: Type = 24; + #[doc = " \\brief Encoding region-of-interest (ROI) attribute. Read-only.\n\n This attribute conveys whether the driver supports region-of-interest (ROI) encoding,\n based on user provided ROI rectangles. The attribute value is partitioned into fields\n as defined in the VAConfigAttribValEncROI union.\n\n If ROI encoding is supported, the ROI information is passed to the driver using\n VAEncMiscParameterTypeROI."] + pub const VAConfigAttribEncROI: Type = 25; + #[doc = " \\brief Encoding extended rate control attribute. Read-only.\n\n This attribute conveys whether the driver supports any extended rate control features\n The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncRateControlExt union."] + pub const VAConfigAttribEncRateControlExt: Type = 26; + #[doc = " \\brief Processing rate reporting attribute. Read-only.\n\n This attribute conveys whether the driver supports reporting of\n encode/decode processing rate based on certain set of parameters\n (i.e. levels, I frame internvals) for a given configuration.\n If this is supported, vaQueryProcessingRate() can be used to get\n encode or decode processing rate.\n See \\c VA_PROCESSING_RATE_xxx for encode/decode processing rate"] + pub const VAConfigAttribProcessingRate: Type = 27; + #[doc = " \\brief Encoding dirty rectangle. Read-only.\n\n This attribute conveys whether the driver supports dirty rectangle.\n encoding, based on user provided ROI rectangles which indicate the rectangular areas\n where the content has changed as compared to the previous picture. The regions of the\n picture that are not covered by dirty rect rectangles are assumed to have not changed\n compared to the previous picture. The encoder may do some optimizations based on\n this information. The attribute value returned indicates the number of regions that\n are supported. e.g. A value of 0 means dirty rect encoding is not supported. If dirty\n rect encoding is supported, the ROI information is passed to the driver using\n VAEncMiscParameterTypeDirtyRect."] + pub const VAConfigAttribEncDirtyRect: Type = 28; + #[doc = " \\brief Parallel Rate Control (hierachical B) attribute. Read-only.\n\n This attribute conveys whether the encoder supports parallel rate control.\n It is a integer value 0 - unsupported, > 0 - maximum layer supported.\n This is the way when hireachical B frames are encoded, multiple independent B frames\n on the same layer may be processed at same time. If supported, app may enable it by\n setting enable_parallel_brc in VAEncMiscParameterRateControl,and the number of B frames\n per layer per GOP will be passed to driver through VAEncMiscParameterParallelRateControl\n structure.Currently three layers are defined."] + pub const VAConfigAttribEncParallelRateControl: Type = 29; + #[doc = " \\brief Dynamic Scaling Attribute. Read-only.\n\n This attribute conveys whether encoder is capable to determine dynamic frame\n resolutions adaptive to bandwidth utilization and processing power, etc.\n It is a boolean value 0 - unsupported, 1 - supported.\n If it is supported,for VP9, suggested frame resolution can be retrieved from VACodedBufferVP9Status."] + pub const VAConfigAttribEncDynamicScaling: Type = 30; + #[doc = " \\brief frame size tolerance support\n it indicates the tolerance of frame size"] + pub const VAConfigAttribFrameSizeToleranceSupport: Type = 31; + #[doc = " \\brief Encode function type for FEI.\n\n This attribute conveys whether the driver supports different function types for encode.\n It can be VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, or VA_FEI_FUNCTION_ENC_PAK. Currently\n it is for FEI entry point only.\n Default is VA_FEI_FUNCTION_ENC_PAK."] + pub const VAConfigAttribFEIFunctionType: Type = 32; + #[doc = " \\brief Maximum number of FEI MV predictors. Read-only.\n\n This attribute determines the maximum number of MV predictors the driver\n can support to encode a single frame. 0 means no MV predictor is supported.\n Currently it is for FEI entry point only."] + pub const VAConfigAttribFEIMVPredictors: Type = 33; + #[doc = " \\brief Statistics attribute. Read-only.\n\n This attribute exposes a number of capabilities of the VAEntrypointStats entry\n point. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValStats union. Currently it is for VAEntrypointStats only."] + pub const VAConfigAttribStats: Type = 34; + #[doc = " \\brief Tile Support Attribute. Read-only.\n\n This attribute conveys whether encoder is capable to support tiles.\n If not supported, the tile related parameters sent to encoder, such as\n tiling structure, should be ignored. 0 - unsupported, 1 - supported."] + pub const VAConfigAttribEncTileSupport: Type = 35; + #[doc = " \\brief whether accept rouding setting from application. Read-only.\n This attribute is for encode quality, if it is report,\n application can change the rounding setting by VAEncMiscParameterTypeCustomRoundingControl"] + pub const VAConfigAttribCustomRoundingControl: Type = 36; + #[doc = " \\brief Encoding QP info block size attribute. Read-only.\n This attribute conveys the block sizes that underlying driver\n support for QP info for buffer #VAEncQpBuffer."] + pub const VAConfigAttribQPBlockSize: Type = 37; + #[doc = " \\brief encode max frame size attribute. Read-only\n attribute value \\c VAConfigAttribValMaxFrameSize represent max frame size support"] + pub const VAConfigAttribMaxFrameSize: Type = 38; + #[doc = " \\brief inter frame prediction directrion attribute. Read-only.\n this attribute conveys the prediction direction (backward or forword) for specific config\n the value could be VA_PREDICTION_DIRECTION_XXXX. it can be combined with VAConfigAttribEncMaxRefFrames\n to describe reference list , and the prediction direction. if this attrib is not present,both direction\n should be supported, no restriction.\n for example: normal HEVC encoding , maximum reference frame number in reflist 0 and reflist 1 is deduced\n by VAConfigAttribEncMaxRefFrames. so there are typical P frame, B frame,\n if VAConfigAttribPredictionDirection is also present. it will stipulate prediction direction in both\n reference list. if only one prediction direction present(such as PREVIOUS),all reference frame should be\n previous frame (PoC < current)."] + pub const VAConfigAttribPredictionDirection: Type = 39; + #[doc = " \\brief combined submission of multiple frames from different streams, it is optimization for different HW\n implementation, multiple frames encode/decode can improve HW concurrency"] + pub const VAConfigAttribMultipleFrame: Type = 40; + #[doc = " \\brief priority setting for the context. Read-Write\n attribute value is \\c VAConfigAttribValContextPriority\n this setting also could be update by \\c VAContextParameterUpdateBuffer"] + pub const VAConfigAttribContextPriority: Type = 41; + #[doc = " \\brief AV1 decoding features. Read-only.\n\n This attribute describes the supported features of an\n AV1 decoder configuration. The value returned uses the\n VAConfigAttribValDecAV1Features type."] + pub const VAConfigAttribDecAV1Features: Type = 42; + #[doc = " \\brief TEE could be any HW secure device. Read-only"] + pub const VAConfigAttribTEEType: Type = 43; + #[doc = " \\brief TEE type client is a specific module supporting specific functions in TEE. Read-only"] + pub const VAConfigAttribTEETypeClient: Type = 44; + #[doc = " \\brief Cipher algorithm of the protected content session.\n\n This attribute specifies the cipher algorithm of the protected content session. It\n could be \\c VA_PC_CIPHER_AES, etc...."] + pub const VAConfigAttribProtectedContentCipherAlgorithm: Type = 45; + #[doc = " \\brief Cipher block size of the protected content session.\n\n This attribute specifies the block size of the protected content session. It could be\n \\c VA_PC_BLOCK_SIZE_128, \\c VA_PC_BLOCK_SIZE_192, or \\c VA_PC_BLOCK_SIZE_256, etc...."] + pub const VAConfigAttribProtectedContentCipherBlockSize: Type = 46; + #[doc = " \\brief Cipher mode of the protected content session.\n\n This attribute specifies the cipher mode of the protected content session. It could\n be \\c VA_PC_CIPHER_MODE_ECB, \\c VA_PC_CIPHER_MODE_CBC, \\c VA_PC_CIPHER_MODE_CTR, etc..."] + pub const VAConfigAttribProtectedContentCipherMode: Type = 47; + #[doc = " \\brief Decryption sample type of the protected content session.\n\n This attribute specifies the decryption sample type of the protected content session.\n It could be \\c VA_PC_SAMPLE_TYPE_FULLSAMPLE or \\c VA_PC_SAMPLE_TYPE_SUBSAMPLE."] + pub const VAConfigAttribProtectedContentCipherSampleType: Type = 48; + #[doc = " \\brief Special usage attribute of the protected session.\n\n The attribute specifies the flow for the protected session could be used. For\n example, it could be \\c VA_PC_USAGE_DEFAULT, \\c VA_PC_USAGE_WIDEVINE, etc...."] + pub const VAConfigAttribProtectedContentUsage: Type = 49; + #[doc = " \\brief HEVC/H.265 encoding features. Read-only.\n\n This attribute describes the supported features of an\n HEVC/H.265 encoder configuration. The value returned uses the\n VAConfigAttribValEncHEVCFeatures type.\n\n If this attribute is supported by a driver then it must also\n support the VAConfigAttribEncHEVCBlockSizes attribute."] + pub const VAConfigAttribEncHEVCFeatures: Type = 50; + #[doc = " \\brief HEVC/H.265 encoding block sizes. Read-only.\n\n This attribute describes the supported coding tree and transform\n block sizes of an HEVC/H.265 encoder configuration. The value\n returned uses the VAConfigAttribValEncHEVCBlockSizes type.\n\n If this attribute is supported by a driver then it must also\n support the VAConfigAttribEncHEVCFeatures attribute."] + pub const VAConfigAttribEncHEVCBlockSizes: Type = 51; + #[doc = " \\brief AV1 encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1 union."] + pub const VAConfigAttribEncAV1: Type = 52; + #[doc = " \\brief AV1 encoding attribute extend1. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1Ext1 union."] + pub const VAConfigAttribEncAV1Ext1: Type = 53; + #[doc = " \\brief AV1 encoding attribute extend2. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1Ext2 union."] + pub const VAConfigAttribEncAV1Ext2: Type = 54; + #[doc = " \\brief Settings per block attribute for Encoding. Read-only.\n\n This attribute describes whether to support delta qp per block,\n the supported size of delta qp block and the size of delta QP in bytes.\n The value returned uses the VAConfigAttribValEncPerBlockControl type."] + pub const VAConfigAttribEncPerBlockControl: Type = 55; + #[doc = " \\brief Maximum number of tile rows. Read-only.\n\n This attribute determines the maximum number of tile\n rows supported for encoding with tile support."] + pub const VAConfigAttribEncMaxTileRows: Type = 56; + #[doc = " \\brief Maximum number of tile cols. Read-only.\n\n This attribute determines the maximum number of tile\n columns supported for encoding with tile support."] + pub const VAConfigAttribEncMaxTileCols: Type = 57; + #[doc = " \\brief VP9 encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n VP9 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncVP9 union."] + pub const VAConfigAttribEncVP9: Type = 58; + #[doc = "@}"] + pub const VAConfigAttribTypeMax: Type = 59; +} +#[doc = " Configuration attributes\n If there is more than one value for an attribute, a default\n value will be assigned to the attribute if the client does not\n specify the attribute when creating a configuration"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttrib { + pub type_: VAConfigAttribType::Type, + pub value: u32, +} +impl Default for _VAConfigAttrib { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " Configuration attributes\n If there is more than one value for an attribute, a default\n value will be assigned to the attribute if the client does not\n specify the attribute when creating a configuration"] +pub type VAConfigAttrib = _VAConfigAttrib; +#[doc = " @name Attribute values for VAConfigAttribDecJPEG */\n/**@{"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValDecJPEG { + pub bits: _VAConfigAttribValDecJPEG__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValDecJPEG__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAConfigAttribValDecJPEG__bindgen_ty_1 { + #[inline] + pub fn rotation(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } + } + #[inline] + pub fn set_rotation(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn rotation_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_rotation_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn crop(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_crop(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn crop_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_crop_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 27u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(rotation: u32, crop: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let rotation: u32 = unsafe { ::std::mem::transmute(rotation) }; + rotation as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let crop: u32 = unsafe { ::std::mem::transmute(crop) }; + crop as u64 + }); + __bindgen_bitfield_unit.set(5usize, 27u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValDecJPEG { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " @name Attribute values for VAConfigAttribDecJPEG */\n/**@{"] +pub type VAConfigAttribValDecJPEG = _VAConfigAttribValDecJPEG; +#[doc = " \\brief Attribute value for VAConfigAttribEncJPEG"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValEncJPEG { + pub bits: _VAConfigAttribValEncJPEG__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValEncJPEG__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAConfigAttribValEncJPEG__bindgen_ty_1 { + #[inline] + pub fn arithmatic_coding_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_arithmatic_coding_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn arithmatic_coding_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_arithmatic_coding_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn progressive_dct_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_progressive_dct_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn progressive_dct_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_progressive_dct_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn non_interleaved_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_non_interleaved_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn non_interleaved_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_non_interleaved_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn differential_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_differential_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn differential_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_differential_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn max_num_components(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u32) } + } + #[inline] + pub fn set_max_num_components(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn max_num_components_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_num_components_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn max_num_scans(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 4u8) as u32) } + } + #[inline] + pub fn set_max_num_scans(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn max_num_scans_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_num_scans_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn max_num_huffman_tables(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u32) } + } + #[inline] + pub fn set_max_num_huffman_tables(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn max_num_huffman_tables_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_num_huffman_tables_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn max_num_quantization_tables(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 3u8) as u32) } + } + #[inline] + pub fn set_max_num_quantization_tables(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn max_num_quantization_tables_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_num_quantization_tables_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + arithmatic_coding_mode: u32, + progressive_dct_mode: u32, + non_interleaved_mode: u32, + differential_mode: u32, + max_num_components: u32, + max_num_scans: u32, + max_num_huffman_tables: u32, + max_num_quantization_tables: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let arithmatic_coding_mode: u32 = unsafe { ::std::mem::transmute(arithmatic_coding_mode) }; + arithmatic_coding_mode as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let progressive_dct_mode: u32 = unsafe { ::std::mem::transmute(progressive_dct_mode) }; + progressive_dct_mode as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let non_interleaved_mode: u32 = unsafe { ::std::mem::transmute(non_interleaved_mode) }; + non_interleaved_mode as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let differential_mode: u32 = unsafe { ::std::mem::transmute(differential_mode) }; + differential_mode as u64 + }); + __bindgen_bitfield_unit.set(4usize, 3u8, { + let max_num_components: u32 = unsafe { ::std::mem::transmute(max_num_components) }; + max_num_components as u64 + }); + __bindgen_bitfield_unit.set(7usize, 4u8, { + let max_num_scans: u32 = unsafe { ::std::mem::transmute(max_num_scans) }; + max_num_scans as u64 + }); + __bindgen_bitfield_unit.set(11usize, 3u8, { + let max_num_huffman_tables: u32 = unsafe { ::std::mem::transmute(max_num_huffman_tables) }; + max_num_huffman_tables as u64 + }); + __bindgen_bitfield_unit.set(14usize, 3u8, { + let max_num_quantization_tables: u32 = unsafe { ::std::mem::transmute(max_num_quantization_tables) }; + max_num_quantization_tables as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValEncJPEG { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncJPEG"] +pub type VAConfigAttribValEncJPEG = _VAConfigAttribValEncJPEG; +#[doc = " Generic ID type, can be re-typed for specific implementation"] +pub type VAGenericID = ::std::os::raw::c_uint; +pub type VAConfigID = VAGenericID; +#[doc = " Contexts and Surfaces\n\n Context represents a \"virtual\" video decode, encode or video processing\n pipeline. Surfaces are render targets for a given context. The data in the\n surfaces are not accessible to the client except if derived image is supported\n and the internal data format of the surface is implementation specific.\n\n Surfaces are provided as a hint of what surfaces will be used when the context\n is created through vaCreateContext(). A surface may be used by different contexts\n at the same time as soon as application can make sure the operations are synchronized\n between different contexts, e.g. a surface is used as the output of a decode context\n and the input of a video process context. Surfaces can only be destroyed after all\n contexts using these surfaces have been destroyed.\n\n Both contexts and surfaces are identified by unique IDs and its\n implementation specific internals are kept opaque to the clients"] +pub type VAContextID = VAGenericID; +pub type VASurfaceID = VAGenericID; +pub mod VAGenericValueType { + #[doc = " \\brief Generic value types."] + pub type Type = ::std::os::raw::c_uint; + #[doc = "< 32-bit signed integer."] + pub const VAGenericValueTypeInteger: Type = 1; + #[doc = "< 32-bit floating-point value."] + pub const VAGenericValueTypeFloat: Type = 2; + #[doc = "< Generic pointer type"] + pub const VAGenericValueTypePointer: Type = 3; + #[doc = "< Pointer to function"] + pub const VAGenericValueTypeFunc: Type = 4; +} +#[doc = " \\brief Generic function type."] +pub type VAGenericFunc = ::std::option::Option; +#[doc = " \\brief Generic value."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAGenericValue { + #[doc = " \\brief Value type. See #VAGenericValueType."] + pub type_: VAGenericValueType::Type, + pub value: _VAGenericValue__bindgen_ty_1, +} +#[doc = " \\brief Value holder."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAGenericValue__bindgen_ty_1 { + #[doc = " \\brief 32-bit signed integer."] + pub i: i32, + #[doc = " \\brief 32-bit float."] + pub f: f32, + #[doc = " \\brief Generic pointer."] + pub p: *mut ::std::os::raw::c_void, + #[doc = " \\brief Pointer to function."] + pub fn_: VAGenericFunc, +} +impl Default for _VAGenericValue__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAGenericValue { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Generic value."] +pub type VAGenericValue = _VAGenericValue; +pub mod VASurfaceAttribType { + #[doc = " \\brief Surface attribute types."] + pub type Type = ::std::os::raw::c_uint; + pub const VASurfaceAttribNone: Type = 0; + #[doc = " \\brief Pixel format as a FOURCC (int, read/write).\n\n When vaQuerySurfaceAttributes() is called, the driver will return one\n PixelFormat attribute per supported pixel format.\n\n When provided as an input to vaCreateSurfaces(), the driver will\n allocate a surface with the provided pixel format."] + pub const VASurfaceAttribPixelFormat: Type = 1; + #[doc = " \\brief Minimal width in pixels (int, read-only)."] + pub const VASurfaceAttribMinWidth: Type = 2; + #[doc = " \\brief Maximal width in pixels (int, read-only)."] + pub const VASurfaceAttribMaxWidth: Type = 3; + #[doc = " \\brief Minimal height in pixels (int, read-only)."] + pub const VASurfaceAttribMinHeight: Type = 4; + #[doc = " \\brief Maximal height in pixels (int, read-only)."] + pub const VASurfaceAttribMaxHeight: Type = 5; + #[doc = " \\brief Surface memory type expressed in bit fields (int, read/write)."] + pub const VASurfaceAttribMemoryType: Type = 6; + #[doc = " \\brief External buffer descriptor (pointer, write).\n\n Refer to the documentation for the memory type being created to\n determine what descriptor structure to pass here. If not otherwise\n stated, the common VASurfaceAttribExternalBuffers should be used."] + pub const VASurfaceAttribExternalBufferDescriptor: Type = 7; + #[doc = " \\brief Surface usage hint, gives the driver a hint of intended usage\n to optimize allocation (e.g. tiling) (int, read/write)."] + pub const VASurfaceAttribUsageHint: Type = 8; + #[doc = " \\brief List of possible DRM format modifiers (pointer, write).\n\n The value must be a pointer to a VADRMFormatModifierList. This can only\n be used when allocating a new buffer, it's invalid to use this attribute\n when importing an existing buffer."] + pub const VASurfaceAttribDRMFormatModifiers: Type = 9; + #[doc = " \\brief width and height log2 aligment in pixels (int, read-only)\n\n For special HW requirement used in some codecs, if\n VASurfaceAttribAlignmentSize is not implemented in the driver, then\n the surface_width and surface_height should keep the original logic\n without any modification, this is an add-on requirement to\n surface_width and surface_height."] + pub const VASurfaceAttribAlignmentSize: Type = 10; + #[doc = " \\brief Number of surface attributes."] + pub const VASurfaceAttribCount: Type = 11; +} +#[doc = " \\brief Surface attribute."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASurfaceAttrib { + #[doc = " \\brief Type."] + pub type_: VASurfaceAttribType::Type, + #[doc = " \\brief Flags. See \"Surface attribute flags\"."] + pub flags: u32, + #[doc = " \\brief Value. See \"Surface attribute types\" for the expected types."] + pub value: VAGenericValue, +} +impl Default for _VASurfaceAttrib { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Surface attribute."] +pub type VASurfaceAttrib = _VASurfaceAttrib; +#[doc = " \\brief VASurfaceAttribExternalBuffers structure for\n the VASurfaceAttribExternalBufferDescriptor attribute."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VASurfaceAttribExternalBuffers { + #[doc = " \\brief pixel format in fourcc."] + pub pixel_format: u32, + #[doc = " \\brief width in pixels."] + pub width: u32, + #[doc = " \\brief height in pixels."] + pub height: u32, + #[doc = " \\brief total size of the buffer in bytes."] + pub data_size: u32, + #[doc = " \\brief number of planes for planar layout"] + pub num_planes: u32, + #[doc = " \\brief pitch for each plane in bytes"] + pub pitches: [u32; 4usize], + #[doc = " \\brief offset for each plane in bytes"] + pub offsets: [u32; 4usize], + #[doc = " \\brief buffer handles or user pointers"] + pub buffers: *mut usize, + #[doc = " \\brief number of elements in the \"buffers\" array"] + pub num_buffers: u32, + #[doc = " \\brief flags. See \"Surface external buffer descriptor flags\"."] + pub flags: u32, + #[doc = " \\brief reserved for passing private data"] + pub private_data: *mut ::std::os::raw::c_void, +} +impl Default for _VASurfaceAttribExternalBuffers { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VASurfaceAttribExternalBuffers structure for\n the VASurfaceAttribExternalBufferDescriptor attribute."] +pub type VASurfaceAttribExternalBuffers = _VASurfaceAttribExternalBuffers; +pub type VAMFContextID = VAGenericID; +#[doc = " Buffers\n Buffers are used to pass various types of data from the\n client to the server. The server maintains a data store\n for each buffer created, and the client idenfies a buffer\n through a unique buffer id assigned by the server."] +pub type VABufferID = VAGenericID; +pub mod VABufferType { + pub type Type = ::std::os::raw::c_uint; + pub const VAPictureParameterBufferType: Type = 0; + pub const VAIQMatrixBufferType: Type = 1; + pub const VABitPlaneBufferType: Type = 2; + pub const VASliceGroupMapBufferType: Type = 3; + pub const VASliceParameterBufferType: Type = 4; + pub const VASliceDataBufferType: Type = 5; + pub const VAMacroblockParameterBufferType: Type = 6; + pub const VAResidualDataBufferType: Type = 7; + pub const VADeblockingParameterBufferType: Type = 8; + pub const VAImageBufferType: Type = 9; + pub const VAProtectedSliceDataBufferType: Type = 10; + pub const VAQMatrixBufferType: Type = 11; + pub const VAHuffmanTableBufferType: Type = 12; + pub const VAProbabilityBufferType: Type = 13; + pub const VAEncCodedBufferType: Type = 21; + pub const VAEncSequenceParameterBufferType: Type = 22; + pub const VAEncPictureParameterBufferType: Type = 23; + pub const VAEncSliceParameterBufferType: Type = 24; + pub const VAEncPackedHeaderParameterBufferType: Type = 25; + pub const VAEncPackedHeaderDataBufferType: Type = 26; + pub const VAEncMiscParameterBufferType: Type = 27; + pub const VAEncMacroblockParameterBufferType: Type = 28; + pub const VAEncMacroblockMapBufferType: Type = 29; + #[doc = " \\brief Encoding QP buffer\n\n This buffer contains QP per MB for encoding. Currently\n VAEncQPBufferH264 is defined for H.264 encoding, see\n #VAEncQPBufferH264 for details"] + pub const VAEncQPBufferType: Type = 30; + #[doc = " \\brief Video processing pipeline parameter buffer.\n\n This buffer describes the video processing pipeline. See\n #VAProcPipelineParameterBuffer for details."] + pub const VAProcPipelineParameterBufferType: Type = 41; + #[doc = " \\brief Video filter parameter buffer.\n\n This buffer describes the video filter parameters. All buffers\n inherit from #VAProcFilterParameterBufferBase, thus including\n a unique filter buffer type.\n\n The default buffer used by most filters is #VAProcFilterParameterBuffer.\n Filters requiring advanced parameters include, but are not limited to,\n deinterlacing (#VAProcFilterParameterBufferDeinterlacing),\n color balance (#VAProcFilterParameterBufferColorBalance), etc."] + pub const VAProcFilterParameterBufferType: Type = 42; + #[doc = " \\brief FEI specific buffer types"] + pub const VAEncFEIMVBufferType: Type = 43; + #[doc = " \\brief FEI specific buffer types"] + pub const VAEncFEIMBCodeBufferType: Type = 44; + #[doc = " \\brief FEI specific buffer types"] + pub const VAEncFEIDistortionBufferType: Type = 45; + #[doc = " \\brief FEI specific buffer types"] + pub const VAEncFEIMBControlBufferType: Type = 46; + #[doc = " \\brief FEI specific buffer types"] + pub const VAEncFEIMVPredictorBufferType: Type = 47; + #[doc = " \\brief FEI specific buffer types"] + pub const VAStatsStatisticsParameterBufferType: Type = 48; + #[doc = " \\brief Statistics output for VAEntrypointStats progressive and top field of interlaced case"] + pub const VAStatsStatisticsBufferType: Type = 49; + #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"] + pub const VAStatsStatisticsBottomFieldBufferType: Type = 50; + #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"] + pub const VAStatsMVBufferType: Type = 51; + #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"] + pub const VAStatsMVPredictorBufferType: Type = 52; + #[doc = " Force MB's to be non skip for encode.it's per-mb control buffer, The width of the MB map\n Surface is (width of the Picture in MB unit) * 1 byte, multiple of 64 bytes.\n The height is (height of the picture in MB unit). The picture is either\n frame or non-interleaved top or bottom field. If the application provides this\nsurface, it will override the \"skipCheckDisable\" setting in VAEncMiscParameterEncQuality."] + pub const VAEncMacroblockDisableSkipMapBufferType: Type = 53; + #[doc = " \\brief HEVC FEI CTB level cmd buffer\n it is CTB level information for future usage."] + pub const VAEncFEICTBCmdBufferType: Type = 54; + #[doc = " \\brief HEVC FEI CU level data buffer\n it's CTB level information for future usage"] + pub const VAEncFEICURecordBufferType: Type = 55; + #[doc = " decode stream out buffer, intermedia data of decode, it may include MV, MB mode etc.\n it can be used to detect motion and analyze the frame contain"] + pub const VADecodeStreamoutBufferType: Type = 56; + #[doc = " \\brief HEVC Decoding Subset Parameter buffer type\n\n The subsets parameter buffer is concatenation with one or multiple\n subset entry point offsets. All the offset values are layed out one\n by one according to slice order with first slice segment first, second\n slice segment second, etc... The entry number is indicated by parameter\n \\ref num_entry_point_offsets. And the first entry position of the entry\n point offsets for any slice segment is indicated by parameter\n entry_offset_to_subset_array in VAPictureParameterBufferHEVC data structure."] + pub const VASubsetsParameterBufferType: Type = 57; + #[doc = " \\brief adjust context parameters dynamically\n\n this parameter is used to update context parameters, detail parameter is in\n \\c VAContextParameterUpdateBuffer"] + pub const VAContextParameterUpdateBufferType: Type = 58; + #[doc = " \\brief Protected session execution buffer type\n\n It's for TEE execution usage (vaProtectedSessionExecute()). The buffer structure is in\n \\c VAProtectedSessionExecuteBuffer"] + pub const VAProtectedSessionExecuteBufferType: Type = 59; + #[doc = " \\brief Encryption parameters buffer for protected content session.\n\n Refer to \\c VAEncryptionParameters"] + pub const VAEncryptionParameterBufferType: Type = 60; + #[doc = " \\brief Encoding delta QP per block buffer\n\n This buffer only could be created and accepted\n when \\c VAConfigAttribValEncPerBlockControl delta_qp_support == 1.\n This input buffer contains delta QP per block for encoding.\n The supported size of delta QP block and the size of delta QP\n must be quried from \\c VAConfigAttribValEncPerBlockControl."] + pub const VAEncDeltaQpPerBlockBufferType: Type = 61; + #[doc = " \\brief VVC ALF data buffer\n\n Refer to \\c VAAlfDataVVC"] + pub const VAAlfBufferType: Type = 62; + #[doc = " \\brief VVC LMCS data buffer\n\n Refer to \\c VALmcsDataVVC"] + pub const VALmcsBufferType: Type = 63; + #[doc = " \\brief VVC SubPic data buffer\n\n Refer to \\c VASubPicVVC"] + pub const VASubPicBufferType: Type = 64; + #[doc = " \\brief VVC Tile Dimension data buffer\n\n Data buffer of tile widths and heights, with each element formatted as uint16_t"] + pub const VATileBufferType: Type = 65; + #[doc = " \\brief VVC Slice Structure data buffer\n\n Refer to \\c VASliceStructVVC"] + pub const VASliceStructBufferType: Type = 66; + #[doc = " \\brief VVC Slice Structure data buffer\n\n Refer to \\c VASliceStructVVC"] + pub const VABufferTypeMax: Type = 67; +} +#[doc = " Processing rate parameter for encode."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcessingRateParameterEnc { + #[doc = " \\brief Profile level"] + pub level_idc: u8, + pub reserved: [u8; 3usize], + #[doc = " \\brief quality level. When set to 0, default quality\n level is used."] + pub quality_level: u32, + #[doc = " \\brief Period between I frames."] + pub intra_period: u32, + #[doc = " \\brief Period between I/P frames."] + pub ip_period: u32, +} +#[doc = " Processing rate parameter for encode."] +pub type VAProcessingRateParameterEnc = _VAProcessingRateParameterEnc; +#[doc = " Processing rate parameter for decode."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcessingRateParameterDec { + #[doc = " \\brief Profile level"] + pub level_idc: u8, + pub reserved0: [u8; 3usize], + pub reserved: u32, +} +#[doc = " Processing rate parameter for decode."] +pub type VAProcessingRateParameterDec = _VAProcessingRateParameterDec; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAProcessingRateParameter { + pub __bindgen_anon_1: _VAProcessingRateParameter__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAProcessingRateParameter__bindgen_ty_1 { + pub proc_buf_enc: VAProcessingRateParameterEnc, + pub proc_buf_dec: VAProcessingRateParameterDec, +} +impl Default for _VAProcessingRateParameter__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAProcessingRateParameter { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAProcessingRateParameter = _VAProcessingRateParameter; +pub mod VAEncMiscParameterType { + pub type Type = ::std::os::raw::c_uint; + pub const VAEncMiscParameterTypeFrameRate: Type = 0; + pub const VAEncMiscParameterTypeRateControl: Type = 1; + pub const VAEncMiscParameterTypeMaxSliceSize: Type = 2; + pub const VAEncMiscParameterTypeAIR: Type = 3; + #[doc = " \\brief Buffer type used to express a maximum frame size (in bits)."] + pub const VAEncMiscParameterTypeMaxFrameSize: Type = 4; + #[doc = " \\brief Buffer type used for HRD parameters."] + pub const VAEncMiscParameterTypeHRD: Type = 5; + #[doc = " \\brief Buffer type used for HRD parameters."] + pub const VAEncMiscParameterTypeQualityLevel: Type = 6; + #[doc = " \\brief Buffer type used for Rolling intra refresh"] + pub const VAEncMiscParameterTypeRIR: Type = 7; + #[doc = " \\brief Buffer type used for quantization parameters, it's per-sequence parameter"] + pub const VAEncMiscParameterTypeQuantization: Type = 8; + #[doc = " \\brief Buffer type used for sending skip frame parameters to the encoder's\n rate control, when the user has externally skipped frames."] + pub const VAEncMiscParameterTypeSkipFrame: Type = 9; + #[doc = " \\brief Buffer type used for region-of-interest (ROI) parameters."] + pub const VAEncMiscParameterTypeROI: Type = 10; + #[doc = " \\brief Buffer type used to express a maximum frame size (in bytes) settings for multiple pass."] + pub const VAEncMiscParameterTypeMultiPassFrameSize: Type = 11; + #[doc = " \\brief Buffer type used for temporal layer structure"] + pub const VAEncMiscParameterTypeTemporalLayerStructure: Type = 12; + #[doc = " \\brief Buffer type used for dirty region-of-interest (ROI) parameters."] + pub const VAEncMiscParameterTypeDirtyRect: Type = 13; + #[doc = " \\brief Buffer type used for parallel BRC parameters."] + pub const VAEncMiscParameterTypeParallelBRC: Type = 14; + #[doc = " \\brief Set MB partion mode mask and Half-pel/Quant-pel motion search"] + pub const VAEncMiscParameterTypeSubMbPartPel: Type = 15; + #[doc = " \\brief set encode quality tuning"] + pub const VAEncMiscParameterTypeEncQuality: Type = 16; + #[doc = " \\brief Buffer type used for encoder rounding offset parameters."] + pub const VAEncMiscParameterTypeCustomRoundingControl: Type = 17; + #[doc = " \\brief Buffer type used for FEI input frame level parameters"] + pub const VAEncMiscParameterTypeFEIFrameControl: Type = 18; + #[doc = " \\brief encode extension buffer, ect. MPEG2 Sequence extenstion data"] + pub const VAEncMiscParameterTypeExtensionData: Type = 19; +} +pub mod VAEncPackedHeaderType { + #[doc = " \\brief Packed header type."] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Packed sequence header."] + pub const VAEncPackedHeaderSequence: Type = 1; + #[doc = " \\brief Packed picture header."] + pub const VAEncPackedHeaderPicture: Type = 2; + #[doc = " \\brief Packed slice header."] + pub const VAEncPackedHeaderSlice: Type = 3; + #[doc = " \\brief Packed raw header.\n\n Packed raw data header can be used by the client to insert a header\n into the bitstream data buffer at the point it is passed, the driver\n will handle the raw packed header based on \"has_emulation_bytes\" field\n in the packed header parameter structure."] + pub const VAEncPackedHeaderRawData: Type = 4; + #[doc = " \\brief Misc packed header. See codec-specific definitions.\n\n @deprecated\n This is a deprecated packed header type. All applications can use\n \\c VAEncPackedHeaderRawData to insert a codec-specific packed header"] + pub const VAEncPackedHeaderMiscMask: Type = 2147483648; +} +#[doc = " \\brief Packed header parameter."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPackedHeaderParameterBuffer { + #[doc = " Type of the packed header buffer. See #VAEncPackedHeaderType."] + pub type_: u32, + #[doc = " \\brief Size of the #VAEncPackedHeaderDataBuffer in bits."] + pub bit_length: u32, + #[doc = " \\brief Flag: buffer contains start code emulation prevention bytes?"] + pub has_emulation_bytes: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Packed header parameter."] +pub type VAEncPackedHeaderParameterBuffer = _VAEncPackedHeaderParameterBuffer; +#[doc = " For application, e.g. set a new bitrate\n VABufferID buf_id;\n VAEncMiscParameterBuffer *misc_param;\n VAEncMiscParameterRateControl *misc_rate_ctrl;\n\n vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,\n sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl),\n 1, NULL, &buf_id);\n\n vaMapBuffer(dpy,buf_id,(void **)&misc_param);\n misc_param->type = VAEncMiscParameterTypeRateControl;\n misc_rate_ctrl= (VAEncMiscParameterRateControl *)misc_param->data;\n misc_rate_ctrl->bits_per_second = 6400000;\n vaUnmapBuffer(dpy, buf_id);\n vaRenderPicture(dpy, context, &buf_id, 1);"] +#[repr(C)] +#[derive(Debug)] +pub struct _VAEncMiscParameterBuffer { + pub type_: VAEncMiscParameterType::Type, + pub data: __IncompleteArrayField, +} +impl Default for _VAEncMiscParameterBuffer { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " For application, e.g. set a new bitrate\n VABufferID buf_id;\n VAEncMiscParameterBuffer *misc_param;\n VAEncMiscParameterRateControl *misc_rate_ctrl;\n\n vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,\n sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl),\n 1, NULL, &buf_id);\n\n vaMapBuffer(dpy,buf_id,(void **)&misc_param);\n misc_param->type = VAEncMiscParameterTypeRateControl;\n misc_rate_ctrl= (VAEncMiscParameterRateControl *)misc_param->data;\n misc_rate_ctrl->bits_per_second = 6400000;\n vaUnmapBuffer(dpy, buf_id);\n vaRenderPicture(dpy, context, &buf_id, 1);"] +pub type VAEncMiscParameterBuffer = _VAEncMiscParameterBuffer; +#[doc = " \\brief Temporal layer Structure"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterTemporalLayerStructure { + #[doc = " \\brief The number of temporal layers"] + pub number_of_layers: u32, + #[doc = " \\brief The length of the array defining frame layer membership. Should be 1-32"] + pub periodicity: u32, + #[doc = " \\brief The array indicating the layer id for each frame\n\n The layer id for the first frame in a coded sequence is always 0, so layer_id[] specifies the layer\n ids for frames starting from the 2nd frame."] + pub layer_id: [u32; 32usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Temporal layer Structure"] +pub type VAEncMiscParameterTemporalLayerStructure = _VAEncMiscParameterTemporalLayerStructure; +#[doc = " \\brief Rate control parameters"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterRateControl { + #[doc = " The maximum bit-rate which the the rate controller should generate."] + pub bits_per_second: u32, + #[doc = " The target bit-rate which the rate controller should generate, as a percentage of the\n maximum bit-rate.\n\n In CBR mode this value is ignored (treated as 100%)."] + pub target_percentage: u32, + #[doc = " Rate control window size in milliseconds.\n\n The rate controller will attempt to guarantee that the target and maximum bit-rates are\n correct over this window."] + pub window_size: u32, + #[doc = " Initial quantiser value used at the start of the stream.\n\n Ignored if set to zero."] + pub initial_qp: u32, + #[doc = " Minimum quantiser value to use.\n\n The quantiser will not go below the value - if this limit is hit, the output bitrate may\n be lower than the target. Ignored if set to zero."] + pub min_qp: u32, + #[doc = " Basic unit size.\n\n Only used by some drivers - see driver documentation for details. Set to zero if unused."] + pub basic_unit_size: u32, + pub rc_flags: _VAEncMiscParameterRateControl__bindgen_ty_1, + #[doc = " Initial quality factor used in ICQ mode.\n\n This value must be between 1 and 51.\n this value will be deprecated in future, to use quality_factor instead of it."] + pub ICQ_quality_factor: u32, + #[doc = " Maximum quantiser value to use.\n\n The quantiser will not go above this value - if this limit is hit, the output bitrate\n may exceed the target. Ignored if set to zero."] + pub max_qp: u32, + #[doc = " Quality factor\n\n the range will be different for different codec"] + pub quality_factor: u32, + #[doc = " Target frame size\n\n Desired frame size in bytes.\n This parameter can be used in some RC modes (like Transport Controlled BRC)\n where feedback from the app is required.\n Zero value means no limits.\n"] + pub target_frame_size: u32, + #[doc = " Reserved bytes for future use, must be zero."] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterRateControl__bindgen_ty_1 { + pub bits: _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn reset(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_reset(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reset_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reset_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_frame_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_frame_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_frame_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_frame_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_bit_stuffing(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_bit_stuffing(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_bit_stuffing_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_bit_stuffing_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_rate_control(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 4u8) as u32) } + } + #[inline] + pub fn set_mb_rate_control(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_rate_control_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_rate_control_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 8u8) as u32) } + } + #[inline] + pub fn set_temporal_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn cfs_I_frames(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_cfs_I_frames(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cfs_I_frames_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cfs_I_frames_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_parallel_brc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_parallel_brc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_parallel_brc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_parallel_brc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_dynamic_scaling(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_dynamic_scaling(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_dynamic_scaling_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_dynamic_scaling_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_tolerance_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_tolerance_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_tolerance_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_tolerance_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + reset: u32, + disable_frame_skip: u32, + disable_bit_stuffing: u32, + mb_rate_control: u32, + temporal_id: u32, + cfs_I_frames: u32, + enable_parallel_brc: u32, + enable_dynamic_scaling: u32, + frame_tolerance_mode: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let reset: u32 = unsafe { ::std::mem::transmute(reset) }; + reset as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let disable_frame_skip: u32 = unsafe { ::std::mem::transmute(disable_frame_skip) }; + disable_frame_skip as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let disable_bit_stuffing: u32 = unsafe { ::std::mem::transmute(disable_bit_stuffing) }; + disable_bit_stuffing as u64 + }); + __bindgen_bitfield_unit.set(3usize, 4u8, { + let mb_rate_control: u32 = unsafe { ::std::mem::transmute(mb_rate_control) }; + mb_rate_control as u64 + }); + __bindgen_bitfield_unit.set(7usize, 8u8, { + let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) }; + temporal_id as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let cfs_I_frames: u32 = unsafe { ::std::mem::transmute(cfs_I_frames) }; + cfs_I_frames as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let enable_parallel_brc: u32 = unsafe { ::std::mem::transmute(enable_parallel_brc) }; + enable_parallel_brc as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let enable_dynamic_scaling: u32 = unsafe { ::std::mem::transmute(enable_dynamic_scaling) }; + enable_dynamic_scaling as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let frame_tolerance_mode: u32 = unsafe { ::std::mem::transmute(frame_tolerance_mode) }; + frame_tolerance_mode as u64 + }); + __bindgen_bitfield_unit.set(20usize, 12u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterRateControl__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterRateControl { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Rate control parameters"] +pub type VAEncMiscParameterRateControl = _VAEncMiscParameterRateControl; +#[doc = " Encode framerate parameters.\n\n Sets the encode framerate used by the rate controller. This should be\n provided in all modes using a bitrate target (variable framerate is not\n supported)."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterFrameRate { + #[doc = " Encode framerate.\n\n The framerate is specified as a number of frames per second, as a\n fraction. The denominator of the fraction is given in the top half\n (the high two bytes) of the framerate field, and the numerator is\n given in the bottom half (the low two bytes).\n\n That is:\n denominator = framerate >> 16 & 0xffff;\n numerator = framerate & 0xffff;\n fps = numerator / denominator;\n\n For example, if framerate is set to (100 << 16 | 750), this is\n 750 / 100, hence 7.5fps.\n\n If the denominator is zero (the high two bytes are both zero) then\n it takes the value one instead, so the framerate is just the integer\n in the low 2 bytes."] + pub framerate: u32, + pub framerate_flags: _VAEncMiscParameterFrameRate__bindgen_ty_1, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterFrameRate__bindgen_ty_1 { + pub bits: _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn temporal_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_temporal_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(temporal_id: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) }; + temporal_id as u64 + }); + __bindgen_bitfield_unit.set(8usize, 24u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterFrameRate__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterFrameRate { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " Encode framerate parameters.\n\n Sets the encode framerate used by the rate controller. This should be\n provided in all modes using a bitrate target (variable framerate is not\n supported)."] +pub type VAEncMiscParameterFrameRate = _VAEncMiscParameterFrameRate; +#[doc = " Allow a maximum slice size to be specified (in bits).\n The encoder will attempt to make sure that individual slices do not exceed this size\n Or to signal applicate if the slice size exceed this size, see \"status\" of VACodedBufferSegment"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterMaxSliceSize { + pub max_slice_size: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " Allow a maximum slice size to be specified (in bits).\n The encoder will attempt to make sure that individual slices do not exceed this size\n Or to signal applicate if the slice size exceed this size, see \"status\" of VACodedBufferSegment"] +pub type VAEncMiscParameterMaxSliceSize = _VAEncMiscParameterMaxSliceSize; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterAIR { + pub air_num_mbs: u32, + pub air_threshold: u32, + pub air_auto: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +pub type VAEncMiscParameterAIR = _VAEncMiscParameterAIR; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterRIR { + pub rir_flags: _VAEncMiscParameterRIR__bindgen_ty_1, + #[doc = " \\brief Indicates the column or row location in MB. It is ignored if\n rir_flags is 0."] + pub intra_insertion_location: u16, + #[doc = " \\brief Indicates the number of columns or rows in MB. It is ignored if\n rir_flags is 0."] + pub intra_insert_size: u16, + #[doc = " \\brief indicates the Qp difference for inserted intra columns or rows.\n App can use this to adjust intra Qp based on bitrate & max frame size."] + pub qp_delta_for_inserted_intra: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterRIR__bindgen_ty_1 { + pub bits: _VAEncMiscParameterRIR__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterRIR__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterRIR__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn enable_rir_column(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_rir_column(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_rir_column_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_rir_column_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_rir_row(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_rir_row(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_rir_row_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_rir_row_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 30u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 30u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + enable_rir_column: u32, + enable_rir_row: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable_rir_column: u32 = unsafe { ::std::mem::transmute(enable_rir_column) }; + enable_rir_column as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let enable_rir_row: u32 = unsafe { ::std::mem::transmute(enable_rir_row) }; + enable_rir_row as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterRIR__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterRIR { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAEncMiscParameterRIR = _VAEncMiscParameterRIR; +#[doc = " HRD / VBV buffering parameters for encoding.\n\n This sets the HRD / VBV parameters which will be used by the rate\n controller for encoding. It should be specified in modes using a bitrate\n target when the buffering of the output stream needs to be constrained.\n\n If not provided, the encoder may use arbitrary amounts of buffering."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterHRD { + #[doc = " The initial fullness of the HRD coded picture buffer, in bits.\n\n This sets how full the CPB is when encoding begins - that is, how much\n buffering will happen on the decoder side before the first frame.\n The CPB fullness will be reset to this value after any rate control\n reset (a change in parameters or an explicit reset).\n\n For H.264, it should match the value of initial_cpb_removal_delay in\n buffering_period SEI messages."] + pub initial_buffer_fullness: u32, + #[doc = " The HRD coded picture buffer size, in bits.\n\n For H.264, it should match the value of cpb_size_value_minus1 in the VUI\n parameters."] + pub buffer_size: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " HRD / VBV buffering parameters for encoding.\n\n This sets the HRD / VBV parameters which will be used by the rate\n controller for encoding. It should be specified in modes using a bitrate\n target when the buffering of the output stream needs to be constrained.\n\n If not provided, the encoder may use arbitrary amounts of buffering."] +pub type VAEncMiscParameterHRD = _VAEncMiscParameterHRD; +#[doc = " \\brief Defines a maximum frame size (in bits).\n\n This misc parameter buffer defines the maximum size of a frame (in\n bits). The encoder will try to make sure that each frame does not\n exceed this size. Otherwise, if the frame size exceeds this size,\n the \\c status flag of #VACodedBufferSegment will contain\n #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterBufferMaxFrameSize { + #[doc = " \\brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. */\n/** duplicated with VAEncMiscParameterBuffer, should be deprecated"] + pub type_: VAEncMiscParameterType::Type, + #[doc = " \\brief Maximum size of a frame (in bits)."] + pub max_frame_size: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAEncMiscParameterBufferMaxFrameSize { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Defines a maximum frame size (in bits).\n\n This misc parameter buffer defines the maximum size of a frame (in\n bits). The encoder will try to make sure that each frame does not\n exceed this size. Otherwise, if the frame size exceeds this size,\n the \\c status flag of #VACodedBufferSegment will contain\n #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW."] +pub type VAEncMiscParameterBufferMaxFrameSize = _VAEncMiscParameterBufferMaxFrameSize; +#[doc = " \\brief Maximum frame size (in bytes) settings for multiple pass.\n\n This misc parameter buffer defines the maximum size of a frame (in\n bytes) settings for multiple pass. currently only AVC encoder can\n support this settings in multiple pass case. If the frame size exceeds\n this size, the encoder will do more pak passes to adjust the QP value\n to control the frame size."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterBufferMultiPassFrameSize { + #[doc = " \\brief Type. Shall be set to #VAEncMiscParameterTypeMultiPassMaxFrameSize. */\n/** duplicated with VAEncMiscParameterBuffer, should be deprecated"] + pub type_: VAEncMiscParameterType::Type, + #[doc = " \\brief Maximum size of a frame (in byte)"] + pub max_frame_size: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub reserved: u32, + #[doc = " \\brief number of passes, every pass has different QP, currently AVC encoder can support up to 4 passes"] + pub num_passes: u8, + #[doc = " \\brief delta QP list for every pass"] + pub delta_qp: *mut u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [::std::os::raw::c_ulong; 4usize], +} +impl Default for _VAEncMiscParameterBufferMultiPassFrameSize { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Maximum frame size (in bytes) settings for multiple pass.\n\n This misc parameter buffer defines the maximum size of a frame (in\n bytes) settings for multiple pass. currently only AVC encoder can\n support this settings in multiple pass case. If the frame size exceeds\n this size, the encoder will do more pak passes to adjust the QP value\n to control the frame size."] +pub type VAEncMiscParameterBufferMultiPassFrameSize = _VAEncMiscParameterBufferMultiPassFrameSize; +#[doc = " \\brief Encoding quality level.\n\n The encoding quality could be set through this structure, if the implementation\n supports multiple quality levels. The quality level set through this structure is\n persistent over the entire coded sequence, or until a new structure is being sent.\n The quality level range can be queried through the VAConfigAttribEncQualityRange\n attribute. A lower value means higher quality, and a value of 1 represents the highest\n quality. The quality level setting is used as a trade-off between quality and speed/power\n consumption, with higher quality corresponds to lower speed and higher power consumption."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterBufferQualityLevel { + #[doc = " \\brief Encoding quality level setting. When set to 0, default quality\n level is used."] + pub quality_level: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Encoding quality level.\n\n The encoding quality could be set through this structure, if the implementation\n supports multiple quality levels. The quality level set through this structure is\n persistent over the entire coded sequence, or until a new structure is being sent.\n The quality level range can be queried through the VAConfigAttribEncQualityRange\n attribute. A lower value means higher quality, and a value of 1 represents the highest\n quality. The quality level setting is used as a trade-off between quality and speed/power\n consumption, with higher quality corresponds to lower speed and higher power consumption."] +pub type VAEncMiscParameterBufferQualityLevel = _VAEncMiscParameterBufferQualityLevel; +#[doc = " \\brief Quantization settings for encoding.\n\n Some encoders support special types of quantization such as trellis, and this structure\n can be used by the app to control these special types of quantization by the encoder."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterQuantization { + pub quantization_flags: _VAEncMiscParameterQuantization__bindgen_ty_1, + pub va_reserved: u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterQuantization__bindgen_ty_1 { + pub bits: _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn disable_trellis(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_trellis(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_trellis_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_trellis_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_trellis_I(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_trellis_I(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_trellis_I_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_trellis_I_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_trellis_P(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_trellis_P(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_trellis_P_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_trellis_P_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_trellis_B(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_trellis_B(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_trellis_B_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_trellis_B_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 28u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 28u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 28u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disable_trellis: u32, + enable_trellis_I: u32, + enable_trellis_P: u32, + enable_trellis_B: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disable_trellis: u32 = unsafe { ::std::mem::transmute(disable_trellis) }; + disable_trellis as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let enable_trellis_I: u32 = unsafe { ::std::mem::transmute(enable_trellis_I) }; + enable_trellis_I as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let enable_trellis_P: u32 = unsafe { ::std::mem::transmute(enable_trellis_P) }; + enable_trellis_P as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let enable_trellis_B: u32 = unsafe { ::std::mem::transmute(enable_trellis_B) }; + enable_trellis_B as u64 + }); + __bindgen_bitfield_unit.set(4usize, 28u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterQuantization__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterQuantization { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Quantization settings for encoding.\n\n Some encoders support special types of quantization such as trellis, and this structure\n can be used by the app to control these special types of quantization by the encoder."] +pub type VAEncMiscParameterQuantization = _VAEncMiscParameterQuantization; +#[doc = " \\brief Encoding skip frame.\n\n The application may choose to skip frames externally to the encoder (e.g. drop completely or\n code as all skip's). For rate control purposes the encoder will need to know the size and number\n of skipped frames. Skip frame(s) indicated through this structure is applicable only to the\n current frame. It is allowed for the application to still send in packed headers for the driver to\n pack, although no frame will be encoded (e.g. for HW to encrypt the frame)."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterSkipFrame { + #[doc = " \\brief Indicates skip frames as below.\n 0: Encode as normal, no skip.\n 1: One or more frames were skipped prior to the current frame, encode the current frame as normal.\n 2: The current frame is to be skipped, do not encode it but pack/encrypt the packed header contents\n (all except VAEncPackedHeaderSlice) which could contain actual frame contents (e.g. pack the frame\n in VAEncPackedHeaderPicture)."] + pub skip_frame_flag: u8, + #[doc = " \\brief The number of frames skipped prior to the current frame. Valid when skip_frame_flag = 1."] + pub num_skip_frames: u8, + #[doc = " \\brief When skip_frame_flag = 1, the size of the skipped frames in bits. When skip_frame_flag = 2,\n the size of the current skipped frame that is to be packed/encrypted in bits."] + pub size_skip_frames: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Encoding skip frame.\n\n The application may choose to skip frames externally to the encoder (e.g. drop completely or\n code as all skip's). For rate control purposes the encoder will need to know the size and number\n of skipped frames. Skip frame(s) indicated through this structure is applicable only to the\n current frame. It is allowed for the application to still send in packed headers for the driver to\n pack, although no frame will be encoded (e.g. for HW to encrypt the frame)."] +pub type VAEncMiscParameterSkipFrame = _VAEncMiscParameterSkipFrame; +#[doc = " \\brief Encoding region-of-interest (ROI).\n\n The encoding ROI can be set through VAEncMiscParameterBufferROI, if the implementation\n supports ROI input. The ROI set through this structure is applicable only to the\n current frame or field, so must be sent every frame or field to be applied. The number of\n supported ROIs can be queried through the VAConfigAttribEncROI. The encoder will use the\n ROI information to adjust the QP values of the MB's that fall within the ROIs."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncROI { + #[doc = " \\brief Defines the ROI boundary in pixels, the driver will map it to appropriate\n codec coding units. It is relative to frame coordinates for the frame case and\n to field coordinates for the field case."] + pub roi_rectangle: VARectangle, + #[doc = " \\brief ROI value\n\n \\ref roi_value specifies ROI delta QP or ROI priority.\n -- ROI delta QP is the value that will be added on top of the frame level QP.\n -- ROI priority specifies the priority of a region, it can be positive (more important)\n or negative (less important) values and is compared with non-ROI region (taken as value 0),\n E.g. ROI region with \\ref roi_value -3 is less important than the non-ROI region (\\ref roi_value\n implied to be 0) which is less important than ROI region with roi_value +2. For overlapping\n regions, the roi_value that is first in the ROI array will have priority.\n\n \\ref roi_value always specifes ROI delta QP when VAConfigAttribRateControl == VA_RC_CQP, no matter\n the value of \\c roi_value_is_qp_delta in #VAEncMiscParameterBufferROI.\n\n \\ref roi_value depends on \\c roi_value_is_qp_delta in #VAEncMiscParameterBufferROI when\n VAConfigAttribRateControl != VA_RC_CQP. \\ref roi_value specifies ROI_delta QP if \\c roi_value_is_qp_delta\n in VAEncMiscParameterBufferROI is 1, otherwise \\ref roi_value specifies ROI priority."] + pub roi_value: i8, +} +#[doc = " \\brief Encoding region-of-interest (ROI).\n\n The encoding ROI can be set through VAEncMiscParameterBufferROI, if the implementation\n supports ROI input. The ROI set through this structure is applicable only to the\n current frame or field, so must be sent every frame or field to be applied. The number of\n supported ROIs can be queried through the VAConfigAttribEncROI. The encoder will use the\n ROI information to adjust the QP values of the MB's that fall within the ROIs."] +pub type VAEncROI = _VAEncROI; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterBufferROI { + #[doc = " \\brief Number of ROIs being sent."] + pub num_roi: u32, + #[doc = " \\brief Valid when VAConfigAttribRateControl != VA_RC_CQP, then the encoder's\n rate control will determine actual delta QPs. Specifies the max/min allowed delta\n QPs."] + pub max_delta_qp: i8, + pub min_delta_qp: i8, + #[doc = " \\brief Pointer to a VAEncROI array with num_roi elements. It is relative to frame\n coordinates for the frame case and to field coordinates for the field case."] + pub roi: *mut VAEncROI, + pub roi_flags: _VAEncMiscParameterBufferROI__bindgen_ty_1, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterBufferROI__bindgen_ty_1 { + pub bits: _VAEncMiscParameterBufferROI__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterBufferROI__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterBufferROI__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn roi_value_is_qp_delta(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_roi_value_is_qp_delta(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn roi_value_is_qp_delta_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_roi_value_is_qp_delta_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 31u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(roi_value_is_qp_delta: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let roi_value_is_qp_delta: u32 = unsafe { ::std::mem::transmute(roi_value_is_qp_delta) }; + roi_value_is_qp_delta as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterBufferROI__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterBufferROI { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAEncMiscParameterBufferROI = _VAEncMiscParameterBufferROI; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterBufferDirtyRect { + #[doc = " \\brief Number of Rectangle being sent."] + pub num_roi_rectangle: u32, + #[doc = " \\brief Pointer to a VARectangle array with num_roi_rectangle elements."] + pub roi_rectangle: *mut VARectangle, +} +impl Default for _VAEncMiscParameterBufferDirtyRect { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAEncMiscParameterBufferDirtyRect = _VAEncMiscParameterBufferDirtyRect; +#[doc = " \\brief Attribute value for VAConfigAttribEncParallelRateControl"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterParallelRateControl { + #[doc = " brief Number of layers"] + pub num_layers: u32, + #[doc = " brief Number of B frames per layer per GOP.\n\n it should be allocated by application, and the is num_layers.\n num_b_in_gop[0] is the number of regular B which refers to only I or P frames."] + pub num_b_in_gop: *mut u32, +} +impl Default for _VAEncMiscParameterParallelRateControl { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncParallelRateControl"] +pub type VAEncMiscParameterParallelRateControl = _VAEncMiscParameterParallelRateControl; +#[doc = " per frame encoder quality controls, once set they will persist for all future frames\ntill it is updated again."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterEncQuality { + pub __bindgen_anon_1: _VAEncMiscParameterEncQuality__bindgen_ty_1, + #[doc = " Maps QP to skip thresholds when FTQ is enabled. Valid range is 0-255."] + pub FTQSkipThresholdLUT: [u8; 52usize], + #[doc = " Maps QP to skip thresholds when FTQ is disabled. Valid range is 0-65535."] + pub NonFTQSkipThresholdLUT: [u16; 52usize], + pub reserved: [u32; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterEncQuality__bindgen_ty_1 { + pub __bindgen_anon_1: _VAEncMiscParameterEncQuality__bindgen_ty_1__bindgen_ty_1, + pub encControls: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterEncQuality__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAEncMiscParameterEncQuality__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn useRawPicForRef(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_useRawPicForRef(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn useRawPicForRef_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_useRawPicForRef_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn skipCheckDisable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_skipCheckDisable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn skipCheckDisable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_skipCheckDisable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn FTQOverride(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_FTQOverride(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn FTQOverride_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_FTQOverride_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn FTQEnable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_FTQEnable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn FTQEnable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_FTQEnable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn FTQSkipThresholdLUTInput(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_FTQSkipThresholdLUTInput(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn FTQSkipThresholdLUTInput_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_FTQSkipThresholdLUTInput_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn NonFTQSkipThresholdLUTInput(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_NonFTQSkipThresholdLUTInput(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn NonFTQSkipThresholdLUTInput_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_NonFTQSkipThresholdLUTInput_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ReservedBit(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ReservedBit(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ReservedBit_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ReservedBit_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn directBiasAdjustmentEnable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_directBiasAdjustmentEnable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn directBiasAdjustmentEnable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_directBiasAdjustmentEnable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn globalMotionBiasAdjustmentEnable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_globalMotionBiasAdjustmentEnable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn globalMotionBiasAdjustmentEnable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_globalMotionBiasAdjustmentEnable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn HMEMVCostScalingFactor(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u32) } + } + #[inline] + pub fn set_HMEMVCostScalingFactor(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn HMEMVCostScalingFactor_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_HMEMVCostScalingFactor_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn HMEDisable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_HMEDisable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn HMEDisable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_HMEDisable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn SuperHMEDisable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_SuperHMEDisable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn SuperHMEDisable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_SuperHMEDisable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn UltraHMEDisable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_UltraHMEDisable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn UltraHMEDisable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_UltraHMEDisable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn PanicModeDisable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_PanicModeDisable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn PanicModeDisable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_PanicModeDisable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ForceRepartitionCheck(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u32) } + } + #[inline] + pub fn set_ForceRepartitionCheck(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn ForceRepartitionCheck_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ForceRepartitionCheck_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + useRawPicForRef: u32, + skipCheckDisable: u32, + FTQOverride: u32, + FTQEnable: u32, + FTQSkipThresholdLUTInput: u32, + NonFTQSkipThresholdLUTInput: u32, + ReservedBit: u32, + directBiasAdjustmentEnable: u32, + globalMotionBiasAdjustmentEnable: u32, + HMEMVCostScalingFactor: u32, + HMEDisable: u32, + SuperHMEDisable: u32, + UltraHMEDisable: u32, + PanicModeDisable: u32, + ForceRepartitionCheck: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let useRawPicForRef: u32 = unsafe { ::std::mem::transmute(useRawPicForRef) }; + useRawPicForRef as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let skipCheckDisable: u32 = unsafe { ::std::mem::transmute(skipCheckDisable) }; + skipCheckDisable as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let FTQOverride: u32 = unsafe { ::std::mem::transmute(FTQOverride) }; + FTQOverride as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let FTQEnable: u32 = unsafe { ::std::mem::transmute(FTQEnable) }; + FTQEnable as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let FTQSkipThresholdLUTInput: u32 = unsafe { ::std::mem::transmute(FTQSkipThresholdLUTInput) }; + FTQSkipThresholdLUTInput as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let NonFTQSkipThresholdLUTInput: u32 = unsafe { ::std::mem::transmute(NonFTQSkipThresholdLUTInput) }; + NonFTQSkipThresholdLUTInput as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ReservedBit: u32 = unsafe { ::std::mem::transmute(ReservedBit) }; + ReservedBit as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let directBiasAdjustmentEnable: u32 = unsafe { ::std::mem::transmute(directBiasAdjustmentEnable) }; + directBiasAdjustmentEnable as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let globalMotionBiasAdjustmentEnable: u32 = + unsafe { ::std::mem::transmute(globalMotionBiasAdjustmentEnable) }; + globalMotionBiasAdjustmentEnable as u64 + }); + __bindgen_bitfield_unit.set(9usize, 2u8, { + let HMEMVCostScalingFactor: u32 = unsafe { ::std::mem::transmute(HMEMVCostScalingFactor) }; + HMEMVCostScalingFactor as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let HMEDisable: u32 = unsafe { ::std::mem::transmute(HMEDisable) }; + HMEDisable as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let SuperHMEDisable: u32 = unsafe { ::std::mem::transmute(SuperHMEDisable) }; + SuperHMEDisable as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let UltraHMEDisable: u32 = unsafe { ::std::mem::transmute(UltraHMEDisable) }; + UltraHMEDisable as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let PanicModeDisable: u32 = unsafe { ::std::mem::transmute(PanicModeDisable) }; + PanicModeDisable as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let ForceRepartitionCheck: u32 = unsafe { ::std::mem::transmute(ForceRepartitionCheck) }; + ForceRepartitionCheck as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterEncQuality__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterEncQuality { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " per frame encoder quality controls, once set they will persist for all future frames\ntill it is updated again."] +pub type VAEncMiscParameterEncQuality = _VAEncMiscParameterEncQuality; +#[doc = " \\brief Custom Encoder Rounding Offset Control.\n Application may use this structure to set customized rounding\n offset parameters for quantization.\n Valid when \\c VAConfigAttribCustomRoundingControl equals 1."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterCustomRoundingControl { + pub rounding_offset_setting: _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1 { + pub bits: _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn enable_custom_rouding_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_custom_rouding_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_custom_rouding_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_custom_rouding_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn rounding_offset_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u32) } + } + #[inline] + pub fn set_rounding_offset_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn rounding_offset_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_rounding_offset_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_custom_rounding_inter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_custom_rounding_inter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_custom_rounding_inter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_custom_rounding_inter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn rounding_offset_inter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u32) } + } + #[inline] + pub fn set_rounding_offset_inter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn rounding_offset_inter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_rounding_offset_inter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + enable_custom_rouding_intra: u32, + rounding_offset_intra: u32, + enable_custom_rounding_inter: u32, + rounding_offset_inter: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable_custom_rouding_intra: u32 = unsafe { ::std::mem::transmute(enable_custom_rouding_intra) }; + enable_custom_rouding_intra as u64 + }); + __bindgen_bitfield_unit.set(1usize, 7u8, { + let rounding_offset_intra: u32 = unsafe { ::std::mem::transmute(rounding_offset_intra) }; + rounding_offset_intra as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let enable_custom_rounding_inter: u32 = unsafe { ::std::mem::transmute(enable_custom_rounding_inter) }; + enable_custom_rounding_inter as u64 + }); + __bindgen_bitfield_unit.set(9usize, 7u8, { + let rounding_offset_inter: u32 = unsafe { ::std::mem::transmute(rounding_offset_inter) }; + rounding_offset_inter as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterCustomRoundingControl__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterCustomRoundingControl { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Custom Encoder Rounding Offset Control.\n Application may use this structure to set customized rounding\n offset parameters for quantization.\n Valid when \\c VAConfigAttribCustomRoundingControl equals 1."] +pub type VAEncMiscParameterCustomRoundingControl = _VAEncMiscParameterCustomRoundingControl; +#[doc = " JPEG common data structures\n/\n/**\n \\brief Huffman table for JPEG decoding.\n\n This structure holds the complete Huffman tables. This is an\n aggregation of all Huffman table (DHT) segments maintained by the\n application. i.e. up to 2 Huffman tables are stored in there for\n baseline profile.\n\n The #load_huffman_table array can be used as a hint to notify the\n VA driver implementation about which table(s) actually changed\n since the last submission of this buffer."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAHuffmanTableBufferJPEGBaseline { + #[doc = " \\brief Specifies which #huffman_table is valid."] + pub load_huffman_table: [u8; 2usize], + pub huffman_table: [_VAHuffmanTableBufferJPEGBaseline__bindgen_ty_1; 2usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Huffman tables indexed by table identifier (Th)."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAHuffmanTableBufferJPEGBaseline__bindgen_ty_1 { + #[doc = " @name DC table (up to 12 categories) */\n/**@{*/\n/** \\brief Number of Huffman codes of length i + 1 (Li)."] + pub num_dc_codes: [u8; 16usize], + #[doc = " \\brief Value associated with each Huffman code (Vij)."] + pub dc_values: [u8; 12usize], + #[doc = "@}*/\n/** @name AC table (2 special codes + up to 16 * 10 codes) */\n/**@{*/\n/** \\brief Number of Huffman codes of length i + 1 (Li)."] + pub num_ac_codes: [u8; 16usize], + #[doc = " \\brief Value associated with each Huffman code (Vij)."] + pub ac_values: [u8; 162usize], + #[doc = " \\brief Padding to 4-byte boundaries. Must be set to zero."] + pub pad: [u8; 2usize], +} +impl Default for _VAHuffmanTableBufferJPEGBaseline__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAHuffmanTableBufferJPEGBaseline { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " JPEG common data structures\n/\n/**\n \\brief Huffman table for JPEG decoding.\n\n This structure holds the complete Huffman tables. This is an\n aggregation of all Huffman table (DHT) segments maintained by the\n application. i.e. up to 2 Huffman tables are stored in there for\n baseline profile.\n\n The #load_huffman_table array can be used as a hint to notify the\n VA driver implementation about which table(s) actually changed\n since the last submission of this buffer."] +pub type VAHuffmanTableBufferJPEGBaseline = _VAHuffmanTableBufferJPEGBaseline; +#[doc = " MPEG-2 data structures"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferMPEG2 { + pub horizontal_size: u16, + pub vertical_size: u16, + pub forward_reference_picture: VASurfaceID, + pub backward_reference_picture: VASurfaceID, + pub picture_coding_type: i32, + pub f_code: i32, + pub picture_coding_extension: _VAPictureParameterBufferMPEG2__bindgen_ty_1, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferMPEG2__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn intra_dc_precision(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_intra_dc_precision(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_dc_precision_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_dc_precision_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn picture_structure(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_picture_structure(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn picture_structure_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_picture_structure_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn top_field_first(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_top_field_first(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn top_field_first_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_top_field_first_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_pred_frame_dct(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_pred_frame_dct(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_pred_frame_dct_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_pred_frame_dct_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn concealment_motion_vectors(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_concealment_motion_vectors(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn concealment_motion_vectors_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_concealment_motion_vectors_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn q_scale_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_q_scale_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn q_scale_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_q_scale_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_vlc_format(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_vlc_format(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_vlc_format_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_vlc_format_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn alternate_scan(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_alternate_scan(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn alternate_scan_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_alternate_scan_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn repeat_first_field(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_repeat_first_field(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn repeat_first_field_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_repeat_first_field_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn progressive_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_progressive_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn progressive_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_progressive_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_first_field(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_first_field(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_first_field_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_first_field_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + intra_dc_precision: u32, + picture_structure: u32, + top_field_first: u32, + frame_pred_frame_dct: u32, + concealment_motion_vectors: u32, + q_scale_type: u32, + intra_vlc_format: u32, + alternate_scan: u32, + repeat_first_field: u32, + progressive_frame: u32, + is_first_field: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let intra_dc_precision: u32 = unsafe { ::std::mem::transmute(intra_dc_precision) }; + intra_dc_precision as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let picture_structure: u32 = unsafe { ::std::mem::transmute(picture_structure) }; + picture_structure as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let top_field_first: u32 = unsafe { ::std::mem::transmute(top_field_first) }; + top_field_first as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let frame_pred_frame_dct: u32 = unsafe { ::std::mem::transmute(frame_pred_frame_dct) }; + frame_pred_frame_dct as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let concealment_motion_vectors: u32 = unsafe { ::std::mem::transmute(concealment_motion_vectors) }; + concealment_motion_vectors as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let q_scale_type: u32 = unsafe { ::std::mem::transmute(q_scale_type) }; + q_scale_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let intra_vlc_format: u32 = unsafe { ::std::mem::transmute(intra_vlc_format) }; + intra_vlc_format as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let alternate_scan: u32 = unsafe { ::std::mem::transmute(alternate_scan) }; + alternate_scan as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let repeat_first_field: u32 = unsafe { ::std::mem::transmute(repeat_first_field) }; + repeat_first_field as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let progressive_frame: u32 = unsafe { ::std::mem::transmute(progressive_frame) }; + progressive_frame as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let is_first_field: u32 = unsafe { ::std::mem::transmute(is_first_field) }; + is_first_field as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferMPEG2__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferMPEG2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " MPEG-2 data structures"] +pub type VAPictureParameterBufferMPEG2 = _VAPictureParameterBufferMPEG2; +#[doc = " MPEG-2 Inverse Quantization Matrix Buffer"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAIQMatrixBufferMPEG2 { + #[doc = " \\brief Same as the MPEG-2 bitstream syntax element."] + pub load_intra_quantiser_matrix: i32, + #[doc = " \\brief Same as the MPEG-2 bitstream syntax element."] + pub load_non_intra_quantiser_matrix: i32, + #[doc = " \\brief Same as the MPEG-2 bitstream syntax element."] + pub load_chroma_intra_quantiser_matrix: i32, + #[doc = " \\brief Same as the MPEG-2 bitstream syntax element."] + pub load_chroma_non_intra_quantiser_matrix: i32, + #[doc = " \\brief Luminance intra matrix, in zig-zag scan order."] + pub intra_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief Luminance non-intra matrix, in zig-zag scan order."] + pub non_intra_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief Chroma intra matrix, in zig-zag scan order."] + pub chroma_intra_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief Chroma non-intra matrix, in zig-zag scan order."] + pub chroma_non_intra_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAIQMatrixBufferMPEG2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " MPEG-2 Inverse Quantization Matrix Buffer"] +pub type VAIQMatrixBufferMPEG2 = _VAIQMatrixBufferMPEG2; +#[doc = " MPEG-2 Slice Parameter Buffer"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferMPEG2 { + pub slice_data_size: u32, + pub slice_data_offset: u32, + pub slice_data_flag: u32, + pub macroblock_offset: u32, + pub slice_horizontal_position: u32, + pub slice_vertical_position: u32, + pub quantiser_scale_code: i32, + pub intra_slice_flag: i32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " MPEG-2 Slice Parameter Buffer"] +pub type VASliceParameterBufferMPEG2 = _VASliceParameterBufferMPEG2; +#[doc = " MPEG-2 Macroblock Parameter Buffer"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAMacroblockParameterBufferMPEG2 { + pub macroblock_address: u16, + pub macroblock_type: u8, + pub macroblock_modes: _VAMacroblockParameterBufferMPEG2__bindgen_ty_1, + pub motion_vertical_field_select: u8, + pub PMV: [[[i16; 2usize]; 2usize]; 2usize], + pub coded_block_pattern: u16, + pub num_skipped_macroblocks: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAMacroblockParameterBufferMPEG2__bindgen_ty_1 { + pub bits: _VAMacroblockParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAMacroblockParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl _VAMacroblockParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn frame_motion_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_motion_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_motion_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_motion_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn field_motion_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_field_motion_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn field_motion_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_motion_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn dct_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_dct_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dct_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dct_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_motion_type: u32, + field_motion_type: u32, + dct_type: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let frame_motion_type: u32 = unsafe { ::std::mem::transmute(frame_motion_type) }; + frame_motion_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let field_motion_type: u32 = unsafe { ::std::mem::transmute(field_motion_type) }; + field_motion_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let dct_type: u32 = unsafe { ::std::mem::transmute(dct_type) }; + dct_type as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAMacroblockParameterBufferMPEG2__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAMacroblockParameterBufferMPEG2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " MPEG-2 Macroblock Parameter Buffer"] +pub type VAMacroblockParameterBufferMPEG2 = _VAMacroblockParameterBufferMPEG2; +#[doc = " H.264/AVC data structures"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureH264 { + pub picture_id: VASurfaceID, + pub frame_idx: u32, + pub flags: u32, + pub TopFieldOrderCnt: i32, + pub BottomFieldOrderCnt: i32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " H.264/AVC data structures"] +pub type VAPictureH264 = _VAPictureH264; +#[doc = " H.264 Picture Parameter Buffer"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferH264 { + pub CurrPic: VAPictureH264, + pub ReferenceFrames: [VAPictureH264; 16usize], + pub picture_width_in_mbs_minus1: u16, + pub picture_height_in_mbs_minus1: u16, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub num_ref_frames: u8, + pub seq_fields: _VAPictureParameterBufferH264__bindgen_ty_1, + pub num_slice_groups_minus1: u8, + pub slice_group_map_type: u8, + pub slice_group_change_rate_minus1: u16, + pub pic_init_qp_minus26: i8, + pub pic_init_qs_minus26: i8, + pub chroma_qp_index_offset: i8, + pub second_chroma_qp_index_offset: i8, + pub pic_fields: _VAPictureParameterBufferH264__bindgen_ty_2, + pub frame_num: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferH264__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn chroma_format_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_format_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn residual_colour_transform_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_residual_colour_transform_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn residual_colour_transform_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_residual_colour_transform_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn gaps_in_frame_num_value_allowed_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_gaps_in_frame_num_value_allowed_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gaps_in_frame_num_value_allowed_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gaps_in_frame_num_value_allowed_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_mbs_only_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_mbs_only_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_mbs_only_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_mbs_only_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_adaptive_frame_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_adaptive_frame_field_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_adaptive_frame_field_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn direct_8x8_inference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_direct_8x8_inference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn direct_8x8_inference_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_direct_8x8_inference_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn MinLumaBiPredSize8x8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_MinLumaBiPredSize8x8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn MinLumaBiPredSize8x8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_MinLumaBiPredSize8x8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_frame_num_minus4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) } + } + #[inline] + pub fn set_log2_max_frame_num_minus4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_frame_num_minus4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_frame_num_minus4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn pic_order_cnt_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_pic_order_cnt_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn pic_order_cnt_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pic_order_cnt_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_pic_order_cnt_lsb_minus4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 4u8) as u32) } + } + #[inline] + pub fn set_log2_max_pic_order_cnt_lsb_minus4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_pic_order_cnt_lsb_minus4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_pic_order_cnt_lsb_minus4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_pic_order_always_zero_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_pic_order_always_zero_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_pic_order_always_zero_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + chroma_format_idc: u32, + residual_colour_transform_flag: u32, + gaps_in_frame_num_value_allowed_flag: u32, + frame_mbs_only_flag: u32, + mb_adaptive_frame_field_flag: u32, + direct_8x8_inference_flag: u32, + MinLumaBiPredSize8x8: u32, + log2_max_frame_num_minus4: u32, + pic_order_cnt_type: u32, + log2_max_pic_order_cnt_lsb_minus4: u32, + delta_pic_order_always_zero_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) }; + chroma_format_idc as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let residual_colour_transform_flag: u32 = unsafe { ::std::mem::transmute(residual_colour_transform_flag) }; + residual_colour_transform_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let gaps_in_frame_num_value_allowed_flag: u32 = + unsafe { ::std::mem::transmute(gaps_in_frame_num_value_allowed_flag) }; + gaps_in_frame_num_value_allowed_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let frame_mbs_only_flag: u32 = unsafe { ::std::mem::transmute(frame_mbs_only_flag) }; + frame_mbs_only_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let mb_adaptive_frame_field_flag: u32 = unsafe { ::std::mem::transmute(mb_adaptive_frame_field_flag) }; + mb_adaptive_frame_field_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let direct_8x8_inference_flag: u32 = unsafe { ::std::mem::transmute(direct_8x8_inference_flag) }; + direct_8x8_inference_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let MinLumaBiPredSize8x8: u32 = unsafe { ::std::mem::transmute(MinLumaBiPredSize8x8) }; + MinLumaBiPredSize8x8 as u64 + }); + __bindgen_bitfield_unit.set(8usize, 4u8, { + let log2_max_frame_num_minus4: u32 = unsafe { ::std::mem::transmute(log2_max_frame_num_minus4) }; + log2_max_frame_num_minus4 as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let pic_order_cnt_type: u32 = unsafe { ::std::mem::transmute(pic_order_cnt_type) }; + pic_order_cnt_type as u64 + }); + __bindgen_bitfield_unit.set(14usize, 4u8, { + let log2_max_pic_order_cnt_lsb_minus4: u32 = + unsafe { ::std::mem::transmute(log2_max_pic_order_cnt_lsb_minus4) }; + log2_max_pic_order_cnt_lsb_minus4 as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let delta_pic_order_always_zero_flag: u32 = + unsafe { ::std::mem::transmute(delta_pic_order_always_zero_flag) }; + delta_pic_order_always_zero_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferH264__bindgen_ty_2 { + pub bits: _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn entropy_coding_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn entropy_coding_mode_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_entropy_coding_mode_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_bipred_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_bipred_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_bipred_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_8x8_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_8x8_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_8x8_mode_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_8x8_mode_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn field_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn field_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pic_order_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_order_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pic_order_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pic_order_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn deblocking_filter_control_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_deblocking_filter_control_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn redundant_pic_cnt_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn redundant_pic_cnt_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_redundant_pic_cnt_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reference_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_reference_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + entropy_coding_mode_flag: u32, + weighted_pred_flag: u32, + weighted_bipred_idc: u32, + transform_8x8_mode_flag: u32, + field_pic_flag: u32, + constrained_intra_pred_flag: u32, + pic_order_present_flag: u32, + deblocking_filter_control_present_flag: u32, + redundant_pic_cnt_present_flag: u32, + reference_pic_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let entropy_coding_mode_flag: u32 = unsafe { ::std::mem::transmute(entropy_coding_mode_flag) }; + entropy_coding_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let weighted_bipred_idc: u32 = unsafe { ::std::mem::transmute(weighted_bipred_idc) }; + weighted_bipred_idc as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let transform_8x8_mode_flag: u32 = unsafe { ::std::mem::transmute(transform_8x8_mode_flag) }; + transform_8x8_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let field_pic_flag: u32 = unsafe { ::std::mem::transmute(field_pic_flag) }; + field_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let pic_order_present_flag: u32 = unsafe { ::std::mem::transmute(pic_order_present_flag) }; + pic_order_present_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let redundant_pic_cnt_present_flag: u32 = unsafe { ::std::mem::transmute(redundant_pic_cnt_present_flag) }; + redundant_pic_cnt_present_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) }; + reference_pic_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferH264__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " H.264 Picture Parameter Buffer"] +pub type VAPictureParameterBufferH264 = _VAPictureParameterBufferH264; +#[doc = " H.264 Inverse Quantization Matrix Buffer"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAIQMatrixBufferH264 { + #[doc = " \\brief 4x4 scaling list, in raster scan order."] + pub ScalingList4x4: [[u8; 16usize]; 6usize], + #[doc = " \\brief 8x8 scaling list, in raster scan order."] + pub ScalingList8x8: [[u8; 64usize]; 2usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAIQMatrixBufferH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " H.264 Inverse Quantization Matrix Buffer"] +pub type VAIQMatrixBufferH264 = _VAIQMatrixBufferH264; +#[doc = " H.264 Slice Parameter Buffer"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferH264 { + pub slice_data_size: u32, + #[doc = " \\brief Byte offset to the NAL Header Unit for this slice."] + pub slice_data_offset: u32, + pub slice_data_flag: u32, + #[doc = " \\brief Bit offset from NAL Header Unit to the begining of slice_data().\n\n This bit offset is relative to and includes the NAL unit byte\n and represents the number of bits parsed in the slice_header()\n after the removal of any emulation prevention bytes in\n there. However, the slice data buffer passed to the hardware is\n the original bitstream, thus including any emulation prevention\n bytes."] + pub slice_data_bit_offset: u16, + pub first_mb_in_slice: u16, + pub slice_type: u8, + pub direct_spatial_mv_pred_flag: u8, + #[doc = " H264/AVC syntax element\n\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l0_default_active_minus1."] + pub num_ref_idx_l0_active_minus1: u8, + #[doc = " H264/AVC syntax element\n\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l1_default_active_minus1."] + pub num_ref_idx_l1_active_minus1: u8, + pub cabac_init_idc: u8, + pub slice_qp_delta: i8, + pub disable_deblocking_filter_idc: u8, + pub slice_alpha_c0_offset_div2: i8, + pub slice_beta_offset_div2: i8, + pub RefPicList0: [VAPictureH264; 32usize], + pub RefPicList1: [VAPictureH264; 32usize], + pub luma_log2_weight_denom: u8, + pub chroma_log2_weight_denom: u8, + pub luma_weight_l0_flag: u8, + pub luma_weight_l0: [i16; 32usize], + pub luma_offset_l0: [i16; 32usize], + pub chroma_weight_l0_flag: u8, + pub chroma_weight_l0: [[i16; 2usize]; 32usize], + pub chroma_offset_l0: [[i16; 2usize]; 32usize], + pub luma_weight_l1_flag: u8, + pub luma_weight_l1: [i16; 32usize], + pub luma_offset_l1: [i16; 32usize], + pub chroma_weight_l1_flag: u8, + pub chroma_weight_l1: [[i16; 2usize]; 32usize], + pub chroma_offset_l1: [[i16; 2usize]; 32usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " H.264 Slice Parameter Buffer"] +pub type VASliceParameterBufferH264 = _VASliceParameterBufferH264; +pub mod VAEncPictureType { + #[doc = " Common encode data structures"] + pub type Type = ::std::os::raw::c_uint; + pub const VAEncPictureTypeIntra: Type = 0; + pub const VAEncPictureTypePredictive: Type = 1; + pub const VAEncPictureTypeBidirectional: Type = 2; +} +#[doc = " \\brief Coded buffer segment.\n\n #VACodedBufferSegment is an element of a linked list describing\n some information on the coded buffer. The coded buffer segment\n could contain either a single NAL unit, or more than one NAL unit.\n It is recommended (but not required) to return a single NAL unit\n in a coded buffer segment, and the implementation should set the\n VA_CODED_BUF_STATUS_SINGLE_NALU status flag if that is the case."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VACodedBufferSegment { + #[doc = " \\brief Size of the data buffer in this segment (in bytes)."] + pub size: u32, + #[doc = " \\brief Bit offset into the data buffer where the video data starts."] + pub bit_offset: u32, + #[doc = " \\brief Status set by the driver. See \\c VA_CODED_BUF_STATUS_*."] + pub status: u32, + #[doc = " \\brief Reserved for future use."] + pub reserved: u32, + #[doc = " \\brief Pointer to the start of the data buffer."] + pub buf: *mut ::std::os::raw::c_void, + #[doc = " \\brief Pointer to the next #VACodedBufferSegment element,\n or \\c NULL if there is none."] + pub next: *mut ::std::os::raw::c_void, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VACodedBufferSegment { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Coded buffer segment.\n\n #VACodedBufferSegment is an element of a linked list describing\n some information on the coded buffer. The coded buffer segment\n could contain either a single NAL unit, or more than one NAL unit.\n It is recommended (but not required) to return a single NAL unit\n in a coded buffer segment, and the implementation should set the\n VA_CODED_BUF_STATUS_SINGLE_NALU status flag if that is the case."] +pub type VACodedBufferSegment = _VACodedBufferSegment; +#[doc = " \\brief VA buffer information"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct VABufferInfo { + #[doc = " \\brief Buffer handle"] + pub handle: usize, + #[doc = " \\brief Buffer type (See \\ref VABufferType)."] + pub type_: u32, + #[doc = " \\brief Buffer memory type (See \\ref VASurfaceAttribMemoryType).\n\n On input to vaAcquireBufferHandle(), this field can serve as a hint\n to specify the set of memory types the caller is interested in.\n On successful return from vaAcquireBufferHandle(), the field is\n updated with the best matching memory type."] + pub mem_type: u32, + #[doc = " \\brief Size of the underlying buffer."] + pub mem_size: usize, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +pub mod VASurfaceStatus { + pub type Type = ::std::os::raw::c_uint; + pub const VASurfaceRendering: Type = 1; + pub const VASurfaceDisplaying: Type = 2; + pub const VASurfaceReady: Type = 4; + pub const VASurfaceSkipped: Type = 8; +} +pub mod VADecodeErrorType { + pub type Type = ::std::os::raw::c_uint; + pub const VADecodeSliceMissing: Type = 0; + pub const VADecodeMBError: Type = 1; + pub const VADecodeReset: Type = 2; +} +#[doc = " Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, server side returns\n an array of structure VASurfaceDecodeMBErrors, and the array is terminated by setting status=-1"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VASurfaceDecodeMBErrors { + pub status: i32, + pub start_mb: u32, + pub end_mb: u32, + pub decode_error_type: VADecodeErrorType::Type, + pub num_mb: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 3usize], +} +impl Default for _VASurfaceDecodeMBErrors { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, server side returns\n an array of structure VASurfaceDecodeMBErrors, and the array is terminated by setting status=-1"] +pub type VASurfaceDecodeMBErrors = _VASurfaceDecodeMBErrors; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAImageFormat { + pub fourcc: u32, + pub byte_order: u32, + pub bits_per_pixel: u32, + pub depth: u32, + pub red_mask: u32, + pub green_mask: u32, + pub blue_mask: u32, + pub alpha_mask: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +pub type VAImageFormat = _VAImageFormat; +pub type VAImageID = VAGenericID; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAImage { + pub image_id: VAImageID, + pub format: VAImageFormat, + pub buf: VABufferID, + pub width: u16, + pub height: u16, + pub data_size: u32, + pub num_planes: u32, + pub pitches: [u32; 3usize], + pub offsets: [u32; 3usize], + pub num_palette_entries: i32, + pub entry_bytes: i32, + pub component_order: [i8; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +pub type VAImage = _VAImage; +#[doc = " Subpictures\n Subpicture is a special type of image that can be blended\n with a surface during vaPutSurface(). Subpicture can be used to render\n DVD sub-titles or closed captioning text etc."] +pub type VASubpictureID = VAGenericID; +pub mod VADisplayAttribType { + #[doc = " Currently defined display attribute types"] + pub type Type = ::std::os::raw::c_uint; + pub const VADisplayAttribBrightness: Type = 0; + pub const VADisplayAttribContrast: Type = 1; + pub const VADisplayAttribHue: Type = 2; + pub const VADisplayAttribSaturation: Type = 3; + pub const VADisplayAttribBackgroundColor: Type = 4; + pub const VADisplayAttribDirectSurface: Type = 5; + pub const VADisplayAttribRotation: Type = 6; + pub const VADisplayAttribOutofLoopDeblock: Type = 7; + pub const VADisplayAttribBLEBlackMode: Type = 8; + pub const VADisplayAttribBLEWhiteMode: Type = 9; + pub const VADisplayAttribBlueStretch: Type = 10; + pub const VADisplayAttribSkinColorCorrection: Type = 11; + pub const VADisplayAttribCSCMatrix: Type = 12; + pub const VADisplayAttribBlendColor: Type = 13; + pub const VADisplayAttribOverlayAutoPaintColorKey: Type = 14; + pub const VADisplayAttribOverlayColorKey: Type = 15; + pub const VADisplayAttribRenderMode: Type = 16; + pub const VADisplayAttribRenderDevice: Type = 17; + pub const VADisplayAttribRenderRect: Type = 18; + pub const VADisplayAttribSubDevice: Type = 19; + pub const VADisplayAttribCopy: Type = 20; + pub const VADisplayPCIID: Type = 21; +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VADisplayAttribute { + pub type_: VADisplayAttribType::Type, + pub min_value: i32, + pub max_value: i32, + pub value: i32, + pub flags: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VADisplayAttribute { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VADisplayAttribute = _VADisplayAttribute; +#[doc = " HEVC data structures\n/\n/**\n \\brief Description of picture properties of those in DPB surfaces.\n\n If only progressive scan is supported, each surface contains one whole\n frame picture.\n Otherwise, each surface contains two fields of whole picture.\n In this case, two entries of ReferenceFrames[] may share same picture_id\n value."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureHEVC { + #[doc = " \\brief reconstructed picture buffer surface index\n invalid when taking value VA_INVALID_SURFACE."] + pub picture_id: VASurfaceID, + #[doc = " \\brief picture order count.\n in HEVC, POCs for top and bottom fields of same picture should\n take different values."] + pub pic_order_cnt: i32, + pub flags: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " HEVC data structures\n/\n/**\n \\brief Description of picture properties of those in DPB surfaces.\n\n If only progressive scan is supported, each surface contains one whole\n frame picture.\n Otherwise, each surface contains two fields of whole picture.\n In this case, two entries of ReferenceFrames[] may share same picture_id\n value."] +pub type VAPictureHEVC = _VAPictureHEVC; +pub mod VACopyObjectType { + pub type Type = ::std::os::raw::c_uint; + pub const VACopyObjectSurface: Type = 0; + pub const VACopyObjectBuffer: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VACopyObject { + pub obj_type: VACopyObjectType::Type, + pub object: _VACopyObject__bindgen_ty_1, + pub va_reserved: [u32; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VACopyObject__bindgen_ty_1 { + pub surface_id: VASurfaceID, + pub buffer_id: VABufferID, +} +impl Default for _VACopyObject__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VACopyObject { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VACopyObject = _VACopyObject; +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VACopyOption { + pub bits: _VACopyOption__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VACopyOption__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VACopyOption__bindgen_ty_1 { + #[inline] + pub fn va_copy_sync(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_va_copy_sync(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn va_copy_sync_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_va_copy_sync_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn va_copy_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 4u8) as u32) } + } + #[inline] + pub fn set_va_copy_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn va_copy_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_va_copy_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 26u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 26u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(va_copy_sync: u32, va_copy_mode: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let va_copy_sync: u32 = unsafe { ::std::mem::transmute(va_copy_sync) }; + va_copy_sync as u64 + }); + __bindgen_bitfield_unit.set(2usize, 4u8, { + let va_copy_mode: u32 = unsafe { ::std::mem::transmute(va_copy_mode) }; + va_copy_mode as u64 + }); + __bindgen_bitfield_unit.set(6usize, 26u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VACopyOption { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VACopyOption = _VACopyOption; +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferHEVC { + #[doc = " \\brief buffer description of decoded current picture\n only VA_PICTURE_HEVC_FIELD_PIC and VA_PICTURE_HEVC_BOTTOM_FIELD\n of \"flags\" fields are meaningful."] + pub CurrPic: VAPictureHEVC, + #[doc = " \\brief buffer description of reference frames in DPB"] + pub ReferenceFrames: [VAPictureHEVC; 15usize], + #[doc = " \\brief picture width, shall be integer multiple of minimum CB size."] + pub pic_width_in_luma_samples: u16, + #[doc = " \\brief picture height, shall be integer multiple of minimum CB size."] + pub pic_height_in_luma_samples: u16, + pub pic_fields: _VAPictureParameterBufferHEVC__bindgen_ty_1, + #[doc = " following parameters have same syntax with those in HEVC spec */\n/** \\brief DPB size for current temporal layer"] + pub sps_max_dec_pic_buffering_minus1: u8, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub pcm_sample_bit_depth_luma_minus1: u8, + pub pcm_sample_bit_depth_chroma_minus1: u8, + pub log2_min_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_luma_coding_block_size: u8, + pub log2_min_transform_block_size_minus2: u8, + pub log2_diff_max_min_transform_block_size: u8, + pub log2_min_pcm_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_pcm_luma_coding_block_size: u8, + pub max_transform_hierarchy_depth_intra: u8, + pub max_transform_hierarchy_depth_inter: u8, + pub init_qp_minus26: i8, + pub diff_cu_qp_delta_depth: u8, + pub pps_cb_qp_offset: i8, + pub pps_cr_qp_offset: i8, + pub log2_parallel_merge_level_minus2: u8, + pub num_tile_columns_minus1: u8, + pub num_tile_rows_minus1: u8, + #[doc = " when uniform_spacing_flag equals 1, application should populate\n column_width_minus[], and row_height_minus1[] with approperiate values."] + pub column_width_minus1: [u16; 19usize], + pub row_height_minus1: [u16; 21usize], + pub slice_parsing_fields: _VAPictureParameterBufferHEVC__bindgen_ty_2, + #[doc = " following parameters have same syntax with those in HEVC spec"] + pub log2_max_pic_order_cnt_lsb_minus4: u8, + pub num_short_term_ref_pic_sets: u8, + pub num_long_term_ref_pic_sps: u8, + pub num_ref_idx_l0_default_active_minus1: u8, + pub num_ref_idx_l1_default_active_minus1: u8, + pub pps_beta_offset_div2: i8, + pub pps_tc_offset_div2: i8, + pub num_extra_slice_header_bits: u8, + #[doc = " \\brief number of bits that structure\n short_term_ref_pic_set( num_short_term_ref_pic_sets ) takes in slice\n segment header when short_term_ref_pic_set_sps_flag equals 0.\n if short_term_ref_pic_set_sps_flag equals 1, the value should be 0.\n the bit count is calculated after emulation prevention bytes are removed\n from bit streams.\n This variable is used for accelorater to skip parsing the\n short_term_ref_pic_set( num_short_term_ref_pic_sets ) structure."] + pub st_rps_bits: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferHEVC__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn chroma_format_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_format_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn separate_colour_plane_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_separate_colour_plane_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pcm_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pcm_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn scaling_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn scaling_list_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_scaling_list_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_skip_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_skip_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_skip_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn amp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_amp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn amp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_amp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn strong_intra_smoothing_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_strong_intra_smoothing_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_data_hiding_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_data_hiding_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_data_hiding_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cu_qp_delta_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cu_qp_delta_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cu_qp_delta_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_bipred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_bipred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_bipred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transquant_bypass_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transquant_bypass_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transquant_bypass_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn tiles_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tiles_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn entropy_coding_sync_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn entropy_coding_sync_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_entropy_coding_sync_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_across_tiles_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_across_tiles_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pcm_loop_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pcm_loop_filter_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pcm_loop_filter_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn NoPicReorderingFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_NoPicReorderingFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn NoPicReorderingFlag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_NoPicReorderingFlag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn NoBiPredFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_NoBiPredFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn NoBiPredFlag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_NoBiPredFlag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ReservedBits(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) } + } + #[inline] + pub fn set_ReservedBits(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 11u8, val as u64) + } + } + #[inline] + pub unsafe fn ReservedBits_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 11u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ReservedBits_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 11u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + chroma_format_idc: u32, + separate_colour_plane_flag: u32, + pcm_enabled_flag: u32, + scaling_list_enabled_flag: u32, + transform_skip_enabled_flag: u32, + amp_enabled_flag: u32, + strong_intra_smoothing_enabled_flag: u32, + sign_data_hiding_enabled_flag: u32, + constrained_intra_pred_flag: u32, + cu_qp_delta_enabled_flag: u32, + weighted_pred_flag: u32, + weighted_bipred_flag: u32, + transquant_bypass_enabled_flag: u32, + tiles_enabled_flag: u32, + entropy_coding_sync_enabled_flag: u32, + pps_loop_filter_across_slices_enabled_flag: u32, + loop_filter_across_tiles_enabled_flag: u32, + pcm_loop_filter_disabled_flag: u32, + NoPicReorderingFlag: u32, + NoBiPredFlag: u32, + ReservedBits: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) }; + chroma_format_idc as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let separate_colour_plane_flag: u32 = unsafe { ::std::mem::transmute(separate_colour_plane_flag) }; + separate_colour_plane_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let pcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_enabled_flag) }; + pcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let scaling_list_enabled_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_enabled_flag) }; + scaling_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let transform_skip_enabled_flag: u32 = unsafe { ::std::mem::transmute(transform_skip_enabled_flag) }; + transform_skip_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let amp_enabled_flag: u32 = unsafe { ::std::mem::transmute(amp_enabled_flag) }; + amp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let strong_intra_smoothing_enabled_flag: u32 = + unsafe { ::std::mem::transmute(strong_intra_smoothing_enabled_flag) }; + strong_intra_smoothing_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let sign_data_hiding_enabled_flag: u32 = unsafe { ::std::mem::transmute(sign_data_hiding_enabled_flag) }; + sign_data_hiding_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let cu_qp_delta_enabled_flag: u32 = unsafe { ::std::mem::transmute(cu_qp_delta_enabled_flag) }; + cu_qp_delta_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let weighted_bipred_flag: u32 = unsafe { ::std::mem::transmute(weighted_bipred_flag) }; + weighted_bipred_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let transquant_bypass_enabled_flag: u32 = unsafe { ::std::mem::transmute(transquant_bypass_enabled_flag) }; + transquant_bypass_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let tiles_enabled_flag: u32 = unsafe { ::std::mem::transmute(tiles_enabled_flag) }; + tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let entropy_coding_sync_enabled_flag: u32 = + unsafe { ::std::mem::transmute(entropy_coding_sync_enabled_flag) }; + entropy_coding_sync_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let pps_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::std::mem::transmute(pps_loop_filter_across_slices_enabled_flag) }; + pps_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let loop_filter_across_tiles_enabled_flag: u32 = + unsafe { ::std::mem::transmute(loop_filter_across_tiles_enabled_flag) }; + loop_filter_across_tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let pcm_loop_filter_disabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_loop_filter_disabled_flag) }; + pcm_loop_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let NoPicReorderingFlag: u32 = unsafe { ::std::mem::transmute(NoPicReorderingFlag) }; + NoPicReorderingFlag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let NoBiPredFlag: u32 = unsafe { ::std::mem::transmute(NoBiPredFlag) }; + NoBiPredFlag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 11u8, { + let ReservedBits: u32 = unsafe { ::std::mem::transmute(ReservedBits) }; + ReservedBits as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferHEVC__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Parameters needed for parsing slice segment headers"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferHEVC__bindgen_ty_2 { + pub bits: _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn lists_modification_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_lists_modification_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn lists_modification_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_lists_modification_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn long_term_ref_pics_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_ref_pics_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn long_term_ref_pics_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_long_term_ref_pics_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sps_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sps_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cabac_init_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_init_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cabac_init_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cabac_init_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn output_flag_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_output_flag_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn output_flag_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_output_flag_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dependent_slice_segments_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dependent_slice_segments_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pps_slice_chroma_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_chroma_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_slice_chroma_qp_offsets_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_slice_chroma_qp_offsets_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_sample_adaptive_offset_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_adaptive_offset_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sample_adaptive_offset_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn deblocking_filter_override_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_override_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn deblocking_filter_override_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_deblocking_filter_override_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pps_disable_deblocking_filter_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_disable_deblocking_filter_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_disable_deblocking_filter_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_disable_deblocking_filter_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_segment_header_extension_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_segment_header_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_segment_header_extension_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_segment_header_extension_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn RapPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_RapPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn RapPicFlag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_RapPicFlag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn IdrPicFlag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_IdrPicFlag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn IntraPicFlag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_IntraPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn IntraPicFlag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_IntraPicFlag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ReservedBits(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } + } + #[inline] + pub fn set_ReservedBits(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 18u8, val as u64) + } + } + #[inline] + pub unsafe fn ReservedBits_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 18u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ReservedBits_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 18u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + lists_modification_present_flag: u32, + long_term_ref_pics_present_flag: u32, + sps_temporal_mvp_enabled_flag: u32, + cabac_init_present_flag: u32, + output_flag_present_flag: u32, + dependent_slice_segments_enabled_flag: u32, + pps_slice_chroma_qp_offsets_present_flag: u32, + sample_adaptive_offset_enabled_flag: u32, + deblocking_filter_override_enabled_flag: u32, + pps_disable_deblocking_filter_flag: u32, + slice_segment_header_extension_present_flag: u32, + RapPicFlag: u32, + IdrPicFlag: u32, + IntraPicFlag: u32, + ReservedBits: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let lists_modification_present_flag: u32 = + unsafe { ::std::mem::transmute(lists_modification_present_flag) }; + lists_modification_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let long_term_ref_pics_present_flag: u32 = + unsafe { ::std::mem::transmute(long_term_ref_pics_present_flag) }; + long_term_ref_pics_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let sps_temporal_mvp_enabled_flag: u32 = unsafe { ::std::mem::transmute(sps_temporal_mvp_enabled_flag) }; + sps_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cabac_init_present_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_present_flag) }; + cabac_init_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let output_flag_present_flag: u32 = unsafe { ::std::mem::transmute(output_flag_present_flag) }; + output_flag_present_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let dependent_slice_segments_enabled_flag: u32 = + unsafe { ::std::mem::transmute(dependent_slice_segments_enabled_flag) }; + dependent_slice_segments_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let pps_slice_chroma_qp_offsets_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_slice_chroma_qp_offsets_present_flag) }; + pps_slice_chroma_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let sample_adaptive_offset_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sample_adaptive_offset_enabled_flag) }; + sample_adaptive_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let deblocking_filter_override_enabled_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_override_enabled_flag) }; + deblocking_filter_override_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let pps_disable_deblocking_filter_flag: u32 = + unsafe { ::std::mem::transmute(pps_disable_deblocking_filter_flag) }; + pps_disable_deblocking_filter_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let slice_segment_header_extension_present_flag: u32 = + unsafe { ::std::mem::transmute(slice_segment_header_extension_present_flag) }; + slice_segment_header_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let RapPicFlag: u32 = unsafe { ::std::mem::transmute(RapPicFlag) }; + RapPicFlag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::std::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let IntraPicFlag: u32 = unsafe { ::std::mem::transmute(IntraPicFlag) }; + IntraPicFlag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 18u8, { + let ReservedBits: u32 = unsafe { ::std::mem::transmute(ReservedBits) }; + ReservedBits as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferHEVC__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"] +pub type VAPictureParameterBufferHEVC = _VAPictureParameterBufferHEVC; +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure for Range Extension\n\n This structure conveys picture level HEVC Range Extension parameters\n and should be sent once per frame. This data structure should be sent\n together with VAPictureParameterBufferHEVC in a single buffer of\n \\ref VAPictureParameterBufferHEVCExtension since each frame\n of HEVC range extension contains both picture level parameters and picture\n level range extension parameters. They should be parsed together. The buffer\n type is same as \\ref VAPictureParameterBufferHEVC.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferHEVCRext { + pub range_extension_pic_fields: _VAPictureParameterBufferHEVCRext__bindgen_ty_1, + #[doc = " \\brief HEVC range extension flags\n The following flags bears the same syntax and semantics as\n those defined in HEVC bit stream spec."] + pub diff_cu_chroma_qp_offset_depth: u8, + pub chroma_qp_offset_list_len_minus1: u8, + pub log2_sao_offset_scale_luma: u8, + pub log2_sao_offset_scale_chroma: u8, + pub log2_max_transform_skip_block_size_minus2: u8, + pub cb_qp_offset_list: [i8; 6usize], + pub cr_qp_offset_list: [i8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferHEVCRext__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn transform_skip_rotation_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_rotation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_skip_rotation_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_skip_rotation_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_skip_context_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_context_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_skip_context_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_skip_context_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn implicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_implicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn implicit_rdpcm_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_implicit_rdpcm_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn explicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_explicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn explicit_rdpcm_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_explicit_rdpcm_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn extended_precision_processing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_extended_precision_processing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn extended_precision_processing_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_extended_precision_processing_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_smoothing_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_smoothing_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_smoothing_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_smoothing_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn high_precision_offsets_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_high_precision_offsets_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn high_precision_offsets_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_high_precision_offsets_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn persistent_rice_adaptation_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_persistent_rice_adaptation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn persistent_rice_adaptation_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_persistent_rice_adaptation_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cabac_bypass_alignment_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_bypass_alignment_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cabac_bypass_alignment_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cabac_bypass_alignment_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cross_component_prediction_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_cross_component_prediction_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cross_component_prediction_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cross_component_prediction_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn chroma_qp_offset_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_qp_offset_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_qp_offset_list_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_qp_offset_list_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 21u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 21u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 21u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 21u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + transform_skip_rotation_enabled_flag: u32, + transform_skip_context_enabled_flag: u32, + implicit_rdpcm_enabled_flag: u32, + explicit_rdpcm_enabled_flag: u32, + extended_precision_processing_flag: u32, + intra_smoothing_disabled_flag: u32, + high_precision_offsets_enabled_flag: u32, + persistent_rice_adaptation_enabled_flag: u32, + cabac_bypass_alignment_enabled_flag: u32, + cross_component_prediction_enabled_flag: u32, + chroma_qp_offset_list_enabled_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let transform_skip_rotation_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transform_skip_rotation_enabled_flag) }; + transform_skip_rotation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let transform_skip_context_enabled_flag: u32 = + unsafe { ::std::mem::transmute(transform_skip_context_enabled_flag) }; + transform_skip_context_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let implicit_rdpcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(implicit_rdpcm_enabled_flag) }; + implicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let explicit_rdpcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(explicit_rdpcm_enabled_flag) }; + explicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let extended_precision_processing_flag: u32 = + unsafe { ::std::mem::transmute(extended_precision_processing_flag) }; + extended_precision_processing_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let intra_smoothing_disabled_flag: u32 = unsafe { ::std::mem::transmute(intra_smoothing_disabled_flag) }; + intra_smoothing_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let high_precision_offsets_enabled_flag: u32 = + unsafe { ::std::mem::transmute(high_precision_offsets_enabled_flag) }; + high_precision_offsets_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let persistent_rice_adaptation_enabled_flag: u32 = + unsafe { ::std::mem::transmute(persistent_rice_adaptation_enabled_flag) }; + persistent_rice_adaptation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let cabac_bypass_alignment_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cabac_bypass_alignment_enabled_flag) }; + cabac_bypass_alignment_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let cross_component_prediction_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cross_component_prediction_enabled_flag) }; + cross_component_prediction_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let chroma_qp_offset_list_enabled_flag: u32 = + unsafe { ::std::mem::transmute(chroma_qp_offset_list_enabled_flag) }; + chroma_qp_offset_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 21u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferHEVCRext__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferHEVCRext { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure for Range Extension\n\n This structure conveys picture level HEVC Range Extension parameters\n and should be sent once per frame. This data structure should be sent\n together with VAPictureParameterBufferHEVC in a single buffer of\n \\ref VAPictureParameterBufferHEVCExtension since each frame\n of HEVC range extension contains both picture level parameters and picture\n level range extension parameters. They should be parsed together. The buffer\n type is same as \\ref VAPictureParameterBufferHEVC.\n"] +pub type VAPictureParameterBufferHEVCRext = _VAPictureParameterBufferHEVCRext; +#[doc = "\\brief HEVC Decoding Picture Parameter Buffer Structure for\nScreen Content extension\n\nThis structure conveys picture level HEVC Scc parameters\nand should be sent once per frame. This data structure should be sent\ntogether with VAPictureParameterBufferHEVC and VAPictureParameterBufferHEVCRext\nin a single buffer of \\ref VAPictureParameterBufferHEVCExtension since each\nframe of HEVC SCC contains picture level parameters, picture level range\nextension parameters and picture level Scc parameters. They should be parsed\ntogether and the buffer type is same as \\ref VAPictureParameterBufferHEVC.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferHEVCScc { + pub screen_content_pic_fields: _VAPictureParameterBufferHEVCScc__bindgen_ty_1, + pub palette_max_size: u8, + pub delta_palette_max_predictor_size: u8, + #[doc = " \\brief Size of initial palette predictor.\n It is derived from pps_num_palette_predictor_initializer or\n sps_num_palette_predictor_initializer_minus1.\n Details in HEVC SCC spec section 9.3.2.3."] + pub predictor_palette_size: u8, + #[doc = " \\brief Palette predictor initializer.\n It is derived from pps_palette_predictor_initializers[][]\n or sps_palette_predictor_initializers[][].\n Details in HEVC SCC spec section 9.3.2.3."] + pub predictor_palette_entries: [[u16; 128usize]; 3usize], + pub pps_act_y_qp_offset_plus5: i8, + pub pps_act_cb_qp_offset_plus5: i8, + pub pps_act_cr_qp_offset_plus3: i8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferHEVCScc__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn pps_curr_pic_ref_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_curr_pic_ref_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_curr_pic_ref_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn palette_mode_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_palette_mode_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn palette_mode_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_palette_mode_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn motion_vector_resolution_control_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_motion_vector_resolution_control_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn motion_vector_resolution_control_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_motion_vector_resolution_control_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_boundary_filtering_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_boundary_filtering_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_boundary_filtering_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_boundary_filtering_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn residual_adaptive_colour_transform_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_residual_adaptive_colour_transform_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn residual_adaptive_colour_transform_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_residual_adaptive_colour_transform_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pps_slice_act_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_act_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_slice_act_qp_offsets_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_slice_act_qp_offsets_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 25u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 25u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 25u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + pps_curr_pic_ref_enabled_flag: u32, + palette_mode_enabled_flag: u32, + motion_vector_resolution_control_idc: u32, + intra_boundary_filtering_disabled_flag: u32, + residual_adaptive_colour_transform_enabled_flag: u32, + pps_slice_act_qp_offsets_present_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pps_curr_pic_ref_enabled_flag: u32 = unsafe { ::std::mem::transmute(pps_curr_pic_ref_enabled_flag) }; + pps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let palette_mode_enabled_flag: u32 = unsafe { ::std::mem::transmute(palette_mode_enabled_flag) }; + palette_mode_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let motion_vector_resolution_control_idc: u32 = + unsafe { ::std::mem::transmute(motion_vector_resolution_control_idc) }; + motion_vector_resolution_control_idc as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let intra_boundary_filtering_disabled_flag: u32 = + unsafe { ::std::mem::transmute(intra_boundary_filtering_disabled_flag) }; + intra_boundary_filtering_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let residual_adaptive_colour_transform_enabled_flag: u32 = + unsafe { ::std::mem::transmute(residual_adaptive_colour_transform_enabled_flag) }; + residual_adaptive_colour_transform_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let pps_slice_act_qp_offsets_present_flag: u32 = + unsafe { ::std::mem::transmute(pps_slice_act_qp_offsets_present_flag) }; + pps_slice_act_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 25u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferHEVCScc__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferHEVCScc { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = "\\brief HEVC Decoding Picture Parameter Buffer Structure for\nScreen Content extension\n\nThis structure conveys picture level HEVC Scc parameters\nand should be sent once per frame. This data structure should be sent\ntogether with VAPictureParameterBufferHEVC and VAPictureParameterBufferHEVCRext\nin a single buffer of \\ref VAPictureParameterBufferHEVCExtension since each\nframe of HEVC SCC contains picture level parameters, picture level range\nextension parameters and picture level Scc parameters. They should be parsed\ntogether and the buffer type is same as \\ref VAPictureParameterBufferHEVC.\n"] +pub type VAPictureParameterBufferHEVCScc = _VAPictureParameterBufferHEVCScc; +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure including Extensions\n\n This structure conveys picture level HEVC parameters including basic version 1\n and range extension and screen content extension.\n The data buffer should be sent once per frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferHEVCExtension { + #[doc = " \\brief basic HEVC picture parameters data structure"] + pub base: VAPictureParameterBufferHEVC, + #[doc = " \\brief HEVC range extension picture parameters data structure"] + pub rext: VAPictureParameterBufferHEVCRext, + #[doc = " \\brief HEVC screen content picture parameters data structure"] + pub scc: VAPictureParameterBufferHEVCScc, +} +impl Default for _VAPictureParameterBufferHEVCExtension { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure including Extensions\n\n This structure conveys picture level HEVC parameters including basic version 1\n and range extension and screen content extension.\n The data buffer should be sent once per frame.\n"] +pub type VAPictureParameterBufferHEVCExtension = _VAPictureParameterBufferHEVCExtension; +#[doc = " \\brief HEVC Slice Parameter Buffer Structure For Long Format\n\n VASliceParameterBufferHEVC structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice.\n\n For short format, this data structure is not sent by application.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASliceParameterBufferHEVC { + #[doc = " \\brief Number of bytes in the slice data buffer for this slice\n counting from and including NAL unit header."] + pub slice_data_size: u32, + #[doc = " \\brief The offset to the NAL unit header for this slice"] + pub slice_data_offset: u32, + #[doc = " \\brief Slice data buffer flags. See \\c VA_SLICE_DATA_FLAG_XXX."] + pub slice_data_flag: u32, + #[doc = " \\brief Byte offset from NAL unit header to the begining of slice_data().\n\n This byte offset is relative to and includes the NAL unit header\n and represents the number of bytes parsed in the slice_header()\n after the removal of any emulation prevention bytes in\n there. However, the slice data buffer passed to the hardware is\n the original bitstream, thus including any emulation prevention\n bytes."] + pub slice_data_byte_offset: u32, + #[doc = " HEVC syntax element."] + pub slice_segment_address: u32, + #[doc = " \\brief index into ReferenceFrames[]\n RefPicList[0][] corresponds to RefPicList0[] of HEVC variable.\n RefPicList[1][] corresponds to RefPicList1[] of HEVC variable.\n value range [0..14, 0xFF], where 0xFF indicates invalid entry."] + pub RefPicList: [[u8; 15usize]; 2usize], + pub LongSliceFlags: _VASliceParameterBufferHEVC__bindgen_ty_1, + #[doc = " HEVC syntax element. Collocated Reference Picture Index.\n index to RefPicList[0][] or RefPicList[1][].\n when slice_temporal_mvp_enabled_flag equals 0, it should take value 0xFF.\n value range [0..14, 0xFF]."] + pub collocated_ref_idx: u8, + #[doc = " HEVC syntax element.\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l0_default_active_minus1."] + pub num_ref_idx_l0_active_minus1: u8, + #[doc = " HEVC syntax element.\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l1_default_active_minus1."] + pub num_ref_idx_l1_active_minus1: u8, + #[doc = " HEVC syntax element."] + pub slice_qp_delta: i8, + #[doc = " HEVC syntax element."] + pub slice_cb_qp_offset: i8, + #[doc = " HEVC syntax element."] + pub slice_cr_qp_offset: i8, + #[doc = " HEVC syntax element."] + pub slice_beta_offset_div2: i8, + #[doc = " HEVC syntax element."] + pub slice_tc_offset_div2: i8, + #[doc = " HEVC syntax element."] + pub luma_log2_weight_denom: u8, + #[doc = " HEVC syntax element."] + pub delta_chroma_log2_weight_denom: i8, + #[doc = " HEVC syntax element."] + pub delta_luma_weight_l0: [i8; 15usize], + #[doc = " HEVC syntax element."] + pub luma_offset_l0: [i8; 15usize], + #[doc = " HEVC syntax element."] + pub delta_chroma_weight_l0: [[i8; 2usize]; 15usize], + #[doc = " corresponds to HEVC spec variable of the same name."] + pub ChromaOffsetL0: [[i8; 2usize]; 15usize], + #[doc = " HEVC syntax element."] + pub delta_luma_weight_l1: [i8; 15usize], + #[doc = " HEVC syntax element."] + pub luma_offset_l1: [i8; 15usize], + #[doc = " HEVC syntax element."] + pub delta_chroma_weight_l1: [[i8; 2usize]; 15usize], + #[doc = " corresponds to HEVC spec variable of the same name."] + pub ChromaOffsetL1: [[i8; 2usize]; 15usize], + #[doc = " HEVC syntax element."] + pub five_minus_max_num_merge_cand: u8, + #[doc = " HEVC syntax element."] + pub num_entry_point_offsets: u16, + #[doc = " HEVC syntax element."] + pub entry_offset_to_subset_array: u16, + #[doc = " \\brief Number of emulation prevention bytes in slice header."] + pub slice_data_num_emu_prevn_bytes: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 2usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VASliceParameterBufferHEVC__bindgen_ty_1 { + pub value: u32, + pub fields: _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn LastSliceOfPic(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_LastSliceOfPic(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn LastSliceOfPic_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_LastSliceOfPic_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dependent_slice_segment_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segment_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dependent_slice_segment_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dependent_slice_segment_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_slice_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn color_plane_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_color_plane_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn color_plane_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_color_plane_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_sao_luma_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_luma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_sao_luma_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_sao_luma_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_sao_chroma_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_chroma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_sao_chroma_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_sao_chroma_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mvd_l1_zero_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_mvd_l1_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mvd_l1_zero_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mvd_l1_zero_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cabac_init_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_init_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cabac_init_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cabac_init_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_deblocking_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_deblocking_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_deblocking_filter_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_deblocking_filter_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn collocated_from_l0_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_collocated_from_l0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn collocated_from_l0_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_collocated_from_l0_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 18u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 18u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 18u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + LastSliceOfPic: u32, + dependent_slice_segment_flag: u32, + slice_type: u32, + color_plane_id: u32, + slice_sao_luma_flag: u32, + slice_sao_chroma_flag: u32, + mvd_l1_zero_flag: u32, + cabac_init_flag: u32, + slice_temporal_mvp_enabled_flag: u32, + slice_deblocking_filter_disabled_flag: u32, + collocated_from_l0_flag: u32, + slice_loop_filter_across_slices_enabled_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let LastSliceOfPic: u32 = unsafe { ::std::mem::transmute(LastSliceOfPic) }; + LastSliceOfPic as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let dependent_slice_segment_flag: u32 = unsafe { ::std::mem::transmute(dependent_slice_segment_flag) }; + dependent_slice_segment_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let slice_type: u32 = unsafe { ::std::mem::transmute(slice_type) }; + slice_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let color_plane_id: u32 = unsafe { ::std::mem::transmute(color_plane_id) }; + color_plane_id as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let slice_sao_luma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_luma_flag) }; + slice_sao_luma_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let slice_sao_chroma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_chroma_flag) }; + slice_sao_chroma_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mvd_l1_zero_flag: u32 = unsafe { ::std::mem::transmute(mvd_l1_zero_flag) }; + mvd_l1_zero_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let cabac_init_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_flag) }; + cabac_init_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let slice_temporal_mvp_enabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_temporal_mvp_enabled_flag) }; + slice_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let slice_deblocking_filter_disabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_deblocking_filter_disabled_flag) }; + slice_deblocking_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let collocated_from_l0_flag: u32 = unsafe { ::std::mem::transmute(collocated_from_l0_flag) }; + collocated_from_l0_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let slice_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_loop_filter_across_slices_enabled_flag) }; + slice_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 18u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VASliceParameterBufferHEVC__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VASliceParameterBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Slice Parameter Buffer Structure For Long Format\n\n VASliceParameterBufferHEVC structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice.\n\n For short format, this data structure is not sent by application.\n"] +pub type VASliceParameterBufferHEVC = _VASliceParameterBufferHEVC; +#[doc = " \\brief HEVC Extented Slice Parameter Buffer Structure For Long Format\n\n This data structure contains extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCRext structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice with VASliceParameterBufferHEVC in a single buffer of\n \\ref VASliceParameterBufferHEVCExtension and the buffer type is same as \\ref\n VASliceParameterBufferHEVC.\n\n For short format, this data structure is not sent by application.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASliceParameterBufferHEVCRext { + pub luma_offset_l0: [i16; 15usize], + pub ChromaOffsetL0: [[i16; 2usize]; 15usize], + pub luma_offset_l1: [i16; 15usize], + pub ChromaOffsetL1: [[i16; 2usize]; 15usize], + pub slice_ext_flags: _VASliceParameterBufferHEVCRext__bindgen_ty_1, + #[doc = " \\brief Screen Content Extension parameters.\n data range [-12..12]"] + pub slice_act_y_qp_offset: i8, + pub slice_act_cb_qp_offset: i8, + pub slice_act_cr_qp_offset: i8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VASliceParameterBufferHEVCRext__bindgen_ty_1 { + pub bits: _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cu_chroma_qp_offset_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_chroma_qp_offset_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cu_chroma_qp_offset_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cu_chroma_qp_offset_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_integer_mv_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_integer_mv_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_integer_mv_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_integer_mv_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 30u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 30u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + cu_chroma_qp_offset_enabled_flag: u32, + use_integer_mv_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cu_chroma_qp_offset_enabled_flag: u32 = + unsafe { ::std::mem::transmute(cu_chroma_qp_offset_enabled_flag) }; + cu_chroma_qp_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let use_integer_mv_flag: u32 = unsafe { ::std::mem::transmute(use_integer_mv_flag) }; + use_integer_mv_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VASliceParameterBufferHEVCRext__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VASliceParameterBufferHEVCRext { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Extented Slice Parameter Buffer Structure For Long Format\n\n This data structure contains extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCRext structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice with VASliceParameterBufferHEVC in a single buffer of\n \\ref VASliceParameterBufferHEVCExtension and the buffer type is same as \\ref\n VASliceParameterBufferHEVC.\n\n For short format, this data structure is not sent by application.\n"] +pub type VASliceParameterBufferHEVCRext = _VASliceParameterBufferHEVCRext; +#[doc = " \\brief HEVC Decoding Slice Parameter Buffer Structure For Long Format including Extensions\n\n This data structure contains both baseline HEVC profiles (main, main10)\n and extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCExtension structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice. For HEVC range extension and HEVC Scc decoding,\n application should parse both basic slice parameters and extented slice\n parameters into this buffer structure and sent it.\n\n For short format, this data structure is not sent by application.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASliceParameterBufferHEVCExtension { + #[doc = " \\brief baseline HEVC slice parameters data structure"] + pub base: VASliceParameterBufferHEVC, + #[doc = " \\brief extented HEVC slice parameters data structure"] + pub rext: VASliceParameterBufferHEVCRext, +} +impl Default for _VASliceParameterBufferHEVCExtension { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Decoding Slice Parameter Buffer Structure For Long Format including Extensions\n\n This data structure contains both baseline HEVC profiles (main, main10)\n and extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCExtension structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice. For HEVC range extension and HEVC Scc decoding,\n application should parse both basic slice parameters and extented slice\n parameters into this buffer structure and sent it.\n\n For short format, this data structure is not sent by application.\n"] +pub type VASliceParameterBufferHEVCExtension = _VASliceParameterBufferHEVCExtension; +#[doc = " \\brief HEVC Inverse Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1.\n When sps_scaling_list_data_present_flag = 0, app still\n needs to send in this structure with default matrix values.\n\n Matrix entries are in raster scan order which follows HEVC spec."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAIQMatrixBufferHEVC { + #[doc = " \\brief scaling lists,\n corresponds to same HEVC spec syntax element\n ScalingList[ i ][ MatrixID ][ j ].\n\n \\brief 4x4 scaling,\n correspongs i = 0, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 15, inclusive."] + pub ScalingList4x4: [[u8; 16usize]; 6usize], + #[doc = " \\brief 8x8 scaling,\n correspongs i = 1, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 63, inclusive."] + pub ScalingList8x8: [[u8; 64usize]; 6usize], + #[doc = " \\brief 16x16 scaling,\n correspongs i = 2, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 63, inclusive."] + pub ScalingList16x16: [[u8; 64usize]; 6usize], + #[doc = " \\brief 32x32 scaling,\n correspongs i = 3, MatrixID is in the range of 0 to 1,\n inclusive. And j is in the range of 0 to 63, inclusive."] + pub ScalingList32x32: [[u8; 64usize]; 2usize], + #[doc = " \\brief DC values of the 16x16 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 2 and matrixID in the range of 0 to 5, inclusive."] + pub ScalingListDC16x16: [u8; 6usize], + #[doc = " \\brief DC values of the 32x32 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 3 and matrixID in the range of 0 to 1, inclusive."] + pub ScalingListDC32x32: [u8; 2usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAIQMatrixBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Inverse Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1.\n When sps_scaling_list_data_present_flag = 0, app still\n needs to send in this structure with default matrix values.\n\n Matrix entries are in raster scan order which follows HEVC spec."] +pub type VAIQMatrixBufferHEVC = _VAIQMatrixBufferHEVC; +#[doc = " \\brief Picture parameter for JPEG decoding.\n\n This structure holds information from the frame header, along with\n definitions from additional segments."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferJPEGBaseline { + #[doc = " \\brief Picture width in pixels."] + pub picture_width: u16, + #[doc = " \\brief Picture height in pixels."] + pub picture_height: u16, + pub components: [_VAPictureParameterBufferJPEGBaseline__bindgen_ty_1; 255usize], + #[doc = " \\brief Number of components in frame (Nf)."] + pub num_components: u8, + #[doc = " \\brief Input color space 0: YUV, 1: RGB, 2: BGR, others: reserved"] + pub color_space: u8, + #[doc = " \\brief Set to VA_ROTATION_* for a single rotation angle reported by VAConfigAttribDecJPEG."] + pub rotation: u32, + #[doc = " \\brief crop rectangle boundary in pixels"] + pub crop_rectangle: VARectangle, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 5usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferJPEGBaseline__bindgen_ty_1 { + #[doc = " \\brief Component identifier (Ci)."] + pub component_id: u8, + #[doc = " \\brief Horizontal sampling factor (Hi)."] + pub h_sampling_factor: u8, + #[doc = " \\brief Vertical sampling factor (Vi)."] + pub v_sampling_factor: u8, + pub quantiser_table_selector: u8, +} +impl Default for _VAPictureParameterBufferJPEGBaseline { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Picture parameter for JPEG decoding.\n\n This structure holds information from the frame header, along with\n definitions from additional segments."] +pub type VAPictureParameterBufferJPEGBaseline = _VAPictureParameterBufferJPEGBaseline; +#[doc = " \\brief Quantization table for JPEG decoding.\n\n This structure holds the complete quantization tables. This is an\n aggregation of all quantization table (DQT) segments maintained by\n the application. i.e. up to 4 quantization tables are stored in\n there for baseline profile.\n\n The #load_quantization_table array can be used as a hint to notify\n the VA driver implementation about which table(s) actually changed\n since the last submission of this buffer.\n\n The #quantiser_table values are specified in zig-zag scan order."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAIQMatrixBufferJPEGBaseline { + #[doc = " \\brief Specifies which #quantiser_table is valid."] + pub load_quantiser_table: [u8; 4usize], + #[doc = " \\brief Quanziation tables indexed by table identifier (Tqi)."] + pub quantiser_table: [[u8; 64usize]; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAIQMatrixBufferJPEGBaseline { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Quantization table for JPEG decoding.\n\n This structure holds the complete quantization tables. This is an\n aggregation of all quantization table (DQT) segments maintained by\n the application. i.e. up to 4 quantization tables are stored in\n there for baseline profile.\n\n The #load_quantization_table array can be used as a hint to notify\n the VA driver implementation about which table(s) actually changed\n since the last submission of this buffer.\n\n The #quantiser_table values are specified in zig-zag scan order."] +pub type VAIQMatrixBufferJPEGBaseline = _VAIQMatrixBufferJPEGBaseline; +#[doc = " \\brief Slice parameter for JPEG decoding.\n\n This structure holds information from the scan header, along with\n definitions from additional segments. The associated slice data\n buffer holds all entropy coded segments (ECS) in the scan."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferJPEGBaseline { + #[doc = " @name Codec-independent Slice Parameter Buffer base. */\n/**@{*/\n/** \\brief Number of bytes in the slice data buffer for this slice."] + pub slice_data_size: u32, + #[doc = " \\brief The offset to the first byte of the first MCU."] + pub slice_data_offset: u32, + #[doc = " \\brief Slice data buffer flags. See \\c VA_SLICE_DATA_FLAG_xxx."] + pub slice_data_flag: u32, + #[doc = " \\brief Scan horizontal position."] + pub slice_horizontal_position: u32, + #[doc = " \\brief Scan vertical position."] + pub slice_vertical_position: u32, + pub components: [_VASliceParameterBufferJPEGBaseline__bindgen_ty_1; 4usize], + #[doc = " \\brief Number of components in scan (Ns)."] + pub num_components: u8, + #[doc = " \\brief Restart interval definition (Ri)."] + pub restart_interval: u16, + #[doc = " \\brief Number of MCUs in a scan."] + pub num_mcus: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferJPEGBaseline__bindgen_ty_1 { + #[doc = " \\brief Scan component selector (Csj)."] + pub component_selector: u8, + #[doc = " \\brief DC entropy coding table selector (Tdj)."] + pub dc_table_selector: u8, + #[doc = " \\brief AC entropy coding table selector (Taj)."] + pub ac_table_selector: u8, +} +#[doc = " \\brief Slice parameter for JPEG decoding.\n\n This structure holds information from the scan header, along with\n definitions from additional segments. The associated slice data\n buffer holds all entropy coded segments (ECS) in the scan."] +pub type VASliceParameterBufferJPEGBaseline = _VASliceParameterBufferJPEGBaseline; +#[doc = " \\brief VPX Bool Coder Context structure\n\n This common structure is defined for potential sharing by other VP formats\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VABoolCoderContextVPX { + pub range: u8, + pub value: u8, + pub count: u8, +} +#[doc = " \\brief VPX Bool Coder Context structure\n\n This common structure is defined for potential sharing by other VP formats\n"] +pub type VABoolCoderContextVPX = _VABoolCoderContextVPX; +#[doc = " \\brief VP8 Decoding Picture Parameter Buffer Structure\n\n This structure conveys frame level parameters and should be sent once\n per frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAPictureParameterBufferVP8 { + pub frame_width: u32, + pub frame_height: u32, + pub last_ref_frame: VASurfaceID, + pub golden_ref_frame: VASurfaceID, + pub alt_ref_frame: VASurfaceID, + pub out_of_loop_frame: VASurfaceID, + pub pic_fields: _VAPictureParameterBufferVP8__bindgen_ty_1, + pub mb_segment_tree_probs: [u8; 3usize], + pub loop_filter_level: [u8; 4usize], + pub loop_filter_deltas_ref_frame: [i8; 4usize], + pub loop_filter_deltas_mode: [i8; 4usize], + pub prob_skip_false: u8, + pub prob_intra: u8, + pub prob_last: u8, + pub prob_gf: u8, + pub y_mode_probs: [u8; 4usize], + pub uv_mode_probs: [u8; 3usize], + pub mv_probs: [[u8; 19usize]; 2usize], + pub bool_coder_ctx: VABoolCoderContextVPX, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAPictureParameterBufferVP8__bindgen_ty_1 { + pub bits: _VAPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn key_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_key_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn key_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_key_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn version(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } + } + #[inline] + pub fn set_version(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn version_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_version_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_enabled(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_enabled(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_enabled_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_enabled_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_mb_segmentation_map(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_mb_segmentation_map(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_mb_segmentation_map_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_mb_segmentation_map_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_segment_feature_data(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_segment_feature_data(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_segment_feature_data_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_segment_feature_data_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn filter_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_filter_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn filter_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_filter_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sharpness_level(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 3u8) as u32) } + } + #[inline] + pub fn set_sharpness_level(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn sharpness_level_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sharpness_level_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_adj_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_adj_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_adj_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_adj_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mode_ref_lf_delta_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_mode_ref_lf_delta_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mode_ref_lf_delta_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mode_ref_lf_delta_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_bias_golden(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_bias_golden(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_bias_golden_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_bias_golden_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_bias_alternate(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_bias_alternate(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_bias_alternate_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_bias_alternate_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_no_coeff_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_no_coeff_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_no_coeff_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_no_coeff_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_disable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_disable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_disable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_disable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + key_frame: u32, + version: u32, + segmentation_enabled: u32, + update_mb_segmentation_map: u32, + update_segment_feature_data: u32, + filter_type: u32, + sharpness_level: u32, + loop_filter_adj_enable: u32, + mode_ref_lf_delta_update: u32, + sign_bias_golden: u32, + sign_bias_alternate: u32, + mb_no_coeff_skip: u32, + loop_filter_disable: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let key_frame: u32 = unsafe { ::std::mem::transmute(key_frame) }; + key_frame as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let version: u32 = unsafe { ::std::mem::transmute(version) }; + version as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let segmentation_enabled: u32 = unsafe { ::std::mem::transmute(segmentation_enabled) }; + segmentation_enabled as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let update_mb_segmentation_map: u32 = unsafe { ::std::mem::transmute(update_mb_segmentation_map) }; + update_mb_segmentation_map as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let update_segment_feature_data: u32 = unsafe { ::std::mem::transmute(update_segment_feature_data) }; + update_segment_feature_data as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let filter_type: u32 = unsafe { ::std::mem::transmute(filter_type) }; + filter_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 3u8, { + let sharpness_level: u32 = unsafe { ::std::mem::transmute(sharpness_level) }; + sharpness_level as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let loop_filter_adj_enable: u32 = unsafe { ::std::mem::transmute(loop_filter_adj_enable) }; + loop_filter_adj_enable as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let mode_ref_lf_delta_update: u32 = unsafe { ::std::mem::transmute(mode_ref_lf_delta_update) }; + mode_ref_lf_delta_update as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let sign_bias_golden: u32 = unsafe { ::std::mem::transmute(sign_bias_golden) }; + sign_bias_golden as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let sign_bias_alternate: u32 = unsafe { ::std::mem::transmute(sign_bias_alternate) }; + sign_bias_alternate as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let mb_no_coeff_skip: u32 = unsafe { ::std::mem::transmute(mb_no_coeff_skip) }; + mb_no_coeff_skip as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let loop_filter_disable: u32 = unsafe { ::std::mem::transmute(loop_filter_disable) }; + loop_filter_disable as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAPictureParameterBufferVP8__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAPictureParameterBufferVP8 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP8 Decoding Picture Parameter Buffer Structure\n\n This structure conveys frame level parameters and should be sent once\n per frame.\n"] +pub type VAPictureParameterBufferVP8 = _VAPictureParameterBufferVP8; +#[doc = " \\brief VP8 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to data partitions and should be\n sent once per frame. Slice data buffer of VASliceDataBufferType is used\n to send the partition data.\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferVP8 { + pub slice_data_size: u32, + pub slice_data_offset: u32, + pub slice_data_flag: u32, + pub macroblock_offset: u32, + pub num_of_partitions: u8, + pub partition_size: [u32; 9usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP8 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to data partitions and should be\n sent once per frame. Slice data buffer of VASliceDataBufferType is used\n to send the partition data.\n"] +pub type VASliceParameterBufferVP8 = _VASliceParameterBufferVP8; +#[doc = " \\brief VP8 Coefficient Probability Data Buffer Structure\n\n Contains the contents of the token probability table, which may be\n incrementally modified in the frame header. There are four dimensions to\n the token probability array. The outermost dimension is indexed by the\n type of plane being decoded; the next dimension is selected by the\n position of the coefficient being decoded; the third dimension, * roughly\n speaking, measures the \"local complexity\" or extent to which nearby\n coefficients are non-zero; the fourth, and final, dimension of the token\n probability array is indexed by the position in the token tree structure,\n as are all tree probability arrays. This structure is sent once per frame.\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAProbabilityDataBufferVP8 { + pub dct_coeff_probs: [[[[u8; 11usize]; 3usize]; 8usize]; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP8 Coefficient Probability Data Buffer Structure\n\n Contains the contents of the token probability table, which may be\n incrementally modified in the frame header. There are four dimensions to\n the token probability array. The outermost dimension is indexed by the\n type of plane being decoded; the next dimension is selected by the\n position of the coefficient being decoded; the third dimension, * roughly\n speaking, measures the \"local complexity\" or extent to which nearby\n coefficients are non-zero; the fourth, and final, dimension of the token\n probability array is indexed by the position in the token tree structure,\n as are all tree probability arrays. This structure is sent once per frame.\n"] +pub type VAProbabilityDataBufferVP8 = _VAProbabilityDataBufferVP8; +#[doc = " \\brief VP8 Inverse Quantization Matrix Buffer Structure\n\n Contains quantization indices for yac(0),ydc(1),y2dc(2),y2ac(3),uvdc(4),\n uvac(5) for each segment (0-3). When segmentation is disabled, only\n quantization_index[0][] will be used. This structure is sent once per frame."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAIQMatrixBufferVP8 { + pub quantization_index: [[u16; 6usize]; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP8 Inverse Quantization Matrix Buffer Structure\n\n Contains quantization indices for yac(0),ydc(1),y2dc(2),y2ac(3),uvdc(4),\n uvac(5) for each segment (0-3). When segmentation is disabled, only\n quantization_index[0][] will be used. This structure is sent once per frame."] +pub type VAIQMatrixBufferVP8 = _VAIQMatrixBufferVP8; +#[doc = " \\brief VP9 Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n App should send a surface with this data structure down to VAAPI once\n per frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VADecPictureParameterBufferVP9 { + #[doc = " \\brief picture width\n Picture original resolution. The value may not be multiple of 8."] + pub frame_width: u16, + #[doc = " \\brief picture height\n Picture original resolution. The value may not be multiple of 8."] + pub frame_height: u16, + #[doc = " \\brief Surface indices of reference frames in DPB.\n\n Each entry of the list specifies the surface index of the picture\n that is referred by current picture or will be referred by any future\n picture.\n Application who calls this API should update this list based on the\n refreshing information from VP9 bitstream."] + pub reference_frames: [VASurfaceID; 8usize], + pub pic_fields: _VADecPictureParameterBufferVP9__bindgen_ty_1, + pub filter_level: u8, + pub sharpness_level: u8, + #[doc = " \\brief number of tile rows specified by (1 << log2_tile_rows).\n It corresponds the variable with same name in VP9 code."] + pub log2_tile_rows: u8, + #[doc = " \\brief number of tile columns specified by (1 << log2_tile_columns).\n It corresponds the variable with same name in VP9 code."] + pub log2_tile_columns: u8, + #[doc = " \\brief Number of bytes taken up by the uncompressed frame header,\n which corresponds to byte length of function\n read_uncompressed_header() in VP9 code.\n Specifically, it is the byte count from bit stream buffer start to\n the last byte of uncompressed frame header.\n If there are other meta data in the buffer before uncompressed header,\n its size should be also included here."] + pub frame_header_length_in_bytes: u8, + #[doc = " \\brief The byte count of compressed header the bitstream buffer,\n which corresponds to syntax first_partition_size in code."] + pub first_partition_size: u16, + #[doc = " These values are segment probabilities with same names in VP9\n function setup_segmentation(). They should be parsed directly from\n bitstream by application."] + pub mb_segment_tree_probs: [u8; 7usize], + pub segment_pred_probs: [u8; 3usize], + #[doc = " \\brief VP9 Profile definition\n value range [0..3]."] + pub profile: u8, + #[doc = " \\brief VP9 bit depth per sample\n same for both luma and chroma samples."] + pub bit_depth: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferVP9__bindgen_ty_1 { + pub bits: _VADecPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VADecPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn subsampling_x(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_x(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_x_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_x_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn subsampling_y(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_y(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_y_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_y_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn show_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_show_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn show_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_show_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error_resilient_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_error_resilient_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_resilient_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_resilient_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_only(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_only(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_only_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_only_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_high_precision_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_high_precision_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_high_precision_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_high_precision_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mcomp_filter_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 3u8) as u32) } + } + #[inline] + pub fn set_mcomp_filter_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn mcomp_filter_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mcomp_filter_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_parallel_decoding_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_parallel_decoding_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_parallel_decoding_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_parallel_decoding_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reset_frame_context(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 2u8) as u32) } + } + #[inline] + pub fn set_reset_frame_context(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reset_frame_context_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reset_frame_context_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_frame_context(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_frame_context(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_frame_context_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_frame_context_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_context_idx(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_context_idx(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_context_idx_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_context_idx_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_enabled(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_enabled(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_enabled_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_enabled_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_temporal_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_temporal_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_temporal_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_temporal_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_update_map(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_update_map(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_update_map_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_update_map_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn last_ref_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 3u8) as u32) } + } + #[inline] + pub fn set_last_ref_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn last_ref_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_last_ref_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn last_ref_frame_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } + } + #[inline] + pub fn set_last_ref_frame_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn last_ref_frame_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_last_ref_frame_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn golden_ref_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 3u8) as u32) } + } + #[inline] + pub fn set_golden_ref_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(23usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn golden_ref_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_golden_ref_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn golden_ref_frame_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_golden_ref_frame_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn golden_ref_frame_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_golden_ref_frame_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn alt_ref_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 3u8) as u32) } + } + #[inline] + pub fn set_alt_ref_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn alt_ref_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_alt_ref_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn alt_ref_frame_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } + } + #[inline] + pub fn set_alt_ref_frame_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn alt_ref_frame_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_alt_ref_frame_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn lossless_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } + } + #[inline] + pub fn set_lossless_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn lossless_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_lossless_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + subsampling_x: u32, + subsampling_y: u32, + frame_type: u32, + show_frame: u32, + error_resilient_mode: u32, + intra_only: u32, + allow_high_precision_mv: u32, + mcomp_filter_type: u32, + frame_parallel_decoding_mode: u32, + reset_frame_context: u32, + refresh_frame_context: u32, + frame_context_idx: u32, + segmentation_enabled: u32, + segmentation_temporal_update: u32, + segmentation_update_map: u32, + last_ref_frame: u32, + last_ref_frame_sign_bias: u32, + golden_ref_frame: u32, + golden_ref_frame_sign_bias: u32, + alt_ref_frame: u32, + alt_ref_frame_sign_bias: u32, + lossless_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let subsampling_x: u32 = unsafe { ::std::mem::transmute(subsampling_x) }; + subsampling_x as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let subsampling_y: u32 = unsafe { ::std::mem::transmute(subsampling_y) }; + subsampling_y as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let frame_type: u32 = unsafe { ::std::mem::transmute(frame_type) }; + frame_type as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let show_frame: u32 = unsafe { ::std::mem::transmute(show_frame) }; + show_frame as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let error_resilient_mode: u32 = unsafe { ::std::mem::transmute(error_resilient_mode) }; + error_resilient_mode as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let intra_only: u32 = unsafe { ::std::mem::transmute(intra_only) }; + intra_only as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let allow_high_precision_mv: u32 = unsafe { ::std::mem::transmute(allow_high_precision_mv) }; + allow_high_precision_mv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 3u8, { + let mcomp_filter_type: u32 = unsafe { ::std::mem::transmute(mcomp_filter_type) }; + mcomp_filter_type as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let frame_parallel_decoding_mode: u32 = unsafe { ::std::mem::transmute(frame_parallel_decoding_mode) }; + frame_parallel_decoding_mode as u64 + }); + __bindgen_bitfield_unit.set(11usize, 2u8, { + let reset_frame_context: u32 = unsafe { ::std::mem::transmute(reset_frame_context) }; + reset_frame_context as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let refresh_frame_context: u32 = unsafe { ::std::mem::transmute(refresh_frame_context) }; + refresh_frame_context as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let frame_context_idx: u32 = unsafe { ::std::mem::transmute(frame_context_idx) }; + frame_context_idx as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let segmentation_enabled: u32 = unsafe { ::std::mem::transmute(segmentation_enabled) }; + segmentation_enabled as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let segmentation_temporal_update: u32 = unsafe { ::std::mem::transmute(segmentation_temporal_update) }; + segmentation_temporal_update as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let segmentation_update_map: u32 = unsafe { ::std::mem::transmute(segmentation_update_map) }; + segmentation_update_map as u64 + }); + __bindgen_bitfield_unit.set(19usize, 3u8, { + let last_ref_frame: u32 = unsafe { ::std::mem::transmute(last_ref_frame) }; + last_ref_frame as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let last_ref_frame_sign_bias: u32 = unsafe { ::std::mem::transmute(last_ref_frame_sign_bias) }; + last_ref_frame_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(23usize, 3u8, { + let golden_ref_frame: u32 = unsafe { ::std::mem::transmute(golden_ref_frame) }; + golden_ref_frame as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let golden_ref_frame_sign_bias: u32 = unsafe { ::std::mem::transmute(golden_ref_frame_sign_bias) }; + golden_ref_frame_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(27usize, 3u8, { + let alt_ref_frame: u32 = unsafe { ::std::mem::transmute(alt_ref_frame) }; + alt_ref_frame as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let alt_ref_frame_sign_bias: u32 = unsafe { ::std::mem::transmute(alt_ref_frame_sign_bias) }; + alt_ref_frame_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let lossless_flag: u32 = unsafe { ::std::mem::transmute(lossless_flag) }; + lossless_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferVP9__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VADecPictureParameterBufferVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP9 Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n App should send a surface with this data structure down to VAAPI once\n per frame.\n"] +pub type VADecPictureParameterBufferVP9 = _VADecPictureParameterBufferVP9; +#[doc = " \\brief VP9 Segmentation Parameter Data Structure\n\n This structure conveys per segment parameters.\n 8 of this data structure will be included in VASegmentationParameterBufferVP9\n and sent to API in a single buffer.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASegmentParameterVP9 { + pub segment_flags: _VASegmentParameterVP9__bindgen_ty_1, + #[doc = " \\brief Specifies the filter level information per segment.\n The value corresponds to variable lfi->lvl[seg][ref][mode] in VP9 code,\n where m is [ref], and n is [mode] in FilterLevel[m][n]."] + pub filter_level: [[u8; 2usize]; 4usize], + #[doc = " \\brief Specifies per segment Luma AC quantization scale.\n Corresponding to y_dequant[qindex][1] in vp9_mb_init_quantizer()\n function of VP9 code."] + pub luma_ac_quant_scale: i16, + #[doc = " \\brief Specifies per segment Luma DC quantization scale.\n Corresponding to y_dequant[qindex][0] in vp9_mb_init_quantizer()\n function of VP9 code."] + pub luma_dc_quant_scale: i16, + #[doc = " \\brief Specifies per segment Chroma AC quantization scale.\n Corresponding to uv_dequant[qindex][1] in vp9_mb_init_quantizer()\n function of VP9 code."] + pub chroma_ac_quant_scale: i16, + #[doc = " \\brief Specifies per segment Chroma DC quantization scale.\n Corresponding to uv_dequant[qindex][0] in vp9_mb_init_quantizer()\n function of VP9 code."] + pub chroma_dc_quant_scale: i16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VASegmentParameterVP9__bindgen_ty_1 { + pub fields: _VASegmentParameterVP9__bindgen_ty_1__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[repr(align(2))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASegmentParameterVP9__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: u8, +} +impl _VASegmentParameterVP9__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn segment_reference_enabled(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } + } + #[inline] + pub fn set_segment_reference_enabled(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_enabled_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_segment_reference_enabled_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_reference(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u16) } + } + #[inline] + pub fn set_segment_reference(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_segment_reference_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_reference_skipped(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } + } + #[inline] + pub fn set_segment_reference_skipped(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_skipped_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_segment_reference_skipped_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + segment_reference_enabled: u16, + segment_reference: u16, + segment_reference_skipped: u16, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let segment_reference_enabled: u16 = unsafe { ::std::mem::transmute(segment_reference_enabled) }; + segment_reference_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let segment_reference: u16 = unsafe { ::std::mem::transmute(segment_reference) }; + segment_reference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let segment_reference_skipped: u16 = unsafe { ::std::mem::transmute(segment_reference_skipped) }; + segment_reference_skipped as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VASegmentParameterVP9__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VASegmentParameterVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP9 Segmentation Parameter Data Structure\n\n This structure conveys per segment parameters.\n 8 of this data structure will be included in VASegmentationParameterBufferVP9\n and sent to API in a single buffer.\n"] +pub type VASegmentParameterVP9 = _VASegmentParameterVP9; +#[doc = " \\brief VP9 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to segmentation data and should be\n sent once per frame.\n\n When segmentation is disabled, only SegParam[0] has valid values,\n all other entries should be populated with 0.\n Otherwise, all eight entries should be valid.\n\n Slice data buffer of VASliceDataBufferType is used\n to send the bitstream which should include whole or part of partition 0\n (at least compressed header) to the end of frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASliceParameterBufferVP9 { + #[doc = " \\brief The byte count of current frame in the bitstream buffer,\n starting from first byte of the buffer.\n It uses the name slice_data_size to be consitent with other codec,\n but actually means frame_data_size."] + pub slice_data_size: u32, + #[doc = " offset to the first byte of partition data (control partition)"] + pub slice_data_offset: u32, + #[doc = " see VA_SLICE_DATA_FLAG_XXX definitions"] + pub slice_data_flag: u32, + #[doc = " \\brief per segment information"] + pub seg_param: [VASegmentParameterVP9; 8usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VASliceParameterBufferVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP9 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to segmentation data and should be\n sent once per frame.\n\n When segmentation is disabled, only SegParam[0] has valid values,\n all other entries should be populated with 0.\n Otherwise, all eight entries should be valid.\n\n Slice data buffer of VASliceDataBufferType is used\n to send the bitstream which should include whole or part of partition 0\n (at least compressed header) to the end of frame.\n"] +pub type VASliceParameterBufferVP9 = _VASliceParameterBufferVP9; +#[doc = " Attribute value for VAConfigAttribDecAV1Features.\n\n This attribute decribes the supported features of a AV1\n decoder configuration.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union VAConfigAttribValDecAV1Features { + pub bits: VAConfigAttribValDecAV1Features__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct VAConfigAttribValDecAV1Features__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl VAConfigAttribValDecAV1Features__bindgen_ty_1 { + #[inline] + pub fn lst_support(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_lst_support(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn lst_support_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_lst_support_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 30u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 30u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(lst_support: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let lst_support: u32 = unsafe { ::std::mem::transmute(lst_support) }; + lst_support as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for VAConfigAttribValDecAV1Features { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Segmentation Information"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VASegmentationStructAV1 { + pub segment_info_fields: _VASegmentationStructAV1__bindgen_ty_1, + #[doc = " \\brief Segmentation parameters for current frame.\n feature_data[segment_id][feature_id]\n where segment_id has value range [0..7] indicating the segment id.\n and feature_id is defined as\ntypedef enum {\nSEG_LVL_ALT_Q, // Use alternate Quantizer ....\nSEG_LVL_ALT_LF_Y_V, // Use alternate loop filter value on y plane vertical\nSEG_LVL_ALT_LF_Y_H, // Use alternate loop filter value on y plane horizontal\nSEG_LVL_ALT_LF_U, // Use alternate loop filter value on u plane\nSEG_LVL_ALT_LF_V, // Use alternate loop filter value on v plane\nSEG_LVL_REF_FRAME, // Optional Segment reference frame\nSEG_LVL_SKIP, // Optional Segment (0,0) + skip mode\nSEG_LVL_GLOBALMV,\nSEG_LVL_MAX\n} SEG_LVL_FEATURES;\n feature_data[][] is equivalent to variable FeatureData[][] in spec,\n which is after clip3() operation.\n Clip3(x, y, z) = (z < x)? x : ((z > y)? y : z);\n The limit is defined in Segmentation_Feature_Max[ SEG_LVL_MAX ] = {\n 255, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, 7, 0, 0 }"] + pub feature_data: [[i16; 8usize]; 8usize], + #[doc = " \\brief indicates if a feature is enabled or not.\n Each bit field itself is the feature_id. Index is segment_id.\n feature_mask[segment_id] & (1 << feature_id) equal to 1 specify that the feature of\n feature_id for segment of segment_id is enabled, otherwise disabled."] + pub feature_mask: [u8; 8usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VASegmentationStructAV1__bindgen_ty_1 { + pub bits: _VASegmentationStructAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASegmentationStructAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VASegmentationStructAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn enabled(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_enabled(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enabled_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enabled_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_map(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_map(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_map_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_map_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_temporal_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_data(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_data(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_data_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_data_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 28u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 28u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 28u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + enabled: u32, + update_map: u32, + temporal_update: u32, + update_data: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enabled: u32 = unsafe { ::std::mem::transmute(enabled) }; + enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let update_map: u32 = unsafe { ::std::mem::transmute(update_map) }; + update_map as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let temporal_update: u32 = unsafe { ::std::mem::transmute(temporal_update) }; + temporal_update as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let update_data: u32 = unsafe { ::std::mem::transmute(update_data) }; + update_data as u64 + }); + __bindgen_bitfield_unit.set(4usize, 28u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VASegmentationStructAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VASegmentationStructAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Segmentation Information"] +pub type VASegmentationStructAV1 = _VASegmentationStructAV1; +#[doc = " \\brief Film Grain Information"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAFilmGrainStructAV1 { + pub film_grain_info_fields: _VAFilmGrainStructAV1__bindgen_ty_1, + pub grain_seed: u16, + pub num_y_points: u8, + pub point_y_value: [u8; 14usize], + pub point_y_scaling: [u8; 14usize], + pub num_cb_points: u8, + pub point_cb_value: [u8; 10usize], + pub point_cb_scaling: [u8; 10usize], + pub num_cr_points: u8, + pub point_cr_value: [u8; 10usize], + pub point_cr_scaling: [u8; 10usize], + pub ar_coeffs_y: [i8; 24usize], + pub ar_coeffs_cb: [i8; 25usize], + pub ar_coeffs_cr: [i8; 25usize], + pub cb_mult: u8, + pub cb_luma_mult: u8, + pub cb_offset: u16, + pub cr_mult: u8, + pub cr_luma_mult: u8, + pub cr_offset: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAFilmGrainStructAV1__bindgen_ty_1 { + pub bits: _VAFilmGrainStructAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAFilmGrainStructAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAFilmGrainStructAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn apply_grain(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_apply_grain(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn apply_grain_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_apply_grain_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn chroma_scaling_from_luma(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_scaling_from_luma(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_scaling_from_luma_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_scaling_from_luma_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn grain_scaling_minus_8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_grain_scaling_minus_8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn grain_scaling_minus_8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_grain_scaling_minus_8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn ar_coeff_lag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_ar_coeff_lag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn ar_coeff_lag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ar_coeff_lag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn ar_coeff_shift_minus_6(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } + } + #[inline] + pub fn set_ar_coeff_shift_minus_6(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn ar_coeff_shift_minus_6_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ar_coeff_shift_minus_6_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn grain_scale_shift(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } + } + #[inline] + pub fn set_grain_scale_shift(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn grain_scale_shift_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_grain_scale_shift_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn overlap_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_overlap_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn overlap_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_overlap_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn clip_to_restricted_range(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_clip_to_restricted_range(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn clip_to_restricted_range_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_clip_to_restricted_range_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 20u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 20u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 20u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + apply_grain: u32, + chroma_scaling_from_luma: u32, + grain_scaling_minus_8: u32, + ar_coeff_lag: u32, + ar_coeff_shift_minus_6: u32, + grain_scale_shift: u32, + overlap_flag: u32, + clip_to_restricted_range: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let apply_grain: u32 = unsafe { ::std::mem::transmute(apply_grain) }; + apply_grain as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let chroma_scaling_from_luma: u32 = unsafe { ::std::mem::transmute(chroma_scaling_from_luma) }; + chroma_scaling_from_luma as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let grain_scaling_minus_8: u32 = unsafe { ::std::mem::transmute(grain_scaling_minus_8) }; + grain_scaling_minus_8 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let ar_coeff_lag: u32 = unsafe { ::std::mem::transmute(ar_coeff_lag) }; + ar_coeff_lag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let ar_coeff_shift_minus_6: u32 = unsafe { ::std::mem::transmute(ar_coeff_shift_minus_6) }; + ar_coeff_shift_minus_6 as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let grain_scale_shift: u32 = unsafe { ::std::mem::transmute(grain_scale_shift) }; + grain_scale_shift as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let overlap_flag: u32 = unsafe { ::std::mem::transmute(overlap_flag) }; + overlap_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let clip_to_restricted_range: u32 = unsafe { ::std::mem::transmute(clip_to_restricted_range) }; + clip_to_restricted_range as u64 + }); + __bindgen_bitfield_unit.set(12usize, 20u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAFilmGrainStructAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAFilmGrainStructAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Film Grain Information"] +pub type VAFilmGrainStructAV1 = _VAFilmGrainStructAV1; +pub mod VAAV1TransformationType { + pub type Type = ::std::os::raw::c_uint; + #[doc = " identity transformation, 0-parameter"] + pub const VAAV1TransformationIdentity: Type = 0; + #[doc = " translational motion, 2-parameter"] + pub const VAAV1TransformationTranslation: Type = 1; + #[doc = " simplified affine with rotation + zoom only, 4-parameter"] + pub const VAAV1TransformationRotzoom: Type = 2; + #[doc = " affine, 6-parameter"] + pub const VAAV1TransformationAffine: Type = 3; + #[doc = " transformation count"] + pub const VAAV1TransformationCount: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAWarpedMotionParamsAV1 { + #[doc = " \\brief Specify the type of warped motion"] + pub wmtype: VAAV1TransformationType::Type, + #[doc = " \\brief Specify warp motion parameters\n wm.wmmat[] corresponds to gm_params[][] in spec.\n Details in AV1 spec section 5.9.24 or refer to libaom code\n https://aomedia.googlesource.com/aom/+/refs/heads/master/av1/decoder/decodeframe.c"] + pub wmmat: [i32; 8usize], + pub invalid: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAWarpedMotionParamsAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAWarpedMotionParamsAV1 = _VAWarpedMotionParamsAV1; +#[doc = " \\brief AV1 Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VADecPictureParameterBufferAV1 { + #[doc = " \\brief AV1 bit stream profile"] + pub profile: u8, + pub order_hint_bits_minus_1: u8, + #[doc = " \\brief bit depth index\n value range [0..2]\n 0 - bit depth 8;\n 1 - bit depth 10;\n 2 - bit depth 12;"] + pub bit_depth_idx: u8, + #[doc = " \\brief corresponds to AV1 spec variable of the same name."] + pub matrix_coefficients: u8, + pub seq_info_fields: _VADecPictureParameterBufferAV1__bindgen_ty_1, + #[doc = " \\brief buffer description of decoded current picture"] + pub current_frame: VASurfaceID, + #[doc = " \\brief display buffer of current picture\n Used for film grain applied decoded picture.\n Valid only when apply_grain equals 1."] + pub current_display_picture: VASurfaceID, + #[doc = " \\brief number of anchor frames for large scale tile\n This parameter gives the number of entries of anchor_frames_list[].\n Value range [0..128]."] + pub anchor_frames_num: u8, + #[doc = " \\brief anchor frame list for large scale tile\n For large scale tile applications, the anchor frames could come from\n previously decoded frames in current sequence (aka. internal), or\n from external sources.\n For external anchor frames, application should call API\n vaCreateBuffer() to generate frame buffers and populate them with\n pixel frames. And this process may happen multiple times.\n The array anchor_frames_list[] is used to register all the available\n anchor frames from both external and internal, up to the current\n frame instance. If a previously registerred anchor frame is no longer\n needed, it should be removed from the list. But it does not prevent\n applications from relacing the frame buffer with new anchor frames.\n Please note that the internal anchor frames may not still be present\n in the current DPB buffer. But if it is in the anchor_frames_list[],\n it should not be replaced with other frames or removed from memory\n until it is not shown in the list.\n This number of entries of the list is given by parameter anchor_frames_num."] + pub anchor_frames_list: *mut VASurfaceID, + #[doc = " \\brief Picture resolution minus 1\n Picture original resolution. If SuperRes is enabled,\n this is the upscaled resolution.\n value range [0..65535]"] + pub frame_width_minus1: u16, + pub frame_height_minus1: u16, + #[doc = " \\brief Output frame buffer size in unit of tiles\n Valid only when large_scale_tile equals 1.\n value range [0..65535]"] + pub output_frame_width_in_tiles_minus_1: u16, + pub output_frame_height_in_tiles_minus_1: u16, + #[doc = " \\brief Surface indices of reference frames in DPB.\n\n Contains a list of uncompressed frame buffer surface indices as references.\n Application needs to make sure all the entries point to valid frames\n except for intra frames by checking ref_frame_id[]. If missing frame\n is identified, application may choose to perform error recovery by\n pointing problematic index to an alternative frame buffer.\n Driver is not responsible to validate reference frames' id."] + pub ref_frame_map: [VASurfaceID; 8usize], + #[doc = " \\brief Reference frame indices.\n\n Contains a list of indices into ref_frame_map[8].\n It specifies the reference frame correspondence.\n The indices of the array are defined as [LAST_FRAME – LAST_FRAME,\n LAST2_FRAME – LAST_FRAME, …, ALTREF_FRAME – LAST_FRAME], where each\n symbol is defined as:\n enum{INTRA_FRAME = 0, LAST_FRAME, LAST2_FRAME, LAST3_FRAME, GOLDEN_FRAME,\n BWDREF_FRAME, ALTREF2_FRAME, ALTREF_FRAME};"] + pub ref_frame_idx: [u8; 7usize], + #[doc = " \\brief primary reference frame index\n Index into ref_frame_idx[], specifying which reference frame contains\n propagated info that should be loaded at the start of the frame.\n When value equals PRIMARY_REF_NONE (7), it indicates there is\n no primary reference frame.\n value range [0..7]"] + pub primary_ref_frame: u8, + pub order_hint: u8, + pub seg_info: VASegmentationStructAV1, + pub film_grain_info: VAFilmGrainStructAV1, + #[doc = " \\brief tile structure\n When uniform_tile_spacing_flag == 1, width_in_sbs_minus_1[] and\n height_in_sbs_minus_1[] should be ignored, which will be generated\n by driver based on tile_cols and tile_rows."] + pub tile_cols: u8, + pub tile_rows: u8, + pub width_in_sbs_minus_1: [u16; 63usize], + pub height_in_sbs_minus_1: [u16; 63usize], + #[doc = " \\brief number of tiles minus 1 in large scale tile list\n Same as AV1 semantic element.\n Valid only when large_scale_tiles == 1."] + pub tile_count_minus_1: u16, + pub context_update_tile_id: u16, + pub pic_info_fields: _VADecPictureParameterBufferAV1__bindgen_ty_2, + #[doc = " \\brief Supper resolution scale denominator.\n When use_superres=1, superres_scale_denominator must be in the range [9..16].\n When use_superres=0, superres_scale_denominator must be 8."] + pub superres_scale_denominator: u8, + #[doc = " \\brief Interpolation filter.\n value range [0..4]"] + pub interp_filter: u8, + #[doc = " \\brief luma loop filter levels.\n value range [0..63]."] + pub filter_level: [u8; 2usize], + #[doc = " \\brief chroma loop filter levels.\n value range [0..63]."] + pub filter_level_u: u8, + pub filter_level_v: u8, + pub loop_filter_info_fields: _VADecPictureParameterBufferAV1__bindgen_ty_3, + #[doc = " \\brief The adjustment needed for the filter level based on\n the chosen reference frame.\n value range [-64..63]."] + pub ref_deltas: [i8; 8usize], + #[doc = " \\brief The adjustment needed for the filter level based on\n the chosen mode.\n value range [-64..63]."] + pub mode_deltas: [i8; 2usize], + #[doc = " \\brief quantization\n/\n/** \\brief Y AC index\n value range [0..255]"] + pub base_qindex: u8, + #[doc = " \\brief Y DC delta from Y AC\n value range [-64..63]"] + pub y_dc_delta_q: i8, + #[doc = " \\brief U DC delta from Y AC\n value range [-64..63]"] + pub u_dc_delta_q: i8, + #[doc = " \\brief U AC delta from Y AC\n value range [-64..63]"] + pub u_ac_delta_q: i8, + #[doc = " \\brief V DC delta from Y AC\n value range [-64..63]"] + pub v_dc_delta_q: i8, + #[doc = " \\brief V AC delta from Y AC\n value range [-64..63]"] + pub v_ac_delta_q: i8, + pub qmatrix_fields: _VADecPictureParameterBufferAV1__bindgen_ty_4, + pub mode_control_fields: _VADecPictureParameterBufferAV1__bindgen_ty_5, + #[doc = " \\brief CDEF parameters"] + pub cdef_damping_minus_3: u8, + pub cdef_bits: u8, + #[doc = " Encode cdef strength:\n\n The cdef_y_strengths[] and cdef_uv_strengths[] are expected to be packed\n with both primary and secondary strength. The secondary strength is\n given in the lower two bits and the primary strength is given in the next\n four bits.\n\n cdef_y_strengths[] & cdef_uv_strengths[] should be derived as:\n (cdef_y_strengths[]) = (cdef_y_pri_strength[] << 2) | (cdef_y_sec_strength[] & 0x03)\n (cdef_uv_strengths[]) = (cdef_uv_pri_strength[] << 2) | (cdef_uv_sec_strength[] & 0x03)\n In which, cdef_y_pri_strength[]/cdef_y_sec_strength[]/cdef_uv_pri_strength[]/cdef_uv_sec_strength[]\n are variables defined in AV1 Spec 5.9.19. The cdef_y_strengths[] & cdef_uv_strengths[]\n are corresponding to LIBAOM variables cm->cdef_strengths[] & cm->cdef_uv_strengths[] respectively."] + pub cdef_y_strengths: [u8; 8usize], + pub cdef_uv_strengths: [u8; 8usize], + pub loop_restoration_fields: _VADecPictureParameterBufferAV1__bindgen_ty_6, + #[doc = " \\brief global motion"] + pub wm: [VAWarpedMotionParamsAV1; 7usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_1 { + pub fields: _VADecPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn still_picture(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_still_picture(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn still_picture_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_still_picture_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_128x128_superblock(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_128x128_superblock(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_128x128_superblock_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_128x128_superblock_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_filter_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_filter_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_filter_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_filter_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_intra_edge_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_intra_edge_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_intra_edge_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_intra_edge_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_interintra_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_interintra_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_interintra_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_interintra_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_masked_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_masked_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_masked_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_masked_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_dual_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_dual_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_dual_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_dual_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_order_hint(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_order_hint(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_order_hint_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_order_hint_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_jnt_comp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_jnt_comp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_jnt_comp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_jnt_comp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_cdef(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_cdef(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_cdef_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_cdef_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mono_chrome(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_mono_chrome(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mono_chrome_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mono_chrome_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn color_range(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_color_range(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn color_range_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_color_range_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn subsampling_x(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_x(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_x_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_x_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn subsampling_y(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_y(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_y_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_y_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn chroma_sample_position(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_sample_position(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_sample_position_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_sample_position_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn film_grain_params_present(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_film_grain_params_present(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn film_grain_params_present_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_film_grain_params_present_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + still_picture: u32, + use_128x128_superblock: u32, + enable_filter_intra: u32, + enable_intra_edge_filter: u32, + enable_interintra_compound: u32, + enable_masked_compound: u32, + enable_dual_filter: u32, + enable_order_hint: u32, + enable_jnt_comp: u32, + enable_cdef: u32, + mono_chrome: u32, + color_range: u32, + subsampling_x: u32, + subsampling_y: u32, + chroma_sample_position: u32, + film_grain_params_present: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let still_picture: u32 = unsafe { ::std::mem::transmute(still_picture) }; + still_picture as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let use_128x128_superblock: u32 = unsafe { ::std::mem::transmute(use_128x128_superblock) }; + use_128x128_superblock as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let enable_filter_intra: u32 = unsafe { ::std::mem::transmute(enable_filter_intra) }; + enable_filter_intra as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let enable_intra_edge_filter: u32 = unsafe { ::std::mem::transmute(enable_intra_edge_filter) }; + enable_intra_edge_filter as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let enable_interintra_compound: u32 = unsafe { ::std::mem::transmute(enable_interintra_compound) }; + enable_interintra_compound as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let enable_masked_compound: u32 = unsafe { ::std::mem::transmute(enable_masked_compound) }; + enable_masked_compound as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let enable_dual_filter: u32 = unsafe { ::std::mem::transmute(enable_dual_filter) }; + enable_dual_filter as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let enable_order_hint: u32 = unsafe { ::std::mem::transmute(enable_order_hint) }; + enable_order_hint as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let enable_jnt_comp: u32 = unsafe { ::std::mem::transmute(enable_jnt_comp) }; + enable_jnt_comp as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let enable_cdef: u32 = unsafe { ::std::mem::transmute(enable_cdef) }; + enable_cdef as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let mono_chrome: u32 = unsafe { ::std::mem::transmute(mono_chrome) }; + mono_chrome as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let color_range: u32 = unsafe { ::std::mem::transmute(color_range) }; + color_range as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let subsampling_x: u32 = unsafe { ::std::mem::transmute(subsampling_x) }; + subsampling_x as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let subsampling_y: u32 = unsafe { ::std::mem::transmute(subsampling_y) }; + subsampling_y as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let chroma_sample_position: u32 = unsafe { ::std::mem::transmute(chroma_sample_position) }; + chroma_sample_position as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let film_grain_params_present: u32 = unsafe { ::std::mem::transmute(film_grain_params_present) }; + film_grain_params_present as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_2 { + pub bits: _VADecPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn frame_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn show_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_show_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn show_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_show_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn showable_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_showable_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn showable_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_showable_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error_resilient_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_error_resilient_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_resilient_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_resilient_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_cdf_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_cdf_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_cdf_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_cdf_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_screen_content_tools(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_screen_content_tools(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_screen_content_tools_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_screen_content_tools_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_integer_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_integer_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_integer_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_integer_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_intrabc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_intrabc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_intrabc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_intrabc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_superres(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_superres(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_superres_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_superres_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_high_precision_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_high_precision_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_high_precision_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_high_precision_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_motion_mode_switchable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_motion_mode_switchable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_motion_mode_switchable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_motion_mode_switchable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_ref_frame_mvs(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_ref_frame_mvs(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_ref_frame_mvs_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_ref_frame_mvs_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_frame_end_update_cdf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_frame_end_update_cdf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_frame_end_update_cdf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_frame_end_update_cdf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn uniform_tile_spacing_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_uniform_tile_spacing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn uniform_tile_spacing_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_uniform_tile_spacing_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_warped_motion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_warped_motion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_warped_motion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_warped_motion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn large_scale_tile(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_large_scale_tile(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn large_scale_tile_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_large_scale_tile_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 15u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 15u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 15u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 15u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_type: u32, + show_frame: u32, + showable_frame: u32, + error_resilient_mode: u32, + disable_cdf_update: u32, + allow_screen_content_tools: u32, + force_integer_mv: u32, + allow_intrabc: u32, + use_superres: u32, + allow_high_precision_mv: u32, + is_motion_mode_switchable: u32, + use_ref_frame_mvs: u32, + disable_frame_end_update_cdf: u32, + uniform_tile_spacing_flag: u32, + allow_warped_motion: u32, + large_scale_tile: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let frame_type: u32 = unsafe { ::std::mem::transmute(frame_type) }; + frame_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let show_frame: u32 = unsafe { ::std::mem::transmute(show_frame) }; + show_frame as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let showable_frame: u32 = unsafe { ::std::mem::transmute(showable_frame) }; + showable_frame as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let error_resilient_mode: u32 = unsafe { ::std::mem::transmute(error_resilient_mode) }; + error_resilient_mode as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let disable_cdf_update: u32 = unsafe { ::std::mem::transmute(disable_cdf_update) }; + disable_cdf_update as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let allow_screen_content_tools: u32 = unsafe { ::std::mem::transmute(allow_screen_content_tools) }; + allow_screen_content_tools as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let force_integer_mv: u32 = unsafe { ::std::mem::transmute(force_integer_mv) }; + force_integer_mv as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let allow_intrabc: u32 = unsafe { ::std::mem::transmute(allow_intrabc) }; + allow_intrabc as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let use_superres: u32 = unsafe { ::std::mem::transmute(use_superres) }; + use_superres as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let allow_high_precision_mv: u32 = unsafe { ::std::mem::transmute(allow_high_precision_mv) }; + allow_high_precision_mv as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let is_motion_mode_switchable: u32 = unsafe { ::std::mem::transmute(is_motion_mode_switchable) }; + is_motion_mode_switchable as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let use_ref_frame_mvs: u32 = unsafe { ::std::mem::transmute(use_ref_frame_mvs) }; + use_ref_frame_mvs as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let disable_frame_end_update_cdf: u32 = unsafe { ::std::mem::transmute(disable_frame_end_update_cdf) }; + disable_frame_end_update_cdf as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let uniform_tile_spacing_flag: u32 = unsafe { ::std::mem::transmute(uniform_tile_spacing_flag) }; + uniform_tile_spacing_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let allow_warped_motion: u32 = unsafe { ::std::mem::transmute(allow_warped_motion) }; + allow_warped_motion as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let large_scale_tile: u32 = unsafe { ::std::mem::transmute(large_scale_tile) }; + large_scale_tile as u64 + }); + __bindgen_bitfield_unit.set(17usize, 15u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_3 { + pub bits: _VADecPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1 { + #[inline] + pub fn sharpness_level(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) } + } + #[inline] + pub fn set_sharpness_level(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn sharpness_level_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 3u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_sharpness_level_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn mode_ref_delta_enabled(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } + } + #[inline] + pub fn set_mode_ref_delta_enabled(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mode_ref_delta_enabled_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_mode_ref_delta_enabled_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mode_ref_delta_update(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } + } + #[inline] + pub fn set_mode_ref_delta_update(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mode_ref_delta_update_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_mode_ref_delta_update_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 3u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + sharpness_level: u8, + mode_ref_delta_enabled: u8, + mode_ref_delta_update: u8, + reserved: u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 3u8, { + let sharpness_level: u8 = unsafe { ::std::mem::transmute(sharpness_level) }; + sharpness_level as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let mode_ref_delta_enabled: u8 = unsafe { ::std::mem::transmute(mode_ref_delta_enabled) }; + mode_ref_delta_enabled as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let mode_ref_delta_update: u8 = unsafe { ::std::mem::transmute(mode_ref_delta_update) }; + mode_ref_delta_update as u64 + }); + __bindgen_bitfield_unit.set(5usize, 3u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_3 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief quantization_matrix"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_4 { + pub bits: _VADecPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[repr(align(2))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1 { + #[inline] + pub fn using_qmatrix(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } + } + #[inline] + pub fn set_using_qmatrix(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn using_qmatrix_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_using_qmatrix_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_y(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_y(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_y_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_y_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_u(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_u(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_u_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_u_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_v(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_v(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_v_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_v_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 3u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + using_qmatrix: u16, + qm_y: u16, + qm_u: u16, + qm_v: u16, + reserved: u16, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let using_qmatrix: u16 = unsafe { ::std::mem::transmute(using_qmatrix) }; + using_qmatrix as u64 + }); + __bindgen_bitfield_unit.set(1usize, 4u8, { + let qm_y: u16 = unsafe { ::std::mem::transmute(qm_y) }; + qm_y as u64 + }); + __bindgen_bitfield_unit.set(5usize, 4u8, { + let qm_u: u16 = unsafe { ::std::mem::transmute(qm_u) }; + qm_u as u64 + }); + __bindgen_bitfield_unit.set(9usize, 4u8, { + let qm_v: u16 = unsafe { ::std::mem::transmute(qm_v) }; + qm_v as u64 + }); + __bindgen_bitfield_unit.set(13usize, 3u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_4 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_5 { + pub bits: _VADecPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1 { + #[inline] + pub fn delta_q_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_q_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_q_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_q_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_delta_q_res(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_delta_q_res(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_delta_q_res_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_delta_q_res_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_lf_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_lf_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_lf_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_lf_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_delta_lf_res(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_delta_lf_res(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_delta_lf_res_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_delta_lf_res_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_lf_multi(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_lf_multi(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_lf_multi_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_lf_multi_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn tx_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 2u8) as u32) } + } + #[inline] + pub fn set_tx_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn tx_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tx_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reference_select(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_reference_select(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reference_select_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reference_select_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reduced_tx_set_used(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_reduced_tx_set_used(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reduced_tx_set_used_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reduced_tx_set_used_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn skip_mode_present(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_skip_mode_present(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn skip_mode_present_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_skip_mode_present_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 20u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 20u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 20u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + delta_q_present_flag: u32, + log2_delta_q_res: u32, + delta_lf_present_flag: u32, + log2_delta_lf_res: u32, + delta_lf_multi: u32, + tx_mode: u32, + reference_select: u32, + reduced_tx_set_used: u32, + skip_mode_present: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let delta_q_present_flag: u32 = unsafe { ::std::mem::transmute(delta_q_present_flag) }; + delta_q_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let log2_delta_q_res: u32 = unsafe { ::std::mem::transmute(log2_delta_q_res) }; + log2_delta_q_res as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let delta_lf_present_flag: u32 = unsafe { ::std::mem::transmute(delta_lf_present_flag) }; + delta_lf_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let log2_delta_lf_res: u32 = unsafe { ::std::mem::transmute(log2_delta_lf_res) }; + log2_delta_lf_res as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let delta_lf_multi: u32 = unsafe { ::std::mem::transmute(delta_lf_multi) }; + delta_lf_multi as u64 + }); + __bindgen_bitfield_unit.set(7usize, 2u8, { + let tx_mode: u32 = unsafe { ::std::mem::transmute(tx_mode) }; + tx_mode as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let reference_select: u32 = unsafe { ::std::mem::transmute(reference_select) }; + reference_select as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let reduced_tx_set_used: u32 = unsafe { ::std::mem::transmute(reduced_tx_set_used) }; + reduced_tx_set_used as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let skip_mode_present: u32 = unsafe { ::std::mem::transmute(skip_mode_present) }; + skip_mode_present as u64 + }); + __bindgen_bitfield_unit.set(12usize, 20u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief loop restoration parameters"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VADecPictureParameterBufferAV1__bindgen_ty_6 { + pub bits: _VADecPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[repr(align(2))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADecPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +impl _VADecPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1 { + #[inline] + pub fn yframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) } + } + #[inline] + pub fn set_yframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn yframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_yframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn cbframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u16) } + } + #[inline] + pub fn set_cbframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn cbframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_cbframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn crframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u16) } + } + #[inline] + pub fn set_crframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn crframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_crframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn lr_unit_shift(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u16) } + } + #[inline] + pub fn set_lr_unit_shift(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn lr_unit_shift_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_lr_unit_shift_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn lr_uv_shift(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } + } + #[inline] + pub fn set_lr_uv_shift(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn lr_uv_shift_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_lr_uv_shift_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 7u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + yframe_restoration_type: u16, + cbframe_restoration_type: u16, + crframe_restoration_type: u16, + lr_unit_shift: u16, + lr_uv_shift: u16, + reserved: u16, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let yframe_restoration_type: u16 = unsafe { ::std::mem::transmute(yframe_restoration_type) }; + yframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let cbframe_restoration_type: u16 = unsafe { ::std::mem::transmute(cbframe_restoration_type) }; + cbframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let crframe_restoration_type: u16 = unsafe { ::std::mem::transmute(crframe_restoration_type) }; + crframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let lr_unit_shift: u16 = unsafe { ::std::mem::transmute(lr_unit_shift) }; + lr_unit_shift as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let lr_uv_shift: u16 = unsafe { ::std::mem::transmute(lr_uv_shift) }; + lr_uv_shift as u64 + }); + __bindgen_bitfield_unit.set(9usize, 7u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VADecPictureParameterBufferAV1__bindgen_ty_6 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VADecPictureParameterBufferAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief AV1 Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"] +pub type VADecPictureParameterBufferAV1 = _VADecPictureParameterBufferAV1; +#[doc = " \\brief AV1 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to bit stream data and should be\n sent once per tile.\n\n It uses the name VASliceParameterBufferAV1 to be consistent with other codec,\n but actually means VATileParameterBufferAV1.\n\n Slice data buffer of VASliceDataBufferType is used\n to send the bitstream.\n\n Please note that host decoder is responsible to parse out the\n per tile information. And the bit stream in sent to driver in per\n tile granularity."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VASliceParameterBufferAV1 { + #[doc = "@{*/\n/** \\brief The byte count of current tile in the bitstream buffer,\n starting from first byte of the buffer.\n It uses the name slice_data_size to be consistent with other codec,\n but actually means tile_data_size."] + pub slice_data_size: u32, + #[doc = " offset to the first byte of the data buffer."] + pub slice_data_offset: u32, + #[doc = " see VA_SLICE_DATA_FLAG_XXX definitions"] + pub slice_data_flag: u32, + pub tile_row: u16, + pub tile_column: u16, + pub tg_start: u16, + pub tg_end: u16, + #[doc = " \\brief anchor frame index for large scale tile.\n index into an array AnchorFrames of the frames that the tile uses\n for prediction.\n valid only when large_scale_tile equals 1."] + pub anchor_frame_idx: u8, + #[doc = " \\brief tile index in the tile list.\n Valid only when large_scale_tile is enabled.\n Driver uses this field to decide the tile output location."] + pub tile_idx_in_tile_list: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief AV1 Slice Parameter Buffer Structure\n\n This structure conveys parameters related to bit stream data and should be\n sent once per tile.\n\n It uses the name VASliceParameterBufferAV1 to be consistent with other codec,\n but actually means VATileParameterBufferAV1.\n\n Slice data buffer of VASliceDataBufferType is used\n to send the bitstream.\n\n Please note that host decoder is responsible to parse out the\n per tile information. And the bit stream in sent to driver in per\n tile granularity."] +pub type VASliceParameterBufferAV1 = _VASliceParameterBufferAV1; +#[doc = " Attribute value for VAConfigAttribEncHEVCFeatures.\n\n This attribute decribes the supported features of an HEVC/H.265\n encoder configuration.\n\n All of the field values in this attribute are VA_FEATURE_* values,\n indicating support for the corresponding feature."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union VAConfigAttribValEncHEVCFeatures { + pub bits: VAConfigAttribValEncHEVCFeatures__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct VAConfigAttribValEncHEVCFeatures__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl VAConfigAttribValEncHEVCFeatures__bindgen_ty_1 { + #[inline] + pub fn separate_colour_planes(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_separate_colour_planes(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn separate_colour_planes_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_separate_colour_planes_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn scaling_lists(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_scaling_lists(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn scaling_lists_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_scaling_lists_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn amp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_amp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn amp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_amp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn sao(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } + } + #[inline] + pub fn set_sao(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn sao_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sao_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn pcm(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } + } + #[inline] + pub fn set_pcm(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn pcm_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pcm_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_mvp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } + } + #[inline] + pub fn set_temporal_mvp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_mvp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_mvp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn strong_intra_smoothing(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_strong_intra_smoothing(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn strong_intra_smoothing_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_strong_intra_smoothing_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn dependent_slices(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_dependent_slices(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn dependent_slices_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dependent_slices_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_data_hiding(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_data_hiding_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_data_hiding_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn constrained_intra_pred(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn constrained_intra_pred_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_constrained_intra_pred_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 2u8) as u32) } + } + #[inline] + pub fn set_transform_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn cu_qp_delta(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 2u8) as u32) } + } + #[inline] + pub fn set_cu_qp_delta(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn cu_qp_delta_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cu_qp_delta_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_prediction(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u32) } + } + #[inline] + pub fn set_weighted_prediction(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_prediction_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_prediction_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn transquant_bypass(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 2u8) as u32) } + } + #[inline] + pub fn set_transquant_bypass(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn transquant_bypass_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transquant_bypass_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn deblocking_filter_disable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_disable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn deblocking_filter_disable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_deblocking_filter_disable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 2u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + separate_colour_planes: u32, + scaling_lists: u32, + amp: u32, + sao: u32, + pcm: u32, + temporal_mvp: u32, + strong_intra_smoothing: u32, + dependent_slices: u32, + sign_data_hiding: u32, + constrained_intra_pred: u32, + transform_skip: u32, + cu_qp_delta: u32, + weighted_prediction: u32, + transquant_bypass: u32, + deblocking_filter_disable: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let separate_colour_planes: u32 = unsafe { ::std::mem::transmute(separate_colour_planes) }; + separate_colour_planes as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let scaling_lists: u32 = unsafe { ::std::mem::transmute(scaling_lists) }; + scaling_lists as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let amp: u32 = unsafe { ::std::mem::transmute(amp) }; + amp as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let sao: u32 = unsafe { ::std::mem::transmute(sao) }; + sao as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let pcm: u32 = unsafe { ::std::mem::transmute(pcm) }; + pcm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 2u8, { + let temporal_mvp: u32 = unsafe { ::std::mem::transmute(temporal_mvp) }; + temporal_mvp as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let strong_intra_smoothing: u32 = unsafe { ::std::mem::transmute(strong_intra_smoothing) }; + strong_intra_smoothing as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let dependent_slices: u32 = unsafe { ::std::mem::transmute(dependent_slices) }; + dependent_slices as u64 + }); + __bindgen_bitfield_unit.set(16usize, 2u8, { + let sign_data_hiding: u32 = unsafe { ::std::mem::transmute(sign_data_hiding) }; + sign_data_hiding as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let constrained_intra_pred: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred) }; + constrained_intra_pred as u64 + }); + __bindgen_bitfield_unit.set(20usize, 2u8, { + let transform_skip: u32 = unsafe { ::std::mem::transmute(transform_skip) }; + transform_skip as u64 + }); + __bindgen_bitfield_unit.set(22usize, 2u8, { + let cu_qp_delta: u32 = unsafe { ::std::mem::transmute(cu_qp_delta) }; + cu_qp_delta as u64 + }); + __bindgen_bitfield_unit.set(24usize, 2u8, { + let weighted_prediction: u32 = unsafe { ::std::mem::transmute(weighted_prediction) }; + weighted_prediction as u64 + }); + __bindgen_bitfield_unit.set(26usize, 2u8, { + let transquant_bypass: u32 = unsafe { ::std::mem::transmute(transquant_bypass) }; + transquant_bypass as u64 + }); + __bindgen_bitfield_unit.set(28usize, 2u8, { + let deblocking_filter_disable: u32 = unsafe { ::std::mem::transmute(deblocking_filter_disable) }; + deblocking_filter_disable as u64 + }); + __bindgen_bitfield_unit.set(30usize, 2u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for VAConfigAttribValEncHEVCFeatures { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " Attribute value for VAConfigAttribEncHEVCBlockSizes.\n\n This attribute describes the supported coding tree and transform block\n sizes of an HEVC/H.265 encoder configuration"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union VAConfigAttribValEncHEVCBlockSizes { + pub bits: VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1 { + #[inline] + pub fn log2_max_coding_tree_block_size_minus3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_max_coding_tree_block_size_minus3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_coding_tree_block_size_minus3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_coding_tree_block_size_minus3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_min_coding_tree_block_size_minus3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_min_coding_tree_block_size_minus3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_min_coding_tree_block_size_minus3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_min_coding_tree_block_size_minus3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_min_luma_coding_block_size_minus3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_min_luma_coding_block_size_minus3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_min_luma_coding_block_size_minus3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_min_luma_coding_block_size_minus3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_luma_transform_block_size_minus2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_max_luma_transform_block_size_minus2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_luma_transform_block_size_minus2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_luma_transform_block_size_minus2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_min_luma_transform_block_size_minus2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_min_luma_transform_block_size_minus2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_min_luma_transform_block_size_minus2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_min_luma_transform_block_size_minus2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn max_max_transform_hierarchy_depth_inter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } + } + #[inline] + pub fn set_max_max_transform_hierarchy_depth_inter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn max_max_transform_hierarchy_depth_inter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_max_transform_hierarchy_depth_inter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn min_max_transform_hierarchy_depth_inter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_min_max_transform_hierarchy_depth_inter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn min_max_transform_hierarchy_depth_inter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_min_max_transform_hierarchy_depth_inter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn max_max_transform_hierarchy_depth_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_max_max_transform_hierarchy_depth_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn max_max_transform_hierarchy_depth_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_max_transform_hierarchy_depth_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn min_max_transform_hierarchy_depth_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) } + } + #[inline] + pub fn set_min_max_transform_hierarchy_depth_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn min_max_transform_hierarchy_depth_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_min_max_transform_hierarchy_depth_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_pcm_coding_block_size_minus3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_max_pcm_coding_block_size_minus3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_pcm_coding_block_size_minus3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_pcm_coding_block_size_minus3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_min_pcm_coding_block_size_minus3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 2u8) as u32) } + } + #[inline] + pub fn set_log2_min_pcm_coding_block_size_minus3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_min_pcm_coding_block_size_minus3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_min_pcm_coding_block_size_minus3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 10u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 10u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 10u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 10u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + log2_max_coding_tree_block_size_minus3: u32, + log2_min_coding_tree_block_size_minus3: u32, + log2_min_luma_coding_block_size_minus3: u32, + log2_max_luma_transform_block_size_minus2: u32, + log2_min_luma_transform_block_size_minus2: u32, + max_max_transform_hierarchy_depth_inter: u32, + min_max_transform_hierarchy_depth_inter: u32, + max_max_transform_hierarchy_depth_intra: u32, + min_max_transform_hierarchy_depth_intra: u32, + log2_max_pcm_coding_block_size_minus3: u32, + log2_min_pcm_coding_block_size_minus3: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let log2_max_coding_tree_block_size_minus3: u32 = + unsafe { ::std::mem::transmute(log2_max_coding_tree_block_size_minus3) }; + log2_max_coding_tree_block_size_minus3 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let log2_min_coding_tree_block_size_minus3: u32 = + unsafe { ::std::mem::transmute(log2_min_coding_tree_block_size_minus3) }; + log2_min_coding_tree_block_size_minus3 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let log2_min_luma_coding_block_size_minus3: u32 = + unsafe { ::std::mem::transmute(log2_min_luma_coding_block_size_minus3) }; + log2_min_luma_coding_block_size_minus3 as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let log2_max_luma_transform_block_size_minus2: u32 = + unsafe { ::std::mem::transmute(log2_max_luma_transform_block_size_minus2) }; + log2_max_luma_transform_block_size_minus2 as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let log2_min_luma_transform_block_size_minus2: u32 = + unsafe { ::std::mem::transmute(log2_min_luma_transform_block_size_minus2) }; + log2_min_luma_transform_block_size_minus2 as u64 + }); + __bindgen_bitfield_unit.set(10usize, 2u8, { + let max_max_transform_hierarchy_depth_inter: u32 = + unsafe { ::std::mem::transmute(max_max_transform_hierarchy_depth_inter) }; + max_max_transform_hierarchy_depth_inter as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let min_max_transform_hierarchy_depth_inter: u32 = + unsafe { ::std::mem::transmute(min_max_transform_hierarchy_depth_inter) }; + min_max_transform_hierarchy_depth_inter as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let max_max_transform_hierarchy_depth_intra: u32 = + unsafe { ::std::mem::transmute(max_max_transform_hierarchy_depth_intra) }; + max_max_transform_hierarchy_depth_intra as u64 + }); + __bindgen_bitfield_unit.set(16usize, 2u8, { + let min_max_transform_hierarchy_depth_intra: u32 = + unsafe { ::std::mem::transmute(min_max_transform_hierarchy_depth_intra) }; + min_max_transform_hierarchy_depth_intra as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let log2_max_pcm_coding_block_size_minus3: u32 = + unsafe { ::std::mem::transmute(log2_max_pcm_coding_block_size_minus3) }; + log2_max_pcm_coding_block_size_minus3 as u64 + }); + __bindgen_bitfield_unit.set(20usize, 2u8, { + let log2_min_pcm_coding_block_size_minus3: u32 = + unsafe { ::std::mem::transmute(log2_min_pcm_coding_block_size_minus3) }; + log2_min_pcm_coding_block_size_minus3 as u64 + }); + __bindgen_bitfield_unit.set(22usize, 10u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for VAConfigAttribValEncHEVCBlockSizes { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub mod VAEncPackedHeaderTypeHEVC { + #[doc = " \\brief Packed header types specific to HEVC encoding.\n\n Types of packed headers generally used for HEVC encoding. Each\n associated packed header data buffer shall contain the start code\n prefix 0x000001 followed by the complete NAL unit, thus also\n including the \\c nal_unit_type.\n\n Note: the start code prefix can contain an arbitrary number of leading\n zeros. The driver will skip them for emulation prevention bytes insertion,\n if necessary."] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Packed Video Parameter Set (VPS).\n\n The corresponding packed header data buffer shall contain the\n complete video_parameter_set_rbsp() syntax element.\n\n Note: packed \\c nal_unit_type shall be equal to 32."] + pub const VAEncPackedHeaderHEVC_VPS: Type = 1; + #[doc = " \\brief Packed Sequence Parameter Set (SPS).\n\n The corresponding packed header data buffer shall contain the\n complete seq_parameter_set_rbsp() syntax element.\n\n Note: packed \\c nal_unit_type shall be equal to 33."] + pub const VAEncPackedHeaderHEVC_SPS: Type = 1; + #[doc = " \\brief Packed Picture Parameter Set (PPS).\n\n The corresponding packed header data buffer shall contain the\n complete pic_parameter_set_rbsp() syntax element.\n\n Note: packed \\c nal_unit_type shall be equal to 34."] + pub const VAEncPackedHeaderHEVC_PPS: Type = 2; + #[doc = " \\brief Packed slice header.\n\n The corresponding packed header data buffer shall contain the\n \\c slice_header() syntax element only, along with any start\n code prefix and NAL unit type preceeding it. i.e. this means\n that the buffer does not contain any of the \\c slice_data() or\n the \\c rbsp_slice_trailing_bits().\n\n Note: packed \\c nal_unit_type shall be equal to 0 to 9 (non-IRAP\n picture), or 16 to 21 (IRAP picture)."] + pub const VAEncPackedHeaderHEVC_Slice: Type = 3; + #[doc = " \\brief Packed Supplemental Enhancement Information (SEI).\n\n The corresponding packed header data buffer shall contain the\n complete sei_rbsp() syntax element, thus including several\n sei_message() elements if necessary.\n\n Note: packed \\c nal_unit_type shall be equal to 39 or 40.\n\n @deprecated\n This is a deprecated packed header flag, All applications can use\n \\c VA_ENC_PACKED_HEADER_RAW_DATA to pass the corresponding packed\n SEI header data buffer to the driver"] + pub const VAEncPackedHeaderHEVC_SEI: Type = 2147483649; +} +#[doc = " \\brief Sequence parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the HEVC specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSequenceParameterBufferHEVC { + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [1..2]."] + pub general_profile_idc: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n general_level_idc shall be set equal to a value of 30 times the level\n numbers allowed [1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2]"] + pub general_level_idc: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n Only value 0 is allowed for level value below 4, exclusive."] + pub general_tier_flag: u8, + #[doc = " \\brief Period between I frames."] + pub intra_period: u32, + #[doc = " \\brief Period between IDR frames."] + pub intra_idr_period: u32, + #[doc = " \\brief Period between I/P frames."] + pub ip_period: u32, + #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."] + pub bits_per_second: u32, + #[doc = " \\brief Picture width in pixel samples.\n Its value must be multiple of min CU size."] + pub pic_width_in_luma_samples: u16, + #[doc = " \\brief Picture height in pixel samples.\n Its value must be multiple of min CU size."] + pub pic_height_in_luma_samples: u16, + pub seq_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_1, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [0..3]"] + pub log2_min_luma_coding_block_size_minus3: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub log2_diff_max_min_luma_coding_block_size: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [0..3]"] + pub log2_min_transform_block_size_minus2: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub log2_diff_max_min_transform_block_size: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [2]"] + pub max_transform_hierarchy_depth_inter: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [2]"] + pub max_transform_hierarchy_depth_intra: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub pcm_sample_bit_depth_luma_minus1: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub pcm_sample_bit_depth_chroma_minus1: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub log2_min_pcm_luma_coding_block_size_minus3: u32, + #[doc = " \\brief Derived from the HEVC bitstream syntax element.\n log2_min_pcm_luma_coding_block_size_minus3 +\n log2_diff_max_min_pcm_luma_coding_block_size"] + pub log2_max_pcm_luma_coding_block_size_minus3: u32, + #[doc = " @name VUI parameters (optional) */\n/**@{*/\n/** \\brief Same as the HEVC bitstream syntax element."] + pub vui_parameters_present_flag: u8, + pub vui_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_2, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub aspect_ratio_idc: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub sar_width: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub sar_height: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub vui_num_units_in_tick: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub vui_time_scale: u32, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub min_spatial_segmentation_idc: u16, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub max_bytes_per_pic_denom: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub max_bits_per_min_cu_denom: u8, + pub scc_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_3, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 7usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_1 { + pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn chroma_format_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_format_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn separate_colour_plane_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_separate_colour_plane_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bit_depth_luma_minus8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u32) } + } + #[inline] + pub fn set_bit_depth_luma_minus8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn bit_depth_luma_minus8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_bit_depth_luma_minus8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn bit_depth_chroma_minus8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) } + } + #[inline] + pub fn set_bit_depth_chroma_minus8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn bit_depth_chroma_minus8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_bit_depth_chroma_minus8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn scaling_list_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn scaling_list_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_scaling_list_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn strong_intra_smoothing_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_strong_intra_smoothing_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn amp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_amp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn amp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_amp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_sample_adaptive_offset_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_adaptive_offset_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sample_adaptive_offset_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pcm_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pcm_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pcm_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pcm_loop_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pcm_loop_filter_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pcm_loop_filter_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sps_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sps_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn low_delay_seq(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_low_delay_seq(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn low_delay_seq_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_low_delay_seq_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn hierachical_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_hierachical_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn hierachical_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_hierachical_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved_bits(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 14u8) as u32) } + } + #[inline] + pub fn set_reserved_bits(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 14u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_bits_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 14u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_bits_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 14u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + chroma_format_idc: u32, + separate_colour_plane_flag: u32, + bit_depth_luma_minus8: u32, + bit_depth_chroma_minus8: u32, + scaling_list_enabled_flag: u32, + strong_intra_smoothing_enabled_flag: u32, + amp_enabled_flag: u32, + sample_adaptive_offset_enabled_flag: u32, + pcm_enabled_flag: u32, + pcm_loop_filter_disabled_flag: u32, + sps_temporal_mvp_enabled_flag: u32, + low_delay_seq: u32, + hierachical_flag: u32, + reserved_bits: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) }; + chroma_format_idc as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let separate_colour_plane_flag: u32 = unsafe { ::std::mem::transmute(separate_colour_plane_flag) }; + separate_colour_plane_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 3u8, { + let bit_depth_luma_minus8: u32 = unsafe { ::std::mem::transmute(bit_depth_luma_minus8) }; + bit_depth_luma_minus8 as u64 + }); + __bindgen_bitfield_unit.set(6usize, 3u8, { + let bit_depth_chroma_minus8: u32 = unsafe { ::std::mem::transmute(bit_depth_chroma_minus8) }; + bit_depth_chroma_minus8 as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let scaling_list_enabled_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_enabled_flag) }; + scaling_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let strong_intra_smoothing_enabled_flag: u32 = + unsafe { ::std::mem::transmute(strong_intra_smoothing_enabled_flag) }; + strong_intra_smoothing_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let amp_enabled_flag: u32 = unsafe { ::std::mem::transmute(amp_enabled_flag) }; + amp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let sample_adaptive_offset_enabled_flag: u32 = + unsafe { ::std::mem::transmute(sample_adaptive_offset_enabled_flag) }; + sample_adaptive_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let pcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_enabled_flag) }; + pcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let pcm_loop_filter_disabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_loop_filter_disabled_flag) }; + pcm_loop_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let sps_temporal_mvp_enabled_flag: u32 = unsafe { ::std::mem::transmute(sps_temporal_mvp_enabled_flag) }; + sps_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let low_delay_seq: u32 = unsafe { ::std::mem::transmute(low_delay_seq) }; + low_delay_seq as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let hierachical_flag: u32 = unsafe { ::std::mem::transmute(hierachical_flag) }; + hierachical_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 14u8, { + let reserved_bits: u32 = unsafe { ::std::mem::transmute(reserved_bits) }; + reserved_bits as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_2 { + pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aspect_ratio_info_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_aspect_ratio_info_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn neutral_chroma_indication_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_neutral_chroma_indication_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn neutral_chroma_indication_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_neutral_chroma_indication_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn field_seq_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_seq_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn field_seq_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_seq_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn vui_timing_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn vui_timing_info_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vui_timing_info_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bitstream_restriction_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_bitstream_restriction_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn tiles_fixed_structure_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_fixed_structure_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn tiles_fixed_structure_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tiles_fixed_structure_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn motion_vectors_over_pic_boundaries_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_motion_vectors_over_pic_boundaries_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn restricted_ref_pic_lists_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_restricted_ref_pic_lists_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn restricted_ref_pic_lists_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_restricted_ref_pic_lists_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_mv_length_horizontal(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) } + } + #[inline] + pub fn set_log2_max_mv_length_horizontal(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_mv_length_horizontal_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_mv_length_horizontal_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_mv_length_vertical(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 5u8) as u32) } + } + #[inline] + pub fn set_log2_max_mv_length_vertical(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_mv_length_vertical_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_mv_length_vertical_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + neutral_chroma_indication_flag: u32, + field_seq_flag: u32, + vui_timing_info_present_flag: u32, + bitstream_restriction_flag: u32, + tiles_fixed_structure_flag: u32, + motion_vectors_over_pic_boundaries_flag: u32, + restricted_ref_pic_lists_flag: u32, + log2_max_mv_length_horizontal: u32, + log2_max_mv_length_vertical: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let aspect_ratio_info_present_flag: u32 = unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let neutral_chroma_indication_flag: u32 = unsafe { ::std::mem::transmute(neutral_chroma_indication_flag) }; + neutral_chroma_indication_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let field_seq_flag: u32 = unsafe { ::std::mem::transmute(field_seq_flag) }; + field_seq_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let vui_timing_info_present_flag: u32 = unsafe { ::std::mem::transmute(vui_timing_info_present_flag) }; + vui_timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let bitstream_restriction_flag: u32 = unsafe { ::std::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let tiles_fixed_structure_flag: u32 = unsafe { ::std::mem::transmute(tiles_fixed_structure_flag) }; + tiles_fixed_structure_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let motion_vectors_over_pic_boundaries_flag: u32 = + unsafe { ::std::mem::transmute(motion_vectors_over_pic_boundaries_flag) }; + motion_vectors_over_pic_boundaries_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let restricted_ref_pic_lists_flag: u32 = unsafe { ::std::mem::transmute(restricted_ref_pic_lists_flag) }; + restricted_ref_pic_lists_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 5u8, { + let log2_max_mv_length_horizontal: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_horizontal) }; + log2_max_mv_length_horizontal as u64 + }); + __bindgen_bitfield_unit.set(13usize, 5u8, { + let log2_max_mv_length_vertical: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_vertical) }; + log2_max_mv_length_vertical as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief SCC flags to enable/disable features, including IBC and palette mode at present."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_3 { + pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1 { + #[inline] + pub fn palette_mode_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_palette_mode_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn palette_mode_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_palette_mode_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 31u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(palette_mode_enabled_flag: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let palette_mode_enabled_flag: u32 = unsafe { ::std::mem::transmute(palette_mode_enabled_flag) }; + palette_mode_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_3 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSequenceParameterBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Sequence parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the HEVC specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."] +pub type VAEncSequenceParameterBufferHEVC = _VAEncSequenceParameterBufferHEVC; +#[doc = " HEVC data structures\n/\n/**\n \\brief Picture parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the HEVC specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferHEVC { + #[doc = " \\brief Information about the picture to be encoded.\n\n See #VAPictureHEVC for further description of each field.\n Note that decoded_curr_pic.picture_id represents the reconstructed\n (decoded) picture. User provides a scratch VA surface ID here.\n Long term reference and RPS related fields should be set to 0\n and ignored."] + pub decoded_curr_pic: VAPictureHEVC, + #[doc = " \\brief Decoded Picture Buffer (DPB).\n\n This array represents the list of reconstructed (decoded)\n frames used as reference. It is important to keep track of\n reconstructed frames so that they can be used later on as\n reference for P or B-frames encoding."] + pub reference_frames: [VAPictureHEVC; 15usize], + #[doc = " \\brief Output encoded bitstream.\n\n \\ref coded_buf has type #VAEncCodedBufferType. It should be\n large enough to hold the compressed NAL slice and possibly VPS, SPS\n and PPS NAL units, and other NAL units such as SEI."] + pub coded_buf: VABufferID, + #[doc = " \\brief collocated reference picture buffer index of ReferenceFrames[].\n Please note it is different from HEVC syntac element collocated_ref_idx.\n When the HEVC syntax element slice_temporal_mvp_enable_flag takes value 0,\n collocated_ref_pic_index should take value 0xFF. .\n Range: [0..14, 0xFF]"] + pub collocated_ref_pic_index: u8, + #[doc = " \\brief OR'd flags describing whether the picture is the last one or not.\n\n This fields holds 0 if the picture to be encoded is not the last\n one in the stream or sequence. Otherwise, it is a combination of\n \\ref HEVC_LAST_PICTURE_EOSEQ or \\ref HEVC_LAST_PICTURE_EOSTREAM."] + pub last_picture: u8, + #[doc = " \\brief \\c init_qp_minus26 + 26."] + pub pic_init_qp: u8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub diff_cu_qp_delta_depth: u8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub pps_cb_qp_offset: i8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub pps_cr_qp_offset: i8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub num_tile_columns_minus1: u8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub num_tile_rows_minus1: u8, + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub column_width_minus1: [u8; 19usize], + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub row_height_minus1: [u8; 21usize], + #[doc = " \\brief Corresponds to HEVC syntax element of the same name."] + pub log2_parallel_merge_level_minus2: u8, + #[doc = " \\brief Application may set the CTU bit size limit based on\n spec requirement (A.3.2), or other value for special purpose.\n If the value is set 0, no bit size limit is checked."] + pub ctu_max_bitsize_allowed: u8, + #[doc = " \\brief Maximum reference index for reference picture list 0.\n value range: [0..14]."] + pub num_ref_idx_l0_default_active_minus1: u8, + #[doc = " \\brief Maximum reference index for reference picture list 1.\n value range: [0..14]."] + pub num_ref_idx_l1_default_active_minus1: u8, + #[doc = " \\brief PPS header\n Used by GPU to generate new slice headers in slice size control.\n value range: [0..63]."] + pub slice_pic_parameter_set_id: u8, + #[doc = " \\brief NAL unit type\n Used by GPU to generate new slice headers in slice size control.\n value range: [0..63]."] + pub nal_unit_type: u8, + pub pic_fields: _VAEncPictureParameterBufferHEVC__bindgen_ty_1, + #[doc = " \\brief When hierachical_level_plus1 > 0, hierachical_level_plus1-1 indicates\nthe current frame's level.when it > 0. B1, B2 setting in CodingType can be treated as B,\nhirachical level is determined by this variable.When hierachical_level_plus1 == 0,\nhierarchical level information still comes from coding_type."] + pub hierarchical_level_plus1: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_byte_reserved: u8, + pub scc_fields: _VAEncPictureParameterBufferHEVC__bindgen_ty_2, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 15usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferHEVC__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn idr_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_idr_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn idr_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_idr_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn coding_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } + } + #[inline] + pub fn set_coding_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn coding_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_coding_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn reference_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_reference_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dependent_slice_segments_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dependent_slice_segments_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_data_hiding_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_data_hiding_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_data_hiding_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_skip_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_skip_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_skip_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cu_qp_delta_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cu_qp_delta_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cu_qp_delta_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_bipred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_bipred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_bipred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transquant_bypass_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transquant_bypass_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transquant_bypass_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn tiles_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tiles_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn entropy_coding_sync_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn entropy_coding_sync_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_entropy_coding_sync_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_across_tiles_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_across_tiles_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pps_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn scaling_list_data_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_scaling_list_data_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn screen_content_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_screen_content_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn screen_content_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_screen_content_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_gpu_weighted_prediction(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_gpu_weighted_prediction(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_gpu_weighted_prediction_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_gpu_weighted_prediction_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn no_output_of_prior_pics_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_output_of_prior_pics_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn no_output_of_prior_pics_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_output_of_prior_pics_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 11u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 11u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 11u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + idr_pic_flag: u32, + coding_type: u32, + reference_pic_flag: u32, + dependent_slice_segments_enabled_flag: u32, + sign_data_hiding_enabled_flag: u32, + constrained_intra_pred_flag: u32, + transform_skip_enabled_flag: u32, + cu_qp_delta_enabled_flag: u32, + weighted_pred_flag: u32, + weighted_bipred_flag: u32, + transquant_bypass_enabled_flag: u32, + tiles_enabled_flag: u32, + entropy_coding_sync_enabled_flag: u32, + loop_filter_across_tiles_enabled_flag: u32, + pps_loop_filter_across_slices_enabled_flag: u32, + scaling_list_data_present_flag: u32, + screen_content_flag: u32, + enable_gpu_weighted_prediction: u32, + no_output_of_prior_pics_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let idr_pic_flag: u32 = unsafe { ::std::mem::transmute(idr_pic_flag) }; + idr_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let coding_type: u32 = unsafe { ::std::mem::transmute(coding_type) }; + coding_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) }; + reference_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let dependent_slice_segments_enabled_flag: u32 = + unsafe { ::std::mem::transmute(dependent_slice_segments_enabled_flag) }; + dependent_slice_segments_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let sign_data_hiding_enabled_flag: u32 = unsafe { ::std::mem::transmute(sign_data_hiding_enabled_flag) }; + sign_data_hiding_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let transform_skip_enabled_flag: u32 = unsafe { ::std::mem::transmute(transform_skip_enabled_flag) }; + transform_skip_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let cu_qp_delta_enabled_flag: u32 = unsafe { ::std::mem::transmute(cu_qp_delta_enabled_flag) }; + cu_qp_delta_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let weighted_bipred_flag: u32 = unsafe { ::std::mem::transmute(weighted_bipred_flag) }; + weighted_bipred_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let transquant_bypass_enabled_flag: u32 = unsafe { ::std::mem::transmute(transquant_bypass_enabled_flag) }; + transquant_bypass_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let tiles_enabled_flag: u32 = unsafe { ::std::mem::transmute(tiles_enabled_flag) }; + tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let entropy_coding_sync_enabled_flag: u32 = + unsafe { ::std::mem::transmute(entropy_coding_sync_enabled_flag) }; + entropy_coding_sync_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let loop_filter_across_tiles_enabled_flag: u32 = + unsafe { ::std::mem::transmute(loop_filter_across_tiles_enabled_flag) }; + loop_filter_across_tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let pps_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::std::mem::transmute(pps_loop_filter_across_slices_enabled_flag) }; + pps_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let scaling_list_data_present_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_data_present_flag) }; + scaling_list_data_present_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let screen_content_flag: u32 = unsafe { ::std::mem::transmute(screen_content_flag) }; + screen_content_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let enable_gpu_weighted_prediction: u32 = unsafe { ::std::mem::transmute(enable_gpu_weighted_prediction) }; + enable_gpu_weighted_prediction as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let no_output_of_prior_pics_flag: u32 = unsafe { ::std::mem::transmute(no_output_of_prior_pics_flag) }; + no_output_of_prior_pics_flag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 11u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferHEVC__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief SCC flags to enable/disable feature, only IBC at present."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferHEVC__bindgen_ty_2 { + pub bits: _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +impl _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn pps_curr_pic_ref_enabled_flag(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } + } + #[inline] + pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pps_curr_pic_ref_enabled_flag_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_pps_curr_pic_ref_enabled_flag_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 15u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 15u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 15u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(pps_curr_pic_ref_enabled_flag: u16, reserved: u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pps_curr_pic_ref_enabled_flag: u16 = unsafe { ::std::mem::transmute(pps_curr_pic_ref_enabled_flag) }; + pps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 15u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferHEVC__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " HEVC data structures\n/\n/**\n \\brief Picture parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the HEVC specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."] +pub type VAEncPictureParameterBufferHEVC = _VAEncPictureParameterBufferHEVC; +#[doc = " \\brief Slice parameter for HEVC encoding in main & main 10 profiles.\n\n This structure holds information for \\c\n slice_segment_layer_rbsp() as defined by the HEVC\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSliceParameterBufferHEVC { + #[doc = " \\brief Starting CTU address for this slice."] + pub slice_segment_address: u32, + #[doc = " \\brief Number of CTUs in this slice."] + pub num_ctu_in_slice: u32, + #[doc = " \\brief Slice type.\n Corresponds to HEVC syntax element of the same name."] + pub slice_type: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_pic_parameter_set_id: u8, + #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 14, inclusive."] + pub num_ref_idx_l0_active_minus1: u8, + #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 14, inclusive."] + pub num_ref_idx_l1_active_minus1: u8, + #[doc = " \\brief Reference picture list 0 (for P slices)."] + pub ref_pic_list0: [VAPictureHEVC; 15usize], + #[doc = " \\brief Reference picture list 1 (for B slices)."] + pub ref_pic_list1: [VAPictureHEVC; 15usize], + #[doc = " @name pred_weight_table() */\n/**@{*/\n/** \\brief Same as the HEVC bitstream syntax element."] + pub luma_log2_weight_denom: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub delta_chroma_log2_weight_denom: i8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub delta_luma_weight_l0: [i8; 15usize], + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub luma_offset_l0: [i8; 15usize], + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub delta_chroma_weight_l0: [[i8; 2usize]; 15usize], + #[doc = " \\brief Same as the HEVC spec variable ChromaOffsetL0[]."] + pub chroma_offset_l0: [[i8; 2usize]; 15usize], + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub delta_luma_weight_l1: [i8; 15usize], + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub luma_offset_l1: [i8; 15usize], + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub delta_chroma_weight_l1: [[i8; 2usize]; 15usize], + #[doc = " \\brief Same as the HEVC spec variable ChromaOffsetL1[]."] + pub chroma_offset_l1: [[i8; 2usize]; 15usize], + #[doc = " \\brief Corresponds to HEVC spec variable MaxNumMergeCand.\n Range: [1..5]."] + pub max_num_merge_cand: u8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_qp_delta: i8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_cb_qp_offset: i8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_cr_qp_offset: i8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_beta_offset_div2: i8, + #[doc = " \\brief Same as the HEVC bitstream syntax element."] + pub slice_tc_offset_div2: i8, + pub slice_fields: _VAEncSliceParameterBufferHEVC__bindgen_ty_1, + #[doc = " \\brief bit offset of syntax element pred_weight_table() in slice segment header.\n It aligns with the starting position of the current packed slice header.\n It is used when encoder prefers to override the weighted prediction parameters passed in\n from application.\n Please refer to enable_gpu_weighted_prediction in VAEncPictureParameterBufferHEVC."] + pub pred_weight_table_bit_offset: u32, + #[doc = " \\brief bit length of syntax element pred_weight_table() in slice segment header.\n It is used when encoder prefers to override the weighted prediction parameters passed in\n from application.\n Please refer to enable_gpu_weighted_prediction in VAEncPictureParameterBufferHEVC."] + pub pred_weight_table_bit_length: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSliceParameterBufferHEVC__bindgen_ty_1 { + pub bits: _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn last_slice_of_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_last_slice_of_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn last_slice_of_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_last_slice_of_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dependent_slice_segment_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segment_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dependent_slice_segment_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dependent_slice_segment_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn colour_plane_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_colour_plane_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn colour_plane_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_colour_plane_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_sao_luma_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_luma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_sao_luma_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_sao_luma_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_sao_chroma_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_chroma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_sao_chroma_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_sao_chroma_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn num_ref_idx_active_override_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_num_ref_idx_active_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn num_ref_idx_active_override_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_ref_idx_active_override_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mvd_l1_zero_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_mvd_l1_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mvd_l1_zero_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mvd_l1_zero_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cabac_init_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_init_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cabac_init_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cabac_init_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_deblocking_filter_disabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } + } + #[inline] + pub fn set_slice_deblocking_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_deblocking_filter_disabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_deblocking_filter_disabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn slice_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn slice_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_slice_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn collocated_from_l0_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_collocated_from_l0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn collocated_from_l0_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_collocated_from_l0_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + last_slice_of_pic_flag: u32, + dependent_slice_segment_flag: u32, + colour_plane_id: u32, + slice_temporal_mvp_enabled_flag: u32, + slice_sao_luma_flag: u32, + slice_sao_chroma_flag: u32, + num_ref_idx_active_override_flag: u32, + mvd_l1_zero_flag: u32, + cabac_init_flag: u32, + slice_deblocking_filter_disabled_flag: u32, + slice_loop_filter_across_slices_enabled_flag: u32, + collocated_from_l0_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let last_slice_of_pic_flag: u32 = unsafe { ::std::mem::transmute(last_slice_of_pic_flag) }; + last_slice_of_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let dependent_slice_segment_flag: u32 = unsafe { ::std::mem::transmute(dependent_slice_segment_flag) }; + dependent_slice_segment_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let colour_plane_id: u32 = unsafe { ::std::mem::transmute(colour_plane_id) }; + colour_plane_id as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let slice_temporal_mvp_enabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_temporal_mvp_enabled_flag) }; + slice_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let slice_sao_luma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_luma_flag) }; + slice_sao_luma_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let slice_sao_chroma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_chroma_flag) }; + slice_sao_chroma_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let num_ref_idx_active_override_flag: u32 = + unsafe { ::std::mem::transmute(num_ref_idx_active_override_flag) }; + num_ref_idx_active_override_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mvd_l1_zero_flag: u32 = unsafe { ::std::mem::transmute(mvd_l1_zero_flag) }; + mvd_l1_zero_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let cabac_init_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_flag) }; + cabac_init_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 2u8, { + let slice_deblocking_filter_disabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_deblocking_filter_disabled_flag) }; + slice_deblocking_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let slice_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::std::mem::transmute(slice_loop_filter_across_slices_enabled_flag) }; + slice_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let collocated_from_l0_flag: u32 = unsafe { ::std::mem::transmute(collocated_from_l0_flag) }; + collocated_from_l0_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSliceParameterBufferHEVC__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSliceParameterBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Slice parameter for HEVC encoding in main & main 10 profiles.\n\n This structure holds information for \\c\n slice_segment_layer_rbsp() as defined by the HEVC\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +pub type VAEncSliceParameterBufferHEVC = _VAEncSliceParameterBufferHEVC; +#[doc = " \\brief HEVC Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1 and scaling_list_data_present_flag = 1.\n Only when scaling_list_data_present_flag = 1, app still\n needs to send in this structure. When scaling_list_enabled_flag = 1 and\n scaling_list_data_present_flag = 0, driver is responsible to generate\n the default scaling list values.\n\n Matrix entries are in raster scan order which follows HEVC spec."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAQMatrixBufferHEVC { + #[doc = " \\brief scaling lists,\n corresponds to same HEVC spec syntax element\n ScalingList[ i ][ MatrixID ][ j ].\n\n \\brief 4x4 scaling,"] + pub scaling_lists_4x4: [[[u8; 16usize]; 2usize]; 3usize], + #[doc = " \\brief 8x8 scaling,"] + pub scaling_lists_8x8: [[[u8; 64usize]; 2usize]; 3usize], + #[doc = " \\brief 16x16 scaling,\n correspongs i = 2, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 63, inclusive."] + pub scaling_lists_16x16: [[[u8; 64usize]; 2usize]; 3usize], + #[doc = " \\brief 32x32 scaling,\n correspongs i = 3, MatrixID is in the range of 0 to 1,\n inclusive. And j is in the range of 0 to 63, inclusive."] + pub scaling_lists_32x32: [[u8; 64usize]; 2usize], + #[doc = " \\brief DC values of the 16x16 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 2 and matrixID in the range of 0 to 5, inclusive."] + pub scaling_list_dc_16x16: [[u8; 2usize]; 3usize], + #[doc = " \\brief DC values of the 32x32 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 3 and matrixID in the range of 0 to 1, inclusive."] + pub scaling_list_dc_32x32: [u8; 2usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAQMatrixBufferHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief HEVC Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1 and scaling_list_data_present_flag = 1.\n Only when scaling_list_data_present_flag = 1, app still\n needs to send in this structure. When scaling_list_enabled_flag = 1 and\n scaling_list_data_present_flag = 0, driver is responsible to generate\n the default scaling list values.\n\n Matrix entries are in raster scan order which follows HEVC spec."] +pub type VAQMatrixBufferHEVC = _VAQMatrixBufferHEVC; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAPictureStats { + pub picture_id: VASurfaceID, + pub flags: u32, +} +pub type VAPictureStats = _VAPictureStats; +#[doc = " \\brief Motion Vector and Statistics frame level controls.\n common part VAStatsStatisticsParameterBufferType for a MB or CTB"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAStatsStatisticsParameter { + #[doc = " \\brief Source surface ID."] + pub input: VAPictureStats, + #[doc = " \\brief Past reference surface ID pointer."] + pub past_references: *mut VAPictureStats, + #[doc = " \\brief Past reference surface number"] + pub num_past_references: u32, + #[doc = " \\brief Statistics output for past reference surface.\n Only enabling statistics output for past reference picture when *past_ref_stat_buf is a valid\n VABufferID, it is needed in case app wants statistics data of both reference and current pictures\n in very special use cases for better performance.\n The output layout is defined by VAStatsStatisticsBufferType(for progressive and top field of\n interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case), only\n pixel_average_16x16/pixel_average_8x8 and variance_16x16/variance_8x8 data are valid."] + pub past_ref_stat_buf: *mut VABufferID, + #[doc = " \\brief Future reference surface ID pointer."] + pub future_references: *mut VAPictureStats, + #[doc = " \\brief Future reference surface number"] + pub num_future_references: u32, + #[doc = " \\brief Statistics output for future reference surface.\n Only enabling statistics output for future reference picture when *past_ref_stat_buf is a valid\n VABufferID, it is needed in case app wants statistics data of both reference and current pictures\n in very special use cases for better performance.\n The output layout is defined by VAStatsStatisticsBufferType(for progressive and top field of\n interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case), only\n pixel_average_16x16/pixel_average_8x8 and variance_16x16/variance_8x8 data are valid."] + pub future_ref_stat_buf: *mut VABufferID, + #[doc = " \\brief ID of the output buffer.\n The number of outputs is determined by below DisableMVOutput and DisableStatisticsOutput.\n The output layout is defined by VAStatsMVBufferType, VAStatsStatisticsBufferType(for progressive and\n top field of interlaced case) and VAStatsStatisticsBottomFieldBufferType(only for interlaced case)."] + pub outputs: *mut VABufferID, + #[doc = " \\brief MV predictor. It is valid only when mv_predictor_ctrl is not 0.\n Each block has a pair of MVs, one for past and one for future reference\n as defined by VAMotionVector. The block is in raster scan order.\n Buffer size shall not be less than the number of blocks multiplied by sizeof(VAMotionVector)."] + pub mv_predictor: VABufferID, + #[doc = " \\brief QP input buffer. It is valid only when mb_qp is set to 1.\n The data in this buffer correspond to the input source.\n One QP per MB or CTB block in raster scan order, each QP is a signed char (8-bit) value."] + pub qp: VABufferID, +} +impl Default for _VAStatsStatisticsParameter { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Motion Vector and Statistics frame level controls.\n common part VAStatsStatisticsParameterBufferType for a MB or CTB"] +pub type VAStatsStatisticsParameter = _VAStatsStatisticsParameter; +#[doc = " \\brief FEI frame level control buffer for HEVC"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterFEIFrameControlHEVC { + pub function: u32, + #[doc = " \\brief CTB control input buffer. It is valid only when per_ctb_input\n is set to 1. The data in this buffer correspond to the input source. CTB is in raster scan order,\n each CTB control data structure is defined by VAEncFEICTBControlHEVC.\n Buffer size shall not be less than the number of CTBs multiplied by\n sizeof(VAEncFEICTBControlHEVC)."] + pub ctb_ctrl: VABufferID, + #[doc = " \\brief CTB cmd per CTB data output of ENC\n it is reserved for CTB level information\n it should include CU split information and other CTB datas .\n Each CTB block has one CTB cmd data."] + pub ctb_cmd: VABufferID, + #[doc = " \\brief CU record data output of ENC\n it is reserved for CU level information\n it should include CU detail data. include mode,MV, reference etc.\n Each CTB block has one CU record data."] + pub cu_record: VABufferID, + #[doc = " \\brief distortion output of ENC or ENC_PAK.\n Each CTB has one distortion data with VAEncFEIDistortionHevc\n Buffer size shall not be less than the number of CTBs multiplied by\n sizeof(VAEncFEIDistortionHevc)."] + pub distortion: VABufferID, + #[doc = " \\brief Qp input buffer. It is valid only when per_block_qp is set to 1.\n The data in this buffer correspond to the input source.\n One Qp per block block is in raster scan order, each Qp is a signed char (8-bit) value."] + pub qp: VABufferID, + #[doc = " \\brief MV predictor. It is valid only when mv_predictor_input is set to non-zero.\n Each CTB block has one or more pair of motion vectors and the corresponding\n reference indexes as defined by VAEncFEIMVPredictorHEVC. 32x32 block is in raster scan order.\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAEncFEIMVPredictorHEVC)."] + pub mv_predictor: VABufferID, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 20usize]>, + #[doc = " \\brief max frame size control with multi passes QP setting"] + pub max_frame_size: u32, + #[doc = " \\brief number of passes, every pass has different QP"] + pub num_passes: u32, + #[doc = " \\brief delta QP list for every pass"] + pub delta_qp: *mut u8, + pub reserved4: [u32; 2usize], +} +impl Default for _VAEncMiscParameterFEIFrameControlHEVC { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl _VAEncMiscParameterFEIFrameControlHEVC { + #[inline] + pub fn num_mv_predictors_l0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_num_mv_predictors_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn num_mv_predictors_l0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_mv_predictors_l0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn num_mv_predictors_l1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_num_mv_predictors_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn num_mv_predictors_l1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_mv_predictors_l1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn search_path(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + } + #[inline] + pub fn set_search_path(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn search_path_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_path_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn len_sp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } + } + #[inline] + pub fn set_len_sp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn len_sp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_len_sp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn multi_pred_l0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 4u8) as u32) } + } + #[inline] + pub fn set_multi_pred_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn multi_pred_l0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_pred_l0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn multi_pred_l1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(68usize, 4u8) as u32) } + } + #[inline] + pub fn set_multi_pred_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(68usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn multi_pred_l1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 68usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_pred_l1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 68usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_pel_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(72usize, 2u8) as u32) } + } + #[inline] + pub fn set_sub_pel_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(72usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_pel_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 72usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_pel_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 72usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn adaptive_search(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(74usize, 1u8) as u32) } + } + #[inline] + pub fn set_adaptive_search(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(74usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn adaptive_search_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 74usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_adaptive_search_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 74usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mv_predictor_input(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(75usize, 3u8) as u32) } + } + #[inline] + pub fn set_mv_predictor_input(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(75usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn mv_predictor_input_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 75usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mv_predictor_input_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 75usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn per_block_qp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(78usize, 1u8) as u32) } + } + #[inline] + pub fn set_per_block_qp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(78usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn per_block_qp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 78usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_per_block_qp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 78usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn per_ctb_input(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(79usize, 1u8) as u32) } + } + #[inline] + pub fn set_per_ctb_input(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(79usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn per_ctb_input_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 79usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_per_ctb_input_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 79usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn colocated_ctb_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 1u8) as u32) } + } + #[inline] + pub fn set_colocated_ctb_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn colocated_ctb_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_colocated_ctb_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_lcu_split(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(81usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_lcu_split(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(81usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_lcu_split_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 81usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_lcu_split_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 81usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_cu64_check(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(82usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_cu64_check(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(82usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_cu64_check_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 82usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_cu64_check_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 82usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_cu64_amp_check(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(83usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_cu64_amp_check(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(83usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_cu64_amp_check_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 83usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_cu64_amp_check_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 83usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cu64_skip_check_only(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(84usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu64_skip_check_only(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(84usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cu64_skip_check_only_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 84usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cu64_skip_check_only_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 84usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(85usize, 11u8) as u32) } + } + #[inline] + pub fn set_reserved1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(85usize, 11u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 85usize, + 11u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 85usize, + 11u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_width(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(96usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_width(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(96usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_width_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 96usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_width_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 96usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_height(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(104usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_height(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(104usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_height_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 104usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_height_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 104usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn search_window(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(112usize, 8u8) as u32) } + } + #[inline] + pub fn set_search_window(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(112usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn search_window_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 112usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_window_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 112usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn max_num_ime_search_center(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(120usize, 3u8) as u32) } + } + #[inline] + pub fn set_max_num_ime_search_center(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(120usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn max_num_ime_search_center_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 120usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_num_ime_search_center_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 120usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn fast_intra_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(123usize, 1u8) as u32) } + } + #[inline] + pub fn set_fast_intra_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(123usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn fast_intra_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 123usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_fast_intra_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 123usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(124usize, 4u8) as u32) } + } + #[inline] + pub fn set_reserved2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(124usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 124usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 124usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn num_concurrent_enc_frame_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(128usize, 8u8) as u32) } + } + #[inline] + pub fn set_num_concurrent_enc_frame_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(128usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn num_concurrent_enc_frame_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 128usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_concurrent_enc_frame_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 128usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(136usize, 24u8) as u32) } + } + #[inline] + pub fn set_reserved3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(136usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 20usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 136usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 20usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 136usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + num_mv_predictors_l0: u32, + num_mv_predictors_l1: u32, + search_path: u32, + len_sp: u32, + reserved0: u32, + multi_pred_l0: u32, + multi_pred_l1: u32, + sub_pel_mode: u32, + adaptive_search: u32, + mv_predictor_input: u32, + per_block_qp: u32, + per_ctb_input: u32, + colocated_ctb_distortion: u32, + force_lcu_split: u32, + enable_cu64_check: u32, + enable_cu64_amp_check: u32, + cu64_skip_check_only: u32, + reserved1: u32, + ref_width: u32, + ref_height: u32, + search_window: u32, + max_num_ime_search_center: u32, + fast_intra_mode: u32, + reserved2: u32, + num_concurrent_enc_frame_partition: u32, + reserved3: u32, + ) -> __BindgenBitfieldUnit<[u8; 20usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 20usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let num_mv_predictors_l0: u32 = unsafe { ::std::mem::transmute(num_mv_predictors_l0) }; + num_mv_predictors_l0 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let num_mv_predictors_l1: u32 = unsafe { ::std::mem::transmute(num_mv_predictors_l1) }; + num_mv_predictors_l1 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 8u8, { + let search_path: u32 = unsafe { ::std::mem::transmute(search_path) }; + search_path as u64 + }); + __bindgen_bitfield_unit.set(40usize, 8u8, { + let len_sp: u32 = unsafe { ::std::mem::transmute(len_sp) }; + len_sp as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 4u8, { + let multi_pred_l0: u32 = unsafe { ::std::mem::transmute(multi_pred_l0) }; + multi_pred_l0 as u64 + }); + __bindgen_bitfield_unit.set(68usize, 4u8, { + let multi_pred_l1: u32 = unsafe { ::std::mem::transmute(multi_pred_l1) }; + multi_pred_l1 as u64 + }); + __bindgen_bitfield_unit.set(72usize, 2u8, { + let sub_pel_mode: u32 = unsafe { ::std::mem::transmute(sub_pel_mode) }; + sub_pel_mode as u64 + }); + __bindgen_bitfield_unit.set(74usize, 1u8, { + let adaptive_search: u32 = unsafe { ::std::mem::transmute(adaptive_search) }; + adaptive_search as u64 + }); + __bindgen_bitfield_unit.set(75usize, 3u8, { + let mv_predictor_input: u32 = unsafe { ::std::mem::transmute(mv_predictor_input) }; + mv_predictor_input as u64 + }); + __bindgen_bitfield_unit.set(78usize, 1u8, { + let per_block_qp: u32 = unsafe { ::std::mem::transmute(per_block_qp) }; + per_block_qp as u64 + }); + __bindgen_bitfield_unit.set(79usize, 1u8, { + let per_ctb_input: u32 = unsafe { ::std::mem::transmute(per_ctb_input) }; + per_ctb_input as u64 + }); + __bindgen_bitfield_unit.set(80usize, 1u8, { + let colocated_ctb_distortion: u32 = unsafe { ::std::mem::transmute(colocated_ctb_distortion) }; + colocated_ctb_distortion as u64 + }); + __bindgen_bitfield_unit.set(81usize, 1u8, { + let force_lcu_split: u32 = unsafe { ::std::mem::transmute(force_lcu_split) }; + force_lcu_split as u64 + }); + __bindgen_bitfield_unit.set(82usize, 1u8, { + let enable_cu64_check: u32 = unsafe { ::std::mem::transmute(enable_cu64_check) }; + enable_cu64_check as u64 + }); + __bindgen_bitfield_unit.set(83usize, 1u8, { + let enable_cu64_amp_check: u32 = unsafe { ::std::mem::transmute(enable_cu64_amp_check) }; + enable_cu64_amp_check as u64 + }); + __bindgen_bitfield_unit.set(84usize, 1u8, { + let cu64_skip_check_only: u32 = unsafe { ::std::mem::transmute(cu64_skip_check_only) }; + cu64_skip_check_only as u64 + }); + __bindgen_bitfield_unit.set(85usize, 11u8, { + let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(96usize, 8u8, { + let ref_width: u32 = unsafe { ::std::mem::transmute(ref_width) }; + ref_width as u64 + }); + __bindgen_bitfield_unit.set(104usize, 8u8, { + let ref_height: u32 = unsafe { ::std::mem::transmute(ref_height) }; + ref_height as u64 + }); + __bindgen_bitfield_unit.set(112usize, 8u8, { + let search_window: u32 = unsafe { ::std::mem::transmute(search_window) }; + search_window as u64 + }); + __bindgen_bitfield_unit.set(120usize, 3u8, { + let max_num_ime_search_center: u32 = unsafe { ::std::mem::transmute(max_num_ime_search_center) }; + max_num_ime_search_center as u64 + }); + __bindgen_bitfield_unit.set(123usize, 1u8, { + let fast_intra_mode: u32 = unsafe { ::std::mem::transmute(fast_intra_mode) }; + fast_intra_mode as u64 + }); + __bindgen_bitfield_unit.set(124usize, 4u8, { + let reserved2: u32 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit.set(128usize, 8u8, { + let num_concurrent_enc_frame_partition: u32 = + unsafe { ::std::mem::transmute(num_concurrent_enc_frame_partition) }; + num_concurrent_enc_frame_partition as u64 + }); + __bindgen_bitfield_unit.set(136usize, 24u8, { + let reserved3: u32 = unsafe { ::std::mem::transmute(reserved3) }; + reserved3 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief FEI frame level control buffer for HEVC"] +pub type VAEncMiscParameterFEIFrameControlHEVC = _VAEncMiscParameterFEIFrameControlHEVC; +#[doc = " \\brief Application can use this definition as reference to allocate the buffer\n based on MaxNumPredictor returned from attribute VAConfigAttribFEIMVPredictors query.\n this buffer allocation is always based on 16x16 block even block size is indicated as 32x32 or 64x64, and buffer\n layout is always in 32x32 block raster scan order even block size is 16x16 or 64x64. If 32x32 block size is set,\n only the data in the first 16x16 block (block 0) is used for 32x32 block. If 64x64 block size is set\n MV layout is still in 32x32 raster scan order, the same as 32x32 and the first 16x16\n block within each 32x32 block needs to have intended MV data (four 32x32 blocks will have the same MV data in the\n correspondent first 16x16 block). Data structure for each 16x16 block is defined as below (same as AVC except\n BlockSize/Reserved bits)."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMVPredictorHEVC { + pub ref_idx: [_VAEncFEIMVPredictorHEVC__bindgen_ty_1; 4usize], + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub mv: [VAMotionVector; 4usize], +} +#[doc = " \\brief Feference index corresponding to the entry of RefPicList0 & RefPicList1 in slice header (final reference\n list). Note that RefPicList0 & RefPicList1 needs to be the same for all slices.\n Ref0xIndex – RefPicList0; Ref1xIndex – RefPicList1; x – 0 ~ MaxNumPredictor"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMVPredictorHEVC__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncFEIMVPredictorHEVC__bindgen_ty_1 { + #[inline] + pub fn ref_idx_l0(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_ref_idx_l0(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_ref_idx_l1(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(ref_idx_l0: u8, ref_idx_l1: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let ref_idx_l0: u8 = unsafe { ::std::mem::transmute(ref_idx_l0) }; + ref_idx_l0 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let ref_idx_l1: u8 = unsafe { ::std::mem::transmute(ref_idx_l1) }; + ref_idx_l1 as u64 + }); + __bindgen_bitfield_unit + } +} +impl _VAEncFEIMVPredictorHEVC { + #[inline] + pub fn block_size(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_block_size(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn block_size_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_block_size_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 30u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 30u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(block_size: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let block_size: u32 = unsafe { ::std::mem::transmute(block_size) }; + block_size as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief Application can use this definition as reference to allocate the buffer\n based on MaxNumPredictor returned from attribute VAConfigAttribFEIMVPredictors query.\n this buffer allocation is always based on 16x16 block even block size is indicated as 32x32 or 64x64, and buffer\n layout is always in 32x32 block raster scan order even block size is 16x16 or 64x64. If 32x32 block size is set,\n only the data in the first 16x16 block (block 0) is used for 32x32 block. If 64x64 block size is set\n MV layout is still in 32x32 raster scan order, the same as 32x32 and the first 16x16\n block within each 32x32 block needs to have intended MV data (four 32x32 blocks will have the same MV data in the\n correspondent first 16x16 block). Data structure for each 16x16 block is defined as below (same as AVC except\n BlockSize/Reserved bits)."] +pub type VAEncFEIMVPredictorHEVC = _VAEncFEIMVPredictorHEVC; +#[doc = " \\brief FEI CTB level control data structure"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEICTBControlHEVC { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub reserved1: u32, + pub reserved2: u32, + pub reserved3: u32, +} +impl _VAEncFEICTBControlHEVC { + #[inline] + pub fn force_to_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_to_inter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_inter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_inter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_inter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_to_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_to_zero_coeff(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_zero_coeff(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_zero_coeff_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_zero_coeff_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 28u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 28u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 28u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + force_to_intra: u32, + force_to_inter: u32, + force_to_skip: u32, + force_to_zero_coeff: u32, + reserved0: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let force_to_intra: u32 = unsafe { ::std::mem::transmute(force_to_intra) }; + force_to_intra as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let force_to_inter: u32 = unsafe { ::std::mem::transmute(force_to_inter) }; + force_to_inter as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let force_to_skip: u32 = unsafe { ::std::mem::transmute(force_to_skip) }; + force_to_skip as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let force_to_zero_coeff: u32 = unsafe { ::std::mem::transmute(force_to_zero_coeff) }; + force_to_zero_coeff as u64 + }); + __bindgen_bitfield_unit.set(4usize, 28u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief FEI CTB level control data structure"] +pub type VAEncFEICTBControlHEVC = _VAEncFEICTBControlHEVC; +pub mod VAEncPackedHeaderTypeH264 { + #[doc = " \\brief Packed header types specific to H.264 encoding.\n\n Types of packed headers generally used for H.264 encoding. Each\n associated packed header data buffer shall contain the start code\n prefix 0x000001 followed by the complete NAL unit, thus also\n including the \\c nal_unit_type.\n\n Note: the start code prefix can contain an arbitrary number of leading\n zeros. The driver will skip them for emulation prevention bytes insertion,\n if necessary."] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Packed Sequence Parameter Set (SPS).\n\n The corresponding packed header data buffer shall contain the\n complete seq_parameter_set_rbsp() syntax element.\n\n Note: packed \\c nal_unit_type shall be equal to 7."] + pub const VAEncPackedHeaderH264_SPS: Type = 1; + #[doc = " \\brief Packed Picture Parameter Set (PPS).\n\n The corresponding packed header data buffer shall contain the\n complete pic_parameter_set_rbsp() syntax element.\n\n Note: packed \\c nal_unit_type shall be equal to 8."] + pub const VAEncPackedHeaderH264_PPS: Type = 2; + #[doc = " \\brief Packed slice header.\n\n The corresponding packed header data buffer shall contain the\n \\c slice_header() syntax element only, along with any start\n code prefix and NAL unit type preceeding it. i.e. this means\n that the buffer does not contain any of the \\c slice_data() or\n the \\c rbsp_slice_trailing_bits().\n\n Note: packed \\c nal_unit_type shall be equal to 1 (non-IDR\n picture), or 5 (IDR picture)."] + pub const VAEncPackedHeaderH264_Slice: Type = 3; + #[doc = " \\brief Packed Supplemental Enhancement Information (SEI).\n\n The corresponding packed header data buffer shall contain the\n complete sei_rbsp() syntax element, thus including several\n sei_message() elements if necessary.\n\n Note: packed \\c nal_unit_type shall be equal to 6.\n\n @deprecated\n This is a deprecated packed header flag, All applications can use\n \\c VA_ENC_PACKED_HEADER_RAW_DATA to pass the corresponding packed\n SEI header data buffer to the driver"] + pub const VAEncPackedHeaderH264_SEI: Type = 2147483649; +} +#[doc = " \\brief Sequence parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the H.264 specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSequenceParameterBufferH264 { + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub seq_parameter_set_id: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub level_idc: u8, + #[doc = " \\brief Period between I frames."] + pub intra_period: u32, + #[doc = " \\brief Period between IDR frames."] + pub intra_idr_period: u32, + #[doc = " \\brief Period between I/P frames."] + pub ip_period: u32, + #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."] + pub bits_per_second: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub max_num_ref_frames: u32, + #[doc = " \\brief Picture width in macroblocks."] + pub picture_width_in_mbs: u16, + #[doc = " \\brief Picture height in macroblocks."] + pub picture_height_in_mbs: u16, + pub seq_fields: _VAEncSequenceParameterBufferH264__bindgen_ty_1, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub bit_depth_luma_minus8: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub bit_depth_chroma_minus8: u8, + #[doc = " if pic_order_cnt_type == 1 */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."] + pub num_ref_frames_in_pic_order_cnt_cycle: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub offset_for_non_ref_pic: i32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub offset_for_top_to_bottom_field: i32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub offset_for_ref_frame: [i32; 256usize], + #[doc = " @name Cropping (optional) */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."] + pub frame_cropping_flag: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub frame_crop_left_offset: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub frame_crop_right_offset: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub frame_crop_top_offset: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub frame_crop_bottom_offset: u32, + #[doc = " @name VUI parameters (optional) */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."] + pub vui_parameters_present_flag: u8, + pub vui_fields: _VAEncSequenceParameterBufferH264__bindgen_ty_2, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub aspect_ratio_idc: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub sar_width: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub sar_height: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub num_units_in_tick: u32, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub time_scale: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferH264__bindgen_ty_1 { + pub bits: _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn chroma_format_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_format_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_mbs_only_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_mbs_only_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_mbs_only_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_mbs_only_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_adaptive_frame_field_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_adaptive_frame_field_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_adaptive_frame_field_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn seq_scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_seq_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn seq_scaling_matrix_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_seq_scaling_matrix_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn direct_8x8_inference_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_direct_8x8_inference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn direct_8x8_inference_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_direct_8x8_inference_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_frame_num_minus4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 4u8) as u32) } + } + #[inline] + pub fn set_log2_max_frame_num_minus4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_frame_num_minus4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_frame_num_minus4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn pic_order_cnt_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } + } + #[inline] + pub fn set_pic_order_cnt_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn pic_order_cnt_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pic_order_cnt_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_pic_order_cnt_lsb_minus4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u32) } + } + #[inline] + pub fn set_log2_max_pic_order_cnt_lsb_minus4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_pic_order_cnt_lsb_minus4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_pic_order_cnt_lsb_minus4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_pic_order_always_zero_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_pic_order_always_zero_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_pic_order_always_zero_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + chroma_format_idc: u32, + frame_mbs_only_flag: u32, + mb_adaptive_frame_field_flag: u32, + seq_scaling_matrix_present_flag: u32, + direct_8x8_inference_flag: u32, + log2_max_frame_num_minus4: u32, + pic_order_cnt_type: u32, + log2_max_pic_order_cnt_lsb_minus4: u32, + delta_pic_order_always_zero_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) }; + chroma_format_idc as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let frame_mbs_only_flag: u32 = unsafe { ::std::mem::transmute(frame_mbs_only_flag) }; + frame_mbs_only_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let mb_adaptive_frame_field_flag: u32 = unsafe { ::std::mem::transmute(mb_adaptive_frame_field_flag) }; + mb_adaptive_frame_field_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let seq_scaling_matrix_present_flag: u32 = + unsafe { ::std::mem::transmute(seq_scaling_matrix_present_flag) }; + seq_scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let direct_8x8_inference_flag: u32 = unsafe { ::std::mem::transmute(direct_8x8_inference_flag) }; + direct_8x8_inference_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 4u8, { + let log2_max_frame_num_minus4: u32 = unsafe { ::std::mem::transmute(log2_max_frame_num_minus4) }; + log2_max_frame_num_minus4 as u64 + }); + __bindgen_bitfield_unit.set(10usize, 2u8, { + let pic_order_cnt_type: u32 = unsafe { ::std::mem::transmute(pic_order_cnt_type) }; + pic_order_cnt_type as u64 + }); + __bindgen_bitfield_unit.set(12usize, 4u8, { + let log2_max_pic_order_cnt_lsb_minus4: u32 = + unsafe { ::std::mem::transmute(log2_max_pic_order_cnt_lsb_minus4) }; + log2_max_pic_order_cnt_lsb_minus4 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let delta_pic_order_always_zero_flag: u32 = + unsafe { ::std::mem::transmute(delta_pic_order_always_zero_flag) }; + delta_pic_order_always_zero_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferH264__bindgen_ty_2 { + pub bits: _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aspect_ratio_info_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_aspect_ratio_info_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn timing_info_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn timing_info_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_timing_info_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bitstream_restriction_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_bitstream_restriction_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_mv_length_horizontal(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) } + } + #[inline] + pub fn set_log2_max_mv_length_horizontal(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_mv_length_horizontal_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_mv_length_horizontal_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn log2_max_mv_length_vertical(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) } + } + #[inline] + pub fn set_log2_max_mv_length_vertical(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn log2_max_mv_length_vertical_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_log2_max_mv_length_vertical_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn fixed_frame_rate_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_fixed_frame_rate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn fixed_frame_rate_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_fixed_frame_rate_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn low_delay_hrd_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_low_delay_hrd_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn low_delay_hrd_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_low_delay_hrd_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn motion_vectors_over_pic_boundaries_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_motion_vectors_over_pic_boundaries_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + timing_info_present_flag: u32, + bitstream_restriction_flag: u32, + log2_max_mv_length_horizontal: u32, + log2_max_mv_length_vertical: u32, + fixed_frame_rate_flag: u32, + low_delay_hrd_flag: u32, + motion_vectors_over_pic_boundaries_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let aspect_ratio_info_present_flag: u32 = unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let timing_info_present_flag: u32 = unsafe { ::std::mem::transmute(timing_info_present_flag) }; + timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let bitstream_restriction_flag: u32 = unsafe { ::std::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 5u8, { + let log2_max_mv_length_horizontal: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_horizontal) }; + log2_max_mv_length_horizontal as u64 + }); + __bindgen_bitfield_unit.set(8usize, 5u8, { + let log2_max_mv_length_vertical: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_vertical) }; + log2_max_mv_length_vertical as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let fixed_frame_rate_flag: u32 = unsafe { ::std::mem::transmute(fixed_frame_rate_flag) }; + fixed_frame_rate_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let low_delay_hrd_flag: u32 = unsafe { ::std::mem::transmute(low_delay_hrd_flag) }; + low_delay_hrd_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let motion_vectors_over_pic_boundaries_flag: u32 = + unsafe { ::std::mem::transmute(motion_vectors_over_pic_boundaries_flag) }; + motion_vectors_over_pic_boundaries_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferH264__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSequenceParameterBufferH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Sequence parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the H.264 specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."] +pub type VAEncSequenceParameterBufferH264 = _VAEncSequenceParameterBufferH264; +#[doc = " \\brief Picture parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the H.264 specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferH264 { + #[doc = " \\brief Information about the picture to be encoded.\n\n See #VAPictureH264 for further description of each field.\n Note that CurrPic.picture_id represents the reconstructed\n (decoded) picture. User provides a scratch VA surface ID here."] + pub CurrPic: VAPictureH264, + #[doc = " \\brief Decoded Picture Buffer (DPB).\n\n This array represents the list of reconstructed (decoded)\n frames used as reference. It is important to keep track of\n reconstructed frames so that they can be used later on as\n reference for P or B-frames encoding."] + pub ReferenceFrames: [VAPictureH264; 16usize], + #[doc = " \\brief Output encoded bitstream.\n\n \\ref coded_buf has type #VAEncCodedBufferType. It should be\n large enough to hold the compressed NAL slice and possibly SPS\n and PPS NAL units."] + pub coded_buf: VABufferID, + #[doc = " \\brief The picture parameter set referred to in the slice header."] + pub pic_parameter_set_id: u8, + #[doc = " \\brief The active sequence parameter set. Range: 0 to 31, inclusive."] + pub seq_parameter_set_id: u8, + #[doc = " \\brief OR'd flags describing whether the picture is the last one or not.\n\n This fields holds 0 if the picture to be encoded is not the last\n one in the stream or sequence. Otherwise, it is a combination of\n \\ref H264_LAST_PICTURE_EOSEQ or \\ref H264_LAST_PICTURE_EOSTREAM."] + pub last_picture: u8, + #[doc = " \\brief The picture identifier.\n Range: 0 to \\f$2^{log2\\_max\\_frame\\_num\\_minus4 + 4} - 1\\f$, inclusive."] + pub frame_num: u16, + #[doc = " \\brief \\c pic_init_qp_minus26 + 26."] + pub pic_init_qp: u8, + #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 31, inclusive."] + pub num_ref_idx_l0_active_minus1: u8, + #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 31, inclusive."] + pub num_ref_idx_l1_active_minus1: u8, + #[doc = " \\brief Range: -12 to 12, inclusive."] + pub chroma_qp_index_offset: i8, + #[doc = " \\brief Range: -12 to 12, inclusive."] + pub second_chroma_qp_index_offset: i8, + pub pic_fields: _VAEncPictureParameterBufferH264__bindgen_ty_1, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferH264__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn idr_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_idr_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn idr_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_idr_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reference_pic_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } + } + #[inline] + pub fn set_reference_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn entropy_coding_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn entropy_coding_mode_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_entropy_coding_mode_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn weighted_bipred_idc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_idc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn weighted_bipred_idc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_weighted_bipred_idc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transform_8x8_mode_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_8x8_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform_8x8_mode_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform_8x8_mode_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn deblocking_filter_control_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_deblocking_filter_control_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn redundant_pic_cnt_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn redundant_pic_cnt_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_redundant_pic_cnt_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pic_order_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_order_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pic_order_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pic_order_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pic_scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pic_scaling_matrix_present_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pic_scaling_matrix_present_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + idr_pic_flag: u32, + reference_pic_flag: u32, + entropy_coding_mode_flag: u32, + weighted_pred_flag: u32, + weighted_bipred_idc: u32, + constrained_intra_pred_flag: u32, + transform_8x8_mode_flag: u32, + deblocking_filter_control_present_flag: u32, + redundant_pic_cnt_present_flag: u32, + pic_order_present_flag: u32, + pic_scaling_matrix_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let idr_pic_flag: u32 = unsafe { ::std::mem::transmute(idr_pic_flag) }; + idr_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) }; + reference_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let entropy_coding_mode_flag: u32 = unsafe { ::std::mem::transmute(entropy_coding_mode_flag) }; + entropy_coding_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 2u8, { + let weighted_bipred_idc: u32 = unsafe { ::std::mem::transmute(weighted_bipred_idc) }; + weighted_bipred_idc as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let transform_8x8_mode_flag: u32 = unsafe { ::std::mem::transmute(transform_8x8_mode_flag) }; + transform_8x8_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let redundant_pic_cnt_present_flag: u32 = unsafe { ::std::mem::transmute(redundant_pic_cnt_present_flag) }; + redundant_pic_cnt_present_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let pic_order_present_flag: u32 = unsafe { ::std::mem::transmute(pic_order_present_flag) }; + pic_order_present_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let pic_scaling_matrix_present_flag: u32 = + unsafe { ::std::mem::transmute(pic_scaling_matrix_present_flag) }; + pic_scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Picture parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the H.264 specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."] +pub type VAEncPictureParameterBufferH264 = _VAEncPictureParameterBufferH264; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncQPBufferH264 { + pub qp: u8, +} +pub type VAEncQPBufferH264 = _VAEncQPBufferH264; +#[doc = " \\brief Slice parameter for H.264 encoding in baseline, main & high profiles.\n\n This structure holds information for \\c\n slice_layer_without_partitioning_rbsp() as defined by the H.264\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If per-macroblock encoder configuration is needed, \\c macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264. This\n buffer is not passed to vaRenderPicture() and it can be re-used\n without re-allocating the whole buffer."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSliceParameterBufferH264 { + #[doc = " \\brief Starting MB address for this slice."] + pub macroblock_address: u32, + #[doc = " \\brief Number of macroblocks in this slice."] + pub num_macroblocks: u32, + #[doc = " \\brief Per-MB encoder configuration buffer, or \\c VA_INVALID_ID.\n\n If per-MB encoder configuration is needed, then \\ref macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264\n (\\c VAEncMacroblockParameterBufferType). Otherwise, buffer id\n is set to \\c VA_INVALID_ID and per-MB configuration is derived\n from this slice parameter.\n\n The \\c macroblock_info buffer must hold \\ref num_macroblocks\n elements."] + pub macroblock_info: VABufferID, + #[doc = " \\brief Slice type.\n Range: 0..2, 5..7, i.e. no switching slices."] + pub slice_type: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub pic_parameter_set_id: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub idr_pic_id: u16, + #[doc = " @name If pic_order_cnt_type == 0 */\n/**@{*/\n/** \\brief The picture order count modulo MaxPicOrderCntLsb."] + pub pic_order_cnt_lsb: u16, + #[doc = " \\brief Valid if \\c pic_order_present_flag and this is a bottom field."] + pub delta_pic_order_cnt_bottom: i32, + #[doc = "@}*/\n/** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag */\n/**@{*/\n/** \\brief [0]: top, [1]: bottom."] + pub delta_pic_order_cnt: [i32; 2usize], + #[doc = " @name If slice_type == B */\n/**@{"] + pub direct_spatial_mv_pred_flag: u8, + #[doc = " @name If slice_type == P */\n/**@{*/\n/** \\brief Specifies if\n \\ref _VAEncPictureParameterBufferH264::num_ref_idx_l0_active_minus1 or\n \\ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are\n overriden by the values for this slice."] + pub num_ref_idx_active_override_flag: u8, + #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 31, inclusive."] + pub num_ref_idx_l0_active_minus1: u8, + #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 31, inclusive."] + pub num_ref_idx_l1_active_minus1: u8, + #[doc = " \\brief Reference picture list 0 (for P slices)."] + pub RefPicList0: [VAPictureH264; 32usize], + #[doc = " \\brief Reference picture list 1 (for B slices)."] + pub RefPicList1: [VAPictureH264; 32usize], + #[doc = " @name pred_weight_table() */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."] + pub luma_log2_weight_denom: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_log2_weight_denom: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_weight_l0_flag: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_weight_l0: [::std::os::raw::c_short; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_offset_l0: [::std::os::raw::c_short; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_weight_l0_flag: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_weight_l0: [[::std::os::raw::c_short; 2usize]; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_offset_l0: [[::std::os::raw::c_short; 2usize]; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_weight_l1_flag: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_weight_l1: [::std::os::raw::c_short; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub luma_offset_l1: [::std::os::raw::c_short; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_weight_l1_flag: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_weight_l1: [[::std::os::raw::c_short; 2usize]; 32usize], + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub chroma_offset_l1: [[::std::os::raw::c_short; 2usize]; 32usize], + #[doc = " \\brief Range: 0 to 2, inclusive."] + pub cabac_init_idc: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub slice_qp_delta: i8, + #[doc = " @name If deblocking_filter_control_present_flag */\n/**@{*/\n/** \\brief Range: 0 to 2, inclusive."] + pub disable_deblocking_filter_idc: u8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub slice_alpha_c0_offset_div2: i8, + #[doc = " \\brief Same as the H.264 bitstream syntax element."] + pub slice_beta_offset_div2: i8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Slice parameter for H.264 encoding in baseline, main & high profiles.\n\n This structure holds information for \\c\n slice_layer_without_partitioning_rbsp() as defined by the H.264\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If per-macroblock encoder configuration is needed, \\c macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264. This\n buffer is not passed to vaRenderPicture() and it can be re-used\n without re-allocating the whole buffer."] +pub type VAEncSliceParameterBufferH264 = _VAEncSliceParameterBufferH264; +#[doc = " \\brief Macroblock parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds per-macroblock information. The buffer must be\n allocated with as many elements (macroblocks) as necessary to fit\n the slice to be encoded. Besides, the per-macroblock records must\n be written in a strict raster order and with no gap. i.e. every\n macroblock, regardless of its type, shall have an entry."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMacroblockParameterBufferH264 { + #[doc = " \\brief Quantization parameter.\n\n Requested quantization parameter. Range: 0 to 51, inclusive.\n If \\ref qp is set to 0xff, then the actual value is derived\n from the slice-level value: \\c pic_init_qp + \\c slice_qp_delta."] + pub qp: u8, + pub info: _VAEncMacroblockParameterBufferH264__bindgen_ty_1, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1 { + pub intra_fields: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1, + pub inter_fields: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2, +} +#[doc = " @name Data for intra macroblock */\n/**@{"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + pub bits: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn pred_avail_override_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_pred_avail_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pred_avail_override_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pred_avail_override_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pred_avail_flags(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 8u8) as u32) } + } + #[inline] + pub fn set_pred_avail_flags(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn pred_avail_flags_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pred_avail_flags_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(pred_avail_override_flag: u32, pred_avail_flags: u32) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let pred_avail_override_flag: u32 = unsafe { ::std::mem::transmute(pred_avail_override_flag) }; + pred_avail_override_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 8u8, { + let pred_avail_flags: u32 = unsafe { ::std::mem::transmute(pred_avail_flags) }; + pred_avail_flags as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " @name Data for inter macroblock */\n/**@{"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2 { + pub bits: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { + pub reserved: u32, +} +impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMacroblockParameterBufferH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Macroblock parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds per-macroblock information. The buffer must be\n allocated with as many elements (macroblocks) as necessary to fit\n the slice to be encoded. Besides, the per-macroblock records must\n be written in a strict raster order and with no gap. i.e. every\n macroblock, regardless of its type, shall have an entry."] +pub type VAEncMacroblockParameterBufferH264 = _VAEncMacroblockParameterBufferH264; +#[doc = " \\brief MB partition modes and 1/2 1/4 motion search configuration\n\n Specifies MB partition modes that are disabled. Specifies Half-pel\n mode and Quarter-pel mode searching"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterSubMbPartPelH264 { + pub disable_inter_sub_mb_partition: u32, + pub inter_sub_mb_partition_mask: _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1, + #[doc = " \\brief Precison of motion search\n 0:Integer mode searching\n 1:Half-pel mode searching\n 2:Reserved\n 3:Quarter-pel mode searching"] + pub enable_sub_pel_mode: u32, + pub sub_pel_mode: u8, + pub reserved: [u8; 3usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1 { + pub bits: _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn disable_16x16_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_16x16_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_16x16_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_16x16_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_16x8_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_16x8_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_16x8_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_16x8_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_8x16_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_8x16_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_8x16_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_8x16_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_8x8_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_8x8_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_8x8_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_8x8_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_8x4_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_8x4_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_8x4_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_8x4_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_4x8_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_4x8_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_4x8_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_4x8_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_4x4_inter_mb_partition(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_4x4_inter_mb_partition(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_4x4_inter_mb_partition_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_4x4_inter_mb_partition_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + disable_16x16_inter_mb_partition: u32, + disable_16x8_inter_mb_partition: u32, + disable_8x16_inter_mb_partition: u32, + disable_8x8_inter_mb_partition: u32, + disable_8x4_inter_mb_partition: u32, + disable_4x8_inter_mb_partition: u32, + disable_4x4_inter_mb_partition: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disable_16x16_inter_mb_partition: u32 = + unsafe { ::std::mem::transmute(disable_16x16_inter_mb_partition) }; + disable_16x16_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let disable_16x8_inter_mb_partition: u32 = + unsafe { ::std::mem::transmute(disable_16x8_inter_mb_partition) }; + disable_16x8_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let disable_8x16_inter_mb_partition: u32 = + unsafe { ::std::mem::transmute(disable_8x16_inter_mb_partition) }; + disable_8x16_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let disable_8x8_inter_mb_partition: u32 = unsafe { ::std::mem::transmute(disable_8x8_inter_mb_partition) }; + disable_8x8_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let disable_8x4_inter_mb_partition: u32 = unsafe { ::std::mem::transmute(disable_8x4_inter_mb_partition) }; + disable_8x4_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let disable_4x8_inter_mb_partition: u32 = unsafe { ::std::mem::transmute(disable_4x8_inter_mb_partition) }; + disable_4x8_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let disable_4x4_inter_mb_partition: u32 = unsafe { ::std::mem::transmute(disable_4x4_inter_mb_partition) }; + disable_4x4_inter_mb_partition as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncMiscParameterSubMbPartPelH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncMiscParameterSubMbPartPelH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief MB partition modes and 1/2 1/4 motion search configuration\n\n Specifies MB partition modes that are disabled. Specifies Half-pel\n mode and Quarter-pel mode searching"] +pub type VAEncMiscParameterSubMbPartPelH264 = _VAEncMiscParameterSubMbPartPelH264; +#[doc = " \\brief JPEG Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferJPEG { + #[doc = " \\brief holds reconstructed picture."] + pub reconstructed_picture: VASurfaceID, + #[doc = " \\brief picture width."] + pub picture_width: u16, + #[doc = " \\brief picture height."] + pub picture_height: u16, + #[doc = " \\brief holds coded data."] + pub coded_buf: VABufferID, + pub pic_flags: _VAEncPictureParameterBufferJPEG__bindgen_ty_1, + #[doc = " \\brief number of bits per sample."] + pub sample_bit_depth: u8, + #[doc = " \\brief total number of scans in image."] + pub num_scan: u8, + #[doc = " \\brief number of image components in frame."] + pub num_components: u16, + #[doc = " \\brief Component identifier (Ci)."] + pub component_id: [u8; 4usize], + #[doc = " \\brief Quantization table selector (Tqi)."] + pub quantiser_table_selector: [u8; 4usize], + #[doc = " \\brief number from 1 to 100 that specifies quality of image."] + pub quality: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief pic_flags\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferJPEG__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferJPEG__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferJPEG__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl _VAEncPictureParameterBufferJPEG__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn profile(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_profile(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn profile_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_profile_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn progressive(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_progressive(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn progressive_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_progressive_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn huffman(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_huffman(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn huffman_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_huffman_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn interleaved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_interleaved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn interleaved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_interleaved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn differential(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_differential(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn differential_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_differential_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + profile: u32, + progressive: u32, + huffman: u32, + interleaved: u32, + differential: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let profile: u32 = unsafe { ::std::mem::transmute(profile) }; + profile as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let progressive: u32 = unsafe { ::std::mem::transmute(progressive) }; + progressive as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let huffman: u32 = unsafe { ::std::mem::transmute(huffman) }; + huffman as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let interleaved: u32 = unsafe { ::std::mem::transmute(interleaved) }; + interleaved as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let differential: u32 = unsafe { ::std::mem::transmute(differential) }; + differential as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferJPEG__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferJPEG { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief JPEG Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +pub type VAEncPictureParameterBufferJPEG = _VAEncPictureParameterBufferJPEG; +#[doc = " \\brief Slice parameter for JPEG encoding.\n\n This structure conveys slice (scan) level parameters.\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSliceParameterBufferJPEG { + #[doc = " \\brief Restart interval definition (Ri)."] + pub restart_interval: u16, + #[doc = " \\brief number of image components in a scan."] + pub num_components: u16, + pub components: [_VAEncSliceParameterBufferJPEG__bindgen_ty_1; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSliceParameterBufferJPEG__bindgen_ty_1 { + #[doc = " \\brief Scan component selector (Csj)."] + pub component_selector: u8, + #[doc = " \\brief DC entropy coding table selector (Tdj)."] + pub dc_table_selector: u8, + #[doc = " \\brief AC entropy coding table selector (Taj)."] + pub ac_table_selector: u8, +} +#[doc = " \\brief Slice parameter for JPEG encoding.\n\n This structure conveys slice (scan) level parameters.\n"] +pub type VAEncSliceParameterBufferJPEG = _VAEncSliceParameterBufferJPEG; +#[doc = " \\brief Quantization table for JPEG encoding.\n"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAQMatrixBufferJPEG { + #[doc = " \\brief load luma quantization table."] + pub load_lum_quantiser_matrix: i32, + #[doc = " \\brief load chroma quantization table."] + pub load_chroma_quantiser_matrix: i32, + #[doc = " \\brief luma quantization table."] + pub lum_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief chroma quantization table."] + pub chroma_quantiser_matrix: [u8; 64usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAQMatrixBufferJPEG { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Quantization table for JPEG encoding.\n"] +pub type VAQMatrixBufferJPEG = _VAQMatrixBufferJPEG; +#[doc = " \\brief MPEG-2 Quantization Matrix Buffer\n"] +pub type VAQMatrixBufferMPEG2 = VAIQMatrixBufferMPEG2; +pub mod VAEncPackedHeaderTypeMPEG2 { + #[doc = " \\brief Packed header types specific to MPEG-2 encoding.\n\n Types of packed headers generally used for MPEG-2 encoding."] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Packed Sequence Parameter Set (SPS).\n"] + pub const VAEncPackedHeaderMPEG2_SPS: Type = 1; + #[doc = " \\brief Packed Picture Parameter Set (PPS).\n"] + pub const VAEncPackedHeaderMPEG2_PPS: Type = 2; + #[doc = " \\brief Packed slice header.\n"] + pub const VAEncPackedHeaderMPEG2_Slice: Type = 3; +} +#[doc = " \\brief Sequence parameter for MPEG-2 encoding\n\n This structure holds information for \\c sequence_header() and\n sequence_extension().\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSequenceParameterBufferMPEG2 { + #[doc = " \\brief Period between I frames."] + pub intra_period: u32, + #[doc = " \\brief Period between I/P frames."] + pub ip_period: u32, + #[doc = " \\brief Picture width.\n\n A 14bits unsigned inter, the lower 12bits\n is horizontal_size_value, and the upper\n 2bits is \\c horizontal_size_extension\n"] + pub picture_width: u16, + #[doc = " \\brief Picture height.\n\n A 14bits unsigned inter, the lower 12bits\n is vertical_size_value, and the upper 2bits is\n vertical_size_size_extension\n"] + pub picture_height: u16, + #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n bits_per_second may be derived from bit_rate.\n"] + pub bits_per_second: u32, + #[doc = " \\brief Frame rate\n\n Derived from frame_rate_value, frame_rate_extension_n and\n frame_rate_extension_d\n"] + pub frame_rate: f32, + #[doc = " \\brief Same as the element in sequence_header()"] + pub aspect_ratio_information: u16, + #[doc = " \\brief Define the size of VBV"] + pub vbv_buffer_size: u32, + pub sequence_extension: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1, + #[doc = " \\brief Flag to indicate the following GOP header are being updated"] + pub new_gop_header: u32, + pub gop_header: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1 { + pub bits: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn profile_and_level_indication(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_profile_and_level_indication(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn profile_and_level_indication_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_profile_and_level_indication_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn progressive_sequence(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_progressive_sequence(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn progressive_sequence_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_progressive_sequence_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn chroma_format(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_format(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_format_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_format_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn low_delay(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_low_delay(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn low_delay_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_low_delay_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_rate_extension_n(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_rate_extension_n(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_rate_extension_n_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_rate_extension_n_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_rate_extension_d(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 5u8) as u32) } + } + #[inline] + pub fn set_frame_rate_extension_d(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_rate_extension_d_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_rate_extension_d_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + profile_and_level_indication: u32, + progressive_sequence: u32, + chroma_format: u32, + low_delay: u32, + frame_rate_extension_n: u32, + frame_rate_extension_d: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let profile_and_level_indication: u32 = unsafe { ::std::mem::transmute(profile_and_level_indication) }; + profile_and_level_indication as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let progressive_sequence: u32 = unsafe { ::std::mem::transmute(progressive_sequence) }; + progressive_sequence as u64 + }); + __bindgen_bitfield_unit.set(9usize, 2u8, { + let chroma_format: u32 = unsafe { ::std::mem::transmute(chroma_format) }; + chroma_format as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let low_delay: u32 = unsafe { ::std::mem::transmute(low_delay) }; + low_delay as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let frame_rate_extension_n: u32 = unsafe { ::std::mem::transmute(frame_rate_extension_n) }; + frame_rate_extension_n as u64 + }); + __bindgen_bitfield_unit.set(14usize, 5u8, { + let frame_rate_extension_d: u32 = unsafe { ::std::mem::transmute(frame_rate_extension_d) }; + frame_rate_extension_d as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferMPEG2__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2 { + pub bits: _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn time_code(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 25u8) as u32) } + } + #[inline] + pub fn set_time_code(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 25u8, val as u64) + } + } + #[inline] + pub unsafe fn time_code_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 25u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_time_code_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 25u8, + val as u64, + ) + } + } + #[inline] + pub fn closed_gop(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } + } + #[inline] + pub fn set_closed_gop(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn closed_gop_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_closed_gop_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn broken_link(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_broken_link(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn broken_link_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_broken_link_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(time_code: u32, closed_gop: u32, broken_link: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 25u8, { + let time_code: u32 = unsafe { ::std::mem::transmute(time_code) }; + time_code as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let closed_gop: u32 = unsafe { ::std::mem::transmute(closed_gop) }; + closed_gop as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let broken_link: u32 = unsafe { ::std::mem::transmute(broken_link) }; + broken_link as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferMPEG2__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSequenceParameterBufferMPEG2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Sequence parameter for MPEG-2 encoding\n\n This structure holds information for \\c sequence_header() and\n sequence_extension().\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +pub type VAEncSequenceParameterBufferMPEG2 = _VAEncSequenceParameterBufferMPEG2; +#[doc = " \\brief Picture parameter for MPEG-2 encoding\n\n This structure holds information for picture_header() and\n picture_coding_extension()\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferMPEG2 { + #[doc = " \\brief Forward reference picture"] + pub forward_reference_picture: VASurfaceID, + #[doc = " \\brief Backward reference picture"] + pub backward_reference_picture: VASurfaceID, + #[doc = " \\brief Reconstructed(decoded) picture"] + pub reconstructed_picture: VASurfaceID, + #[doc = " \\brief Output encoded bitstream.\n\n \\ref coded_buf has type #VAEncCodedBufferType. It should be\n large enough to hold the compressed NAL slice and possibly SPS\n and PPS NAL units."] + pub coded_buf: VABufferID, + #[doc = " \\brief Flag to indicate the picture is the last one or not.\n\n This fields holds 0 if the picture to be encoded is not\n the last one in the stream. Otherwise, it\n is \\ref MPEG2_LAST_PICTURE_EOSTREAM."] + pub last_picture: u8, + #[doc = " \\brief Picture type"] + pub picture_type: VAEncPictureType::Type, + #[doc = " \\brief Same as the element in picture_header()"] + pub temporal_reference: u32, + #[doc = " \\brief Same as the element in picture_header()"] + pub vbv_delay: u32, + #[doc = " \\brief Same as the element in Picture coding extension"] + pub f_code: [[u8; 2usize]; 2usize], + pub picture_coding_extension: _VAEncPictureParameterBufferMPEG2__bindgen_ty_1, + pub composite_display: _VAEncPictureParameterBufferMPEG2__bindgen_ty_2, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferMPEG2__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl _VAEncPictureParameterBufferMPEG2__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn intra_dc_precision(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_intra_dc_precision(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_dc_precision_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_dc_precision_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn picture_structure(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_picture_structure(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn picture_structure_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_picture_structure_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn top_field_first(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_top_field_first(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn top_field_first_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_top_field_first_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_pred_frame_dct(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_pred_frame_dct(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_pred_frame_dct_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_pred_frame_dct_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn concealment_motion_vectors(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_concealment_motion_vectors(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn concealment_motion_vectors_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_concealment_motion_vectors_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn q_scale_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_q_scale_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn q_scale_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_q_scale_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_vlc_format(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_vlc_format(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_vlc_format_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_vlc_format_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn alternate_scan(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_alternate_scan(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn alternate_scan_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_alternate_scan_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn repeat_first_field(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_repeat_first_field(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn repeat_first_field_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_repeat_first_field_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn progressive_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_progressive_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn progressive_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_progressive_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn composite_display_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_composite_display_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn composite_display_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_composite_display_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + intra_dc_precision: u32, + picture_structure: u32, + top_field_first: u32, + frame_pred_frame_dct: u32, + concealment_motion_vectors: u32, + q_scale_type: u32, + intra_vlc_format: u32, + alternate_scan: u32, + repeat_first_field: u32, + progressive_frame: u32, + composite_display_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let intra_dc_precision: u32 = unsafe { ::std::mem::transmute(intra_dc_precision) }; + intra_dc_precision as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let picture_structure: u32 = unsafe { ::std::mem::transmute(picture_structure) }; + picture_structure as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let top_field_first: u32 = unsafe { ::std::mem::transmute(top_field_first) }; + top_field_first as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let frame_pred_frame_dct: u32 = unsafe { ::std::mem::transmute(frame_pred_frame_dct) }; + frame_pred_frame_dct as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let concealment_motion_vectors: u32 = unsafe { ::std::mem::transmute(concealment_motion_vectors) }; + concealment_motion_vectors as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let q_scale_type: u32 = unsafe { ::std::mem::transmute(q_scale_type) }; + q_scale_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let intra_vlc_format: u32 = unsafe { ::std::mem::transmute(intra_vlc_format) }; + intra_vlc_format as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let alternate_scan: u32 = unsafe { ::std::mem::transmute(alternate_scan) }; + alternate_scan as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let repeat_first_field: u32 = unsafe { ::std::mem::transmute(repeat_first_field) }; + repeat_first_field as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let progressive_frame: u32 = unsafe { ::std::mem::transmute(progressive_frame) }; + progressive_frame as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let composite_display_flag: u32 = unsafe { ::std::mem::transmute(composite_display_flag) }; + composite_display_flag as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferMPEG2__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferMPEG2__bindgen_ty_2 { + pub bits: _VAEncPictureParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl _VAEncPictureParameterBufferMPEG2__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn v_axis(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_v_axis(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn v_axis_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_v_axis_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn field_sequence(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } + } + #[inline] + pub fn set_field_sequence(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn field_sequence_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_sequence_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_carrier(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_sub_carrier(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_carrier_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_carrier_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn burst_amplitude(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 7u8) as u32) } + } + #[inline] + pub fn set_burst_amplitude(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn burst_amplitude_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_burst_amplitude_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_carrier_phase(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 8u8) as u32) } + } + #[inline] + pub fn set_sub_carrier_phase(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_carrier_phase_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_carrier_phase_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + v_axis: u32, + field_sequence: u32, + sub_carrier: u32, + burst_amplitude: u32, + sub_carrier_phase: u32, + ) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let v_axis: u32 = unsafe { ::std::mem::transmute(v_axis) }; + v_axis as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let field_sequence: u32 = unsafe { ::std::mem::transmute(field_sequence) }; + field_sequence as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let sub_carrier: u32 = unsafe { ::std::mem::transmute(sub_carrier) }; + sub_carrier as u64 + }); + __bindgen_bitfield_unit.set(5usize, 7u8, { + let burst_amplitude: u32 = unsafe { ::std::mem::transmute(burst_amplitude) }; + burst_amplitude as u64 + }); + __bindgen_bitfield_unit.set(12usize, 8u8, { + let sub_carrier_phase: u32 = unsafe { ::std::mem::transmute(sub_carrier_phase) }; + sub_carrier_phase as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferMPEG2__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferMPEG2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Picture parameter for MPEG-2 encoding\n\n This structure holds information for picture_header() and\n picture_coding_extension()\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"] +pub type VAEncPictureParameterBufferMPEG2 = _VAEncPictureParameterBufferMPEG2; +#[doc = " \\brief Slice parameter for MPEG-2 encoding\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSliceParameterBufferMPEG2 { + #[doc = " \\brief Starting MB address for this slice."] + pub macroblock_address: u32, + #[doc = " \\brief Number of macroblocks in this slice."] + pub num_macroblocks: u32, + #[doc = " \\brief Same as the element in slice()"] + pub quantiser_scale_code: i32, + #[doc = " \\brief Flag to indicate intra slice"] + pub is_intra_slice: i32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Slice parameter for MPEG-2 encoding\n"] +pub type VAEncSliceParameterBufferMPEG2 = _VAEncSliceParameterBufferMPEG2; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterExtensionDataSeqDisplayMPEG2 { + #[doc = " should always be 0x02 to identify it is Sequence Display Extension ISO-13818"] + pub extension_start_code_identifier: u8, + #[doc = " these field should follow ISO-13818 6.3.6"] + pub video_format: u8, + pub colour_description: u8, + pub colour_primaries: u8, + pub transfer_characteristics: u8, + pub matrix_coefficients: u8, + pub display_horizontal_size: u16, + pub display_vertical_size: u16, +} +pub type VAEncMiscParameterExtensionDataSeqDisplayMPEG2 = _VAEncMiscParameterExtensionDataSeqDisplayMPEG2; +#[doc = " \\brief VP8 Encoding Sequence Parameter Buffer Structure\n\n This structure conveys sequence level parameters.\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferVP8 { + pub frame_width: u32, + pub frame_height: u32, + pub frame_width_scale: u32, + pub frame_height_scale: u32, + pub error_resilient: u32, + pub kf_auto: u32, + pub kf_min_dist: u32, + pub kf_max_dist: u32, + #[doc = " Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."] + pub bits_per_second: u32, + pub intra_period: u32, + pub reference_frames: [VASurfaceID; 4usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP8 Encoding Sequence Parameter Buffer Structure\n\n This structure conveys sequence level parameters.\n"] +pub type VAEncSequenceParameterBufferVP8 = _VAEncSequenceParameterBufferVP8; +#[doc = " \\brief VP8 Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferVP8 { + pub reconstructed_frame: VASurfaceID, + pub ref_last_frame: VASurfaceID, + pub ref_gf_frame: VASurfaceID, + pub ref_arf_frame: VASurfaceID, + pub coded_buf: VABufferID, + pub ref_flags: _VAEncPictureParameterBufferVP8__bindgen_ty_1, + pub pic_flags: _VAEncPictureParameterBufferVP8__bindgen_ty_2, + #[doc = " Contains a list of 4 loop filter level values (updated value if applicable)\n controlling the deblocking filter strength. Each entry represents a segment.\n When segmentation is disabled, use entry 0.\n When loop_filter_level is 0, loop filter shall be disabled."] + pub loop_filter_level: [i8; 4usize], + #[doc = " Contains a list of 4 delta values for reference frame based MB-level\n loop filter adjustment.\n If no update, then set to 0."] + pub ref_lf_delta: [i8; 4usize], + #[doc = " Contains a list of 4 delta values for coding mode based MB-level loop\n filter adjustment.\n If no update, then set to 0."] + pub mode_lf_delta: [i8; 4usize], + #[doc = " Controls the deblocking filter sensitivity.\n Corresponds to the same VP8 syntax element in frame header."] + pub sharpness_level: u8, + #[doc = " Application supplied maximum clamp value for Qindex used in quantization.\n Qindex will not be allowed to exceed this value.\n It has a valid range [0..127] inclusive."] + pub clamp_qindex_high: u8, + #[doc = " Application supplied minimum clamp value for Qindex used in quantization.\n Qindex will not be allowed to be lower than this value.\n It has a valid range [0..127] inclusive.\n Condition clamp_qindex_low <= clamp_qindex_high must be guaranteed,\n otherwise they are ignored."] + pub clamp_qindex_low: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferVP8__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferVP8__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn force_kf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_kf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_kf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_kf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn no_ref_last(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_ref_last(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn no_ref_last_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_ref_last_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn no_ref_gf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_ref_gf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn no_ref_gf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_ref_gf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn no_ref_arf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_ref_arf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn no_ref_arf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_ref_arf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 8u8) as u32) } + } + #[inline] + pub fn set_temporal_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn first_ref(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_first_ref(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn first_ref_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_first_ref_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn second_ref(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_second_ref(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn second_ref_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_second_ref_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + force_kf: u32, + no_ref_last: u32, + no_ref_gf: u32, + no_ref_arf: u32, + temporal_id: u32, + first_ref: u32, + second_ref: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let force_kf: u32 = unsafe { ::std::mem::transmute(force_kf) }; + force_kf as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let no_ref_last: u32 = unsafe { ::std::mem::transmute(no_ref_last) }; + no_ref_last as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let no_ref_gf: u32 = unsafe { ::std::mem::transmute(no_ref_gf) }; + no_ref_gf as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let no_ref_arf: u32 = unsafe { ::std::mem::transmute(no_ref_arf) }; + no_ref_arf as u64 + }); + __bindgen_bitfield_unit.set(4usize, 8u8, { + let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) }; + temporal_id as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let first_ref: u32 = unsafe { ::std::mem::transmute(first_ref) }; + first_ref as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let second_ref: u32 = unsafe { ::std::mem::transmute(second_ref) }; + second_ref as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferVP8__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferVP8__bindgen_ty_2 { + pub bits: _VAEncPictureParameterBufferVP8__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferVP8__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferVP8__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn frame_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn version(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } + } + #[inline] + pub fn set_version(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn version_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_version_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn show_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_show_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn show_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_show_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn color_space(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_color_space(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn color_space_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_color_space_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn recon_filter_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } + } + #[inline] + pub fn set_recon_filter_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn recon_filter_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_recon_filter_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } + } + #[inline] + pub fn set_loop_filter_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn auto_partitions(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_auto_partitions(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn auto_partitions_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_auto_partitions_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn num_token_partitions(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 2u8) as u32) } + } + #[inline] + pub fn set_num_token_partitions(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn num_token_partitions_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_token_partitions_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn clamping_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_clamping_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn clamping_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_clamping_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_enabled(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_enabled(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_enabled_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_enabled_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_mb_segmentation_map(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_mb_segmentation_map(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_mb_segmentation_map_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_mb_segmentation_map_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn update_segment_feature_data(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_update_segment_feature_data(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn update_segment_feature_data_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_update_segment_feature_data_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn loop_filter_adj_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_adj_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn loop_filter_adj_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_loop_filter_adj_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_entropy_probs(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_entropy_probs(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_entropy_probs_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_entropy_probs_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_golden_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_golden_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_golden_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_golden_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_alternate_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_alternate_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_alternate_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_alternate_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_last(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_last(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_last_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_last_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn copy_buffer_to_golden(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 2u8) as u32) } + } + #[inline] + pub fn set_copy_buffer_to_golden(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn copy_buffer_to_golden_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_copy_buffer_to_golden_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn copy_buffer_to_alternate(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u32) } + } + #[inline] + pub fn set_copy_buffer_to_alternate(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn copy_buffer_to_alternate_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_copy_buffer_to_alternate_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_bias_golden(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_bias_golden(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_bias_golden_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_bias_golden_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sign_bias_alternate(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_bias_alternate(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sign_bias_alternate_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sign_bias_alternate_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_no_coeff_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_no_coeff_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_no_coeff_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_no_coeff_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn forced_lf_adjustment(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } + } + #[inline] + pub fn set_forced_lf_adjustment(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn forced_lf_adjustment_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_forced_lf_adjustment_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 2u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_type: u32, + version: u32, + show_frame: u32, + color_space: u32, + recon_filter_type: u32, + loop_filter_type: u32, + auto_partitions: u32, + num_token_partitions: u32, + clamping_type: u32, + segmentation_enabled: u32, + update_mb_segmentation_map: u32, + update_segment_feature_data: u32, + loop_filter_adj_enable: u32, + refresh_entropy_probs: u32, + refresh_golden_frame: u32, + refresh_alternate_frame: u32, + refresh_last: u32, + copy_buffer_to_golden: u32, + copy_buffer_to_alternate: u32, + sign_bias_golden: u32, + sign_bias_alternate: u32, + mb_no_coeff_skip: u32, + forced_lf_adjustment: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let frame_type: u32 = unsafe { ::std::mem::transmute(frame_type) }; + frame_type as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let version: u32 = unsafe { ::std::mem::transmute(version) }; + version as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let show_frame: u32 = unsafe { ::std::mem::transmute(show_frame) }; + show_frame as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let color_space: u32 = unsafe { ::std::mem::transmute(color_space) }; + color_space as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let recon_filter_type: u32 = unsafe { ::std::mem::transmute(recon_filter_type) }; + recon_filter_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let loop_filter_type: u32 = unsafe { ::std::mem::transmute(loop_filter_type) }; + loop_filter_type as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let auto_partitions: u32 = unsafe { ::std::mem::transmute(auto_partitions) }; + auto_partitions as u64 + }); + __bindgen_bitfield_unit.set(11usize, 2u8, { + let num_token_partitions: u32 = unsafe { ::std::mem::transmute(num_token_partitions) }; + num_token_partitions as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let clamping_type: u32 = unsafe { ::std::mem::transmute(clamping_type) }; + clamping_type as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let segmentation_enabled: u32 = unsafe { ::std::mem::transmute(segmentation_enabled) }; + segmentation_enabled as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let update_mb_segmentation_map: u32 = unsafe { ::std::mem::transmute(update_mb_segmentation_map) }; + update_mb_segmentation_map as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let update_segment_feature_data: u32 = unsafe { ::std::mem::transmute(update_segment_feature_data) }; + update_segment_feature_data as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let loop_filter_adj_enable: u32 = unsafe { ::std::mem::transmute(loop_filter_adj_enable) }; + loop_filter_adj_enable as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let refresh_entropy_probs: u32 = unsafe { ::std::mem::transmute(refresh_entropy_probs) }; + refresh_entropy_probs as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let refresh_golden_frame: u32 = unsafe { ::std::mem::transmute(refresh_golden_frame) }; + refresh_golden_frame as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let refresh_alternate_frame: u32 = unsafe { ::std::mem::transmute(refresh_alternate_frame) }; + refresh_alternate_frame as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let refresh_last: u32 = unsafe { ::std::mem::transmute(refresh_last) }; + refresh_last as u64 + }); + __bindgen_bitfield_unit.set(22usize, 2u8, { + let copy_buffer_to_golden: u32 = unsafe { ::std::mem::transmute(copy_buffer_to_golden) }; + copy_buffer_to_golden as u64 + }); + __bindgen_bitfield_unit.set(24usize, 2u8, { + let copy_buffer_to_alternate: u32 = unsafe { ::std::mem::transmute(copy_buffer_to_alternate) }; + copy_buffer_to_alternate as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let sign_bias_golden: u32 = unsafe { ::std::mem::transmute(sign_bias_golden) }; + sign_bias_golden as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let sign_bias_alternate: u32 = unsafe { ::std::mem::transmute(sign_bias_alternate) }; + sign_bias_alternate as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let mb_no_coeff_skip: u32 = unsafe { ::std::mem::transmute(mb_no_coeff_skip) }; + mb_no_coeff_skip as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let forced_lf_adjustment: u32 = unsafe { ::std::mem::transmute(forced_lf_adjustment) }; + forced_lf_adjustment as u64 + }); + __bindgen_bitfield_unit.set(30usize, 2u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferVP8__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferVP8 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP8 Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +pub type VAEncPictureParameterBufferVP8 = _VAEncPictureParameterBufferVP8; +#[doc = " \\brief VP8 MB Segmentation ID Buffer\n\n application provides buffer containing the initial segmentation id for each\n MB, in raster scan order. Rate control may reassign it.\n For an 640x480 video, the buffer has 1200 entries.\n the value of each entry should be in the range [0..3], inclusive.\n If segmentation is not enabled, application does not need to provide it."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMBMapBufferVP8 { + #[doc = " number of MBs in the frame.\n It is also the number of entries of mb_segment_id[];"] + pub num_mbs: u32, + #[doc = " per MB Segmentation ID Buffer"] + pub mb_segment_id: *mut u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAEncMBMapBufferVP8 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP8 MB Segmentation ID Buffer\n\n application provides buffer containing the initial segmentation id for each\n MB, in raster scan order. Rate control may reassign it.\n For an 640x480 video, the buffer has 1200 entries.\n the value of each entry should be in the range [0..3], inclusive.\n If segmentation is not enabled, application does not need to provide it."] +pub type VAEncMBMapBufferVP8 = _VAEncMBMapBufferVP8; +#[doc = " \\brief VP8 Quantization Matrix Buffer Structure\n\n Contains quantization index for yac(0-3) for each segment and quantization\n index deltas, ydc(0), y2dc(1), y2ac(2), uvdc(3), uvac(4) that are applied\n to all segments. When segmentation is disabled, only quantization_index[0]\n will be used. This structure is sent once per frame."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAQMatrixBufferVP8 { + pub quantization_index: [u16; 4usize], + pub quantization_index_delta: [i16; 5usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP8 Quantization Matrix Buffer Structure\n\n Contains quantization index for yac(0-3) for each segment and quantization\n index deltas, ydc(0), y2dc(1), y2ac(2), uvdc(3), uvac(4) that are applied\n to all segments. When segmentation is disabled, only quantization_index[0]\n will be used. This structure is sent once per frame."] +pub type VAQMatrixBufferVP8 = _VAQMatrixBufferVP8; +#[doc = " \\brief VP9 Encoding Status Data Buffer Structure\n\n This structure is used to convey status data from encoder to application.\n Driver allocates VACodedBufferVP9Status as a private data buffer.\n Driver encapsulates the status buffer with a VACodedBufferSegment,\n and sets VACodedBufferSegment.status to be VA_CODED_BUF_STATUS_CODEC_SPECIFIC.\n And driver associates status data segment to the bit stream buffer segment\n by setting VACodedBufferSegment.next of coded_buf (bit stream) to the private\n buffer segment of status data.\n Application accesses it by calling VAMapBuffer() with VAEncCodedBufferType."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VACodedBufferVP9Status { + #[doc = " Final quantization index used (yac), determined by BRC.\n Application is providing quantization index deltas\n ydc(0), y2dc(1), y2ac(2), uvdc(3), uvac(4) that are applied to all segments\n and segmentation qi deltas, they will not be changed by BRC."] + pub base_qp_index: u16, + #[doc = " Final loopfilter levels for the frame, if segmentation is disabled only\n index 0 is used.\n If loop_filter_level is 0, it indicates loop filter is disabled."] + pub loop_filter_level: u8, + #[doc = " Long term reference frame indication from BRC. BRC recommends the\n current frame that is being queried is a good candidate for a long\n term reference."] + pub long_term_indication: u8, + pub next_frame_width: u16, + pub next_frame_height: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP9 Encoding Status Data Buffer Structure\n\n This structure is used to convey status data from encoder to application.\n Driver allocates VACodedBufferVP9Status as a private data buffer.\n Driver encapsulates the status buffer with a VACodedBufferSegment,\n and sets VACodedBufferSegment.status to be VA_CODED_BUF_STATUS_CODEC_SPECIFIC.\n And driver associates status data segment to the bit stream buffer segment\n by setting VACodedBufferSegment.next of coded_buf (bit stream) to the private\n buffer segment of status data.\n Application accesses it by calling VAMapBuffer() with VAEncCodedBufferType."] +pub type VACodedBufferVP9Status = _VACodedBufferVP9Status; +#[doc = " \\brief VP9 Encoding Sequence Parameter Buffer Structure\n\n This structure conveys sequence level parameters.\n"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferVP9 { + #[doc = " \\brief Frame size note:\n Picture resolution may change frame by frame.\n Application needs to allocate surfaces and frame buffers based on\n max frame resolution in case resolution changes for later frames.\n The source and recon surfaces allocated should be 64x64(SB) aligned\n on both horizontal and vertical directions.\n But buffers on the surfaces need to be aligned to CU boundaries."] + pub max_frame_width: u32, + pub max_frame_height: u32, + pub kf_auto: u32, + pub kf_min_dist: u32, + pub kf_max_dist: u32, + #[doc = " Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."] + pub bits_per_second: u32, + pub intra_period: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief VP9 Encoding Sequence Parameter Buffer Structure\n\n This structure conveys sequence level parameters.\n"] +pub type VAEncSequenceParameterBufferVP9 = _VAEncSequenceParameterBufferVP9; +#[doc = " \\brief VP9 Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferVP9 { + #[doc = " VP9 encoder may support dynamic scaling function.\n If enabled (enable_dynamic_scaling is set), application may request\n GPU encodes picture with a different resolution from the raw source.\n GPU should handle the scaling process of source and\n all reference frames."] + pub frame_width_src: u32, + pub frame_height_src: u32, + pub frame_width_dst: u32, + pub frame_height_dst: u32, + pub reconstructed_frame: VASurfaceID, + #[doc = " \\brief reference frame buffers\n Each entry of the array specifies the surface index of the picture\n that is referred by current picture or will be referred by any future\n picture. The valid entries take value from 0 to 127, inclusive.\n Non-valid entries, those do not point to pictures which are referred\n by current picture or future pictures, should take value 0xFF.\n Other values are not allowed.\n\n Application should update this array based on the refreshing\n information expected."] + pub reference_frames: [VASurfaceID; 8usize], + pub coded_buf: VABufferID, + pub ref_flags: _VAEncPictureParameterBufferVP9__bindgen_ty_1, + pub pic_flags: _VAEncPictureParameterBufferVP9__bindgen_ty_2, + #[doc = " \\brief indicate which frames in DPB should be refreshed.\n same syntax and semantic as in VP9 code."] + pub refresh_frame_flags: u8, + #[doc = " \\brief Base Q index in the VP9 term.\n Added with per segment delta Q index to get Q index of Luma AC."] + pub luma_ac_qindex: u8, + #[doc = " Q index delta from base Q index in the VP9 term for Luma DC."] + pub luma_dc_qindex_delta: i8, + #[doc = " Q index delta from base Q index in the VP9 term for Chroma AC."] + pub chroma_ac_qindex_delta: i8, + #[doc = " Q index delta from base Q index in the VP9 term for Chroma DC."] + pub chroma_dc_qindex_delta: i8, + #[doc = " \\brief filter level\n Corresponds to the same VP9 syntax element in frame header."] + pub filter_level: u8, + #[doc = " Controls the deblocking filter sensitivity.\n Corresponds to the same VP9 syntax element in frame header."] + pub sharpness_level: u8, + #[doc = " \\brief Loop filter level reference delta values.\n Contains a list of 4 delta values for reference frame based block-level\n loop filter adjustment.\n If no update, set to 0.\n value range [-63..63]"] + pub ref_lf_delta: [i8; 4usize], + #[doc = " \\brief Loop filter level mode delta values.\n Contains a list of 4 delta values for coding mode based MB-level loop\n filter adjustment.\n If no update, set to 0.\n value range [-63..63]"] + pub mode_lf_delta: [i8; 2usize], + #[doc = " Offset from starting position of output bitstream in bits where\n ref_lf_delta[] should be inserted. This offset should cover any metadata\n ahead of uncompressed header in inserted bit stream buffer (the offset\n should be same as that for final output bitstream buffer).\n\n In BRC mode, always insert ref_lf_delta[] (This implies uncompressed\n header should have mode_ref_delta_enabled=1 and mode_ref_delta_update=1)."] + pub bit_offset_ref_lf_delta: u16, + #[doc = " Offset from starting position of output bitstream in bits where\n mode_lf_delta[] should be inserted.\n\n In BRC mode, always insert mode_lf_delta[] (This implies uncompressed\n header should have mode_ref_delta_enabled=1 and mode_ref_delta_update=1)."] + pub bit_offset_mode_lf_delta: u16, + #[doc = " Offset from starting position of output bitstream in bits where (loop)\n filter_level should be inserted."] + pub bit_offset_lf_level: u16, + #[doc = " Offset from starting position of output bitstream in bits where\n Base Qindex should be inserted."] + pub bit_offset_qindex: u16, + #[doc = " Offset from starting position of output bitstream in bits where\n First Partition Size should be inserted."] + pub bit_offset_first_partition_size: u16, + #[doc = " Offset from starting position of output bitstream in bits where\n segmentation_enabled is located in bitstream. When auto_segmentation\n is enabled, GPU uses this offset to locate and update the\n segmentation related information."] + pub bit_offset_segmentation: u16, + #[doc = " \\brief length in bit of segmentation portion from the location\n in bit stream where segmentation_enabled syntax is coded.\n When auto_segmentation is enabled, GPU uses this bit size to locate\n and update the information after segmentation."] + pub bit_size_segmentation: u16, + #[doc = " \\brief log2 of number of tile rows\n Corresponds to the same VP9 syntax element in frame header.\n value range [0..2]"] + pub log2_tile_rows: u8, + #[doc = " \\brief log2 of number of tile columns\n Corresponds to the same VP9 syntax element in frame header.\n value range [0..6]"] + pub log2_tile_columns: u8, + #[doc = " \\brief indicate frame-skip happens\n Application may choose to drop/skip one or mulitple encoded frames or\n to-be-encoded frame due to various reasons such as insufficient\n bandwidth.\n Application uses the following three flags to inform GPU about frame-skip.\n\n value range of skip_frame_flag: [0..2]\n 0 - encode as normal, no skip;\n 1 - one or more frames were skipped by application prior to the\n current frame. Encode the current frame as normal. The driver\n will pass the number_skip_frames and skip_frames_size\n to bit rate control for adjustment.\n 2 - the current frame is to be skipped. Do not encode it but encrypt\n the packed header contents. This is for the secure encoding case\n where application generates a frame of all skipped blocks.\n The packed header will contain the skipped frame."] + pub skip_frame_flag: u8, + #[doc = " \\brief The number of frames skipped prior to the current frame.\n It includes only the skipped frames that were not counted before,\n and does not include the frame with skip_frame_flag == 2.\n Valid when skip_frame_flag = 1."] + pub number_skip_frames: u8, + #[doc = " \\brief When skip_frame_flag = 1, the size of the skipped frames in bits.\n It includes only the skipped frames that were not counted before,\n and does not include the frame size with skip_frame_flag = 2.\n When skip_frame_flag = 2, it is the size of the current skipped frame\n that is to be encrypted."] + pub skip_frames_size: u32, + #[doc = " \\brief Block size for each Segment ID in Segment Map.\n This specify the granularity of media driver of reading and processing the segment map.\n value should be VA_SEGID_BLOCK_XXX"] + pub seg_id_block_size: u8, + pub va_reserved8: [u8; 3usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 7usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferVP9__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferVP9__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn force_kf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_kf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_kf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_kf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_frame_ctrl_l0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) } + } + #[inline] + pub fn set_ref_frame_ctrl_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_frame_ctrl_l0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_frame_ctrl_l0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_frame_ctrl_l1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u32) } + } + #[inline] + pub fn set_ref_frame_ctrl_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_frame_ctrl_l1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_frame_ctrl_l1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_last_idx(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 3u8) as u32) } + } + #[inline] + pub fn set_ref_last_idx(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_last_idx_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_last_idx_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_last_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_last_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_last_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_last_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_gf_idx(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u32) } + } + #[inline] + pub fn set_ref_gf_idx(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_gf_idx_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_gf_idx_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_gf_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_gf_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_gf_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_gf_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_arf_idx(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 3u8) as u32) } + } + #[inline] + pub fn set_ref_arf_idx(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_arf_idx_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_arf_idx_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_arf_sign_bias(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_arf_sign_bias(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_arf_sign_bias_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_arf_sign_bias_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_id(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 8u8) as u32) } + } + #[inline] + pub fn set_temporal_id(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_id_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 5u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + force_kf: u32, + ref_frame_ctrl_l0: u32, + ref_frame_ctrl_l1: u32, + ref_last_idx: u32, + ref_last_sign_bias: u32, + ref_gf_idx: u32, + ref_gf_sign_bias: u32, + ref_arf_idx: u32, + ref_arf_sign_bias: u32, + temporal_id: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let force_kf: u32 = unsafe { ::std::mem::transmute(force_kf) }; + force_kf as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let ref_frame_ctrl_l0: u32 = unsafe { ::std::mem::transmute(ref_frame_ctrl_l0) }; + ref_frame_ctrl_l0 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 3u8, { + let ref_frame_ctrl_l1: u32 = unsafe { ::std::mem::transmute(ref_frame_ctrl_l1) }; + ref_frame_ctrl_l1 as u64 + }); + __bindgen_bitfield_unit.set(7usize, 3u8, { + let ref_last_idx: u32 = unsafe { ::std::mem::transmute(ref_last_idx) }; + ref_last_idx as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let ref_last_sign_bias: u32 = unsafe { ::std::mem::transmute(ref_last_sign_bias) }; + ref_last_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(11usize, 3u8, { + let ref_gf_idx: u32 = unsafe { ::std::mem::transmute(ref_gf_idx) }; + ref_gf_idx as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let ref_gf_sign_bias: u32 = unsafe { ::std::mem::transmute(ref_gf_sign_bias) }; + ref_gf_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(15usize, 3u8, { + let ref_arf_idx: u32 = unsafe { ::std::mem::transmute(ref_arf_idx) }; + ref_arf_idx as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let ref_arf_sign_bias: u32 = unsafe { ::std::mem::transmute(ref_arf_sign_bias) }; + ref_arf_sign_bias as u64 + }); + __bindgen_bitfield_unit.set(19usize, 8u8, { + let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) }; + temporal_id as u64 + }); + __bindgen_bitfield_unit.set(27usize, 5u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferVP9__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferVP9__bindgen_ty_2 { + pub bits: _VAEncPictureParameterBufferVP9__bindgen_ty_2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferVP9__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferVP9__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn frame_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn show_frame(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_show_frame(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn show_frame_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_show_frame_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn error_resilient_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_error_resilient_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_resilient_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_resilient_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_only(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_only(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_only_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_only_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_high_precision_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_high_precision_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_high_precision_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_high_precision_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mcomp_filter_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } + } + #[inline] + pub fn set_mcomp_filter_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn mcomp_filter_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mcomp_filter_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_parallel_decoding_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_parallel_decoding_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_parallel_decoding_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_parallel_decoding_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reset_frame_context(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u32) } + } + #[inline] + pub fn set_reset_frame_context(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reset_frame_context_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reset_frame_context_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn refresh_frame_context(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_refresh_frame_context(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn refresh_frame_context_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_refresh_frame_context_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn frame_context_idx(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_context_idx(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_context_idx_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_context_idx_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_enabled(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_enabled(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_enabled_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_enabled_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_temporal_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_temporal_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_temporal_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_temporal_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_update_map(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_segmentation_update_map(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_update_map_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segmentation_update_map_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn lossless_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_lossless_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn lossless_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_lossless_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comp_prediction_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } + } + #[inline] + pub fn set_comp_prediction_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn comp_prediction_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_comp_prediction_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn auto_segmentation(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_auto_segmentation(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn auto_segmentation_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_auto_segmentation_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn super_frame_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_super_frame_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn super_frame_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_super_frame_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 10u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 10u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 10u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 10u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_type: u32, + show_frame: u32, + error_resilient_mode: u32, + intra_only: u32, + allow_high_precision_mv: u32, + mcomp_filter_type: u32, + frame_parallel_decoding_mode: u32, + reset_frame_context: u32, + refresh_frame_context: u32, + frame_context_idx: u32, + segmentation_enabled: u32, + segmentation_temporal_update: u32, + segmentation_update_map: u32, + lossless_mode: u32, + comp_prediction_mode: u32, + auto_segmentation: u32, + super_frame_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let frame_type: u32 = unsafe { ::std::mem::transmute(frame_type) }; + frame_type as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let show_frame: u32 = unsafe { ::std::mem::transmute(show_frame) }; + show_frame as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let error_resilient_mode: u32 = unsafe { ::std::mem::transmute(error_resilient_mode) }; + error_resilient_mode as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let intra_only: u32 = unsafe { ::std::mem::transmute(intra_only) }; + intra_only as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let allow_high_precision_mv: u32 = unsafe { ::std::mem::transmute(allow_high_precision_mv) }; + allow_high_precision_mv as u64 + }); + __bindgen_bitfield_unit.set(5usize, 3u8, { + let mcomp_filter_type: u32 = unsafe { ::std::mem::transmute(mcomp_filter_type) }; + mcomp_filter_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let frame_parallel_decoding_mode: u32 = unsafe { ::std::mem::transmute(frame_parallel_decoding_mode) }; + frame_parallel_decoding_mode as u64 + }); + __bindgen_bitfield_unit.set(9usize, 2u8, { + let reset_frame_context: u32 = unsafe { ::std::mem::transmute(reset_frame_context) }; + reset_frame_context as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let refresh_frame_context: u32 = unsafe { ::std::mem::transmute(refresh_frame_context) }; + refresh_frame_context as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let frame_context_idx: u32 = unsafe { ::std::mem::transmute(frame_context_idx) }; + frame_context_idx as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let segmentation_enabled: u32 = unsafe { ::std::mem::transmute(segmentation_enabled) }; + segmentation_enabled as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let segmentation_temporal_update: u32 = unsafe { ::std::mem::transmute(segmentation_temporal_update) }; + segmentation_temporal_update as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let segmentation_update_map: u32 = unsafe { ::std::mem::transmute(segmentation_update_map) }; + segmentation_update_map as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let lossless_mode: u32 = unsafe { ::std::mem::transmute(lossless_mode) }; + lossless_mode as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let comp_prediction_mode: u32 = unsafe { ::std::mem::transmute(comp_prediction_mode) }; + comp_prediction_mode as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let auto_segmentation: u32 = unsafe { ::std::mem::transmute(auto_segmentation) }; + auto_segmentation as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let super_frame_flag: u32 = unsafe { ::std::mem::transmute(super_frame_flag) }; + super_frame_flag as u64 + }); + __bindgen_bitfield_unit.set(22usize, 10u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferVP9__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief VP9 Encoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters.\n"] +pub type VAEncPictureParameterBufferVP9 = _VAEncPictureParameterBufferVP9; +#[doc = " \\brief Per segment parameters"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSegParamVP9 { + pub seg_flags: _VAEncSegParamVP9__bindgen_ty_1, + #[doc = " \\brief Specifies per segment Loop Filter Delta.\n Must be 0 when segmentation_enabled == 0.\n value range: [-63..63]"] + pub segment_lf_level_delta: i8, + #[doc = " \\brief Specifies per segment QIndex Delta.\n Must be 0 when segmentation_enabled == 0.\n value range: [-255..255]"] + pub segment_qindex_delta: i16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSegParamVP9__bindgen_ty_1 { + pub bits: _VAEncSegParamVP9__bindgen_ty_1__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSegParamVP9__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncSegParamVP9__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn segment_reference_enabled(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_segment_reference_enabled(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_enabled_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segment_reference_enabled_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_reference(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u8) } + } + #[inline] + pub fn set_segment_reference(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segment_reference_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_reference_skipped(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } + } + #[inline] + pub fn set_segment_reference_skipped(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_reference_skipped_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segment_reference_skipped_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + segment_reference_enabled: u8, + segment_reference: u8, + segment_reference_skipped: u8, + reserved: u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let segment_reference_enabled: u8 = unsafe { ::std::mem::transmute(segment_reference_enabled) }; + segment_reference_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let segment_reference: u8 = unsafe { ::std::mem::transmute(segment_reference) }; + segment_reference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let segment_reference_skipped: u8 = unsafe { ::std::mem::transmute(segment_reference_skipped) }; + segment_reference_skipped as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSegParamVP9__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSegParamVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Per segment parameters"] +pub type VAEncSegParamVP9 = _VAEncSegParamVP9; +#[doc = " Structure to convey all segment related information.\n If segmentation is disabled, this data structure is still required.\n In this case, only seg_data[0] contains valid data.\n This buffer is sent once per frame.\n\n The buffer is created with VABufferType VAQMatrixBufferType.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncMiscParameterTypeVP9PerSegmantParam { + #[doc = " Parameters for 8 segments."] + pub seg_data: [VAEncSegParamVP9; 8usize], + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAEncMiscParameterTypeVP9PerSegmantParam { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " Structure to convey all segment related information.\n If segmentation is disabled, this data structure is still required.\n In this case, only seg_data[0] contains valid data.\n This buffer is sent once per frame.\n\n The buffer is created with VABufferType VAQMatrixBufferType.\n"] +pub type VAEncMiscParameterTypeVP9PerSegmantParam = _VAEncMiscParameterTypeVP9PerSegmantParam; +#[doc = " \\brief Attribute value for VAConfigAttribEncVP9."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValEncVP9 { + pub bits: _VAConfigAttribValEncVP9__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValEncVP9__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAConfigAttribValEncVP9__bindgen_ty_1 { + #[inline] + pub fn seg_id_block_size(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_seg_id_block_size(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn seg_id_block_size_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_seg_id_block_size_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_feature_support(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) } + } + #[inline] + pub fn set_segment_feature_support(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_feature_support_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segment_feature_support_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 20u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 20u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 20u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + seg_id_block_size: u32, + segment_feature_support: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let seg_id_block_size: u32 = unsafe { ::std::mem::transmute(seg_id_block_size) }; + seg_id_block_size as u64 + }); + __bindgen_bitfield_unit.set(8usize, 4u8, { + let segment_feature_support: u32 = unsafe { ::std::mem::transmute(segment_feature_support) }; + segment_feature_support as u64 + }); + __bindgen_bitfield_unit.set(12usize, 20u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValEncVP9 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncVP9."] +pub type VAConfigAttribValEncVP9 = _VAConfigAttribValEncVP9; +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1.\n\n This attribute decribes the supported features of an AV1\n encoder configuration.\n\n All of the field values in this attribute are VA_FEATURE_* values,\n indicating support for the corresponding feature.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValEncAV1 { + pub bits: _VAConfigAttribValEncAV1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValEncAV1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAConfigAttribValEncAV1__bindgen_ty_1 { + #[inline] + pub fn support_128x128_superblock(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_128x128_superblock(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_128x128_superblock_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_128x128_superblock_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_filter_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_filter_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_filter_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_filter_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_intra_edge_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_intra_edge_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_intra_edge_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_intra_edge_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_interintra_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_interintra_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_interintra_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_interintra_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_masked_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_masked_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_masked_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_masked_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_warped_motion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_warped_motion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_warped_motion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_warped_motion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_palette_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_palette_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_palette_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_palette_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_dual_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_dual_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_dual_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_dual_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_jnt_comp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_jnt_comp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_jnt_comp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_jnt_comp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_ref_frame_mvs(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_ref_frame_mvs(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_ref_frame_mvs_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_ref_frame_mvs_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_superres(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_superres(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_superres_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_superres_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_restoration(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_restoration(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_restoration_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_restoration_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_allow_intrabc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_allow_intrabc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_allow_intrabc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_allow_intrabc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn support_cdef_channel_strength(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 2u8) as u32) } + } + #[inline] + pub fn set_support_cdef_channel_strength(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn support_cdef_channel_strength_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_support_cdef_channel_strength_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 4u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + support_128x128_superblock: u32, + support_filter_intra: u32, + support_intra_edge_filter: u32, + support_interintra_compound: u32, + support_masked_compound: u32, + support_warped_motion: u32, + support_palette_mode: u32, + support_dual_filter: u32, + support_jnt_comp: u32, + support_ref_frame_mvs: u32, + support_superres: u32, + support_restoration: u32, + support_allow_intrabc: u32, + support_cdef_channel_strength: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let support_128x128_superblock: u32 = unsafe { ::std::mem::transmute(support_128x128_superblock) }; + support_128x128_superblock as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let support_filter_intra: u32 = unsafe { ::std::mem::transmute(support_filter_intra) }; + support_filter_intra as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let support_intra_edge_filter: u32 = unsafe { ::std::mem::transmute(support_intra_edge_filter) }; + support_intra_edge_filter as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let support_interintra_compound: u32 = unsafe { ::std::mem::transmute(support_interintra_compound) }; + support_interintra_compound as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let support_masked_compound: u32 = unsafe { ::std::mem::transmute(support_masked_compound) }; + support_masked_compound as u64 + }); + __bindgen_bitfield_unit.set(10usize, 2u8, { + let support_warped_motion: u32 = unsafe { ::std::mem::transmute(support_warped_motion) }; + support_warped_motion as u64 + }); + __bindgen_bitfield_unit.set(12usize, 2u8, { + let support_palette_mode: u32 = unsafe { ::std::mem::transmute(support_palette_mode) }; + support_palette_mode as u64 + }); + __bindgen_bitfield_unit.set(14usize, 2u8, { + let support_dual_filter: u32 = unsafe { ::std::mem::transmute(support_dual_filter) }; + support_dual_filter as u64 + }); + __bindgen_bitfield_unit.set(16usize, 2u8, { + let support_jnt_comp: u32 = unsafe { ::std::mem::transmute(support_jnt_comp) }; + support_jnt_comp as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let support_ref_frame_mvs: u32 = unsafe { ::std::mem::transmute(support_ref_frame_mvs) }; + support_ref_frame_mvs as u64 + }); + __bindgen_bitfield_unit.set(20usize, 2u8, { + let support_superres: u32 = unsafe { ::std::mem::transmute(support_superres) }; + support_superres as u64 + }); + __bindgen_bitfield_unit.set(22usize, 2u8, { + let support_restoration: u32 = unsafe { ::std::mem::transmute(support_restoration) }; + support_restoration as u64 + }); + __bindgen_bitfield_unit.set(24usize, 2u8, { + let support_allow_intrabc: u32 = unsafe { ::std::mem::transmute(support_allow_intrabc) }; + support_allow_intrabc as u64 + }); + __bindgen_bitfield_unit.set(26usize, 2u8, { + let support_cdef_channel_strength: u32 = unsafe { ::std::mem::transmute(support_cdef_channel_strength) }; + support_cdef_channel_strength as u64 + }); + __bindgen_bitfield_unit.set(28usize, 4u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValEncAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1.\n\n This attribute decribes the supported features of an AV1\n encoder configuration.\n\n All of the field values in this attribute are VA_FEATURE_* values,\n indicating support for the corresponding feature.\n"] +pub type VAConfigAttribValEncAV1 = _VAConfigAttribValEncAV1; +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1Ext1."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValEncAV1Ext1 { + pub bits: _VAConfigAttribValEncAV1Ext1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValEncAV1Ext1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAConfigAttribValEncAV1Ext1__bindgen_ty_1 { + #[inline] + pub fn interpolation_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) } + } + #[inline] + pub fn set_interpolation_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn interpolation_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_interpolation_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn min_segid_block_size_accepted(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 8u8) as u32) } + } + #[inline] + pub fn set_min_segid_block_size_accepted(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn min_segid_block_size_accepted_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_min_segid_block_size_accepted_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn segment_feature_support(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 8u8) as u32) } + } + #[inline] + pub fn set_segment_feature_support(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn segment_feature_support_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_segment_feature_support_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 11u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 11u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 11u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + interpolation_filter: u32, + min_segid_block_size_accepted: u32, + segment_feature_support: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 5u8, { + let interpolation_filter: u32 = unsafe { ::std::mem::transmute(interpolation_filter) }; + interpolation_filter as u64 + }); + __bindgen_bitfield_unit.set(5usize, 8u8, { + let min_segid_block_size_accepted: u32 = unsafe { ::std::mem::transmute(min_segid_block_size_accepted) }; + min_segid_block_size_accepted as u64 + }); + __bindgen_bitfield_unit.set(13usize, 8u8, { + let segment_feature_support: u32 = unsafe { ::std::mem::transmute(segment_feature_support) }; + segment_feature_support as u64 + }); + __bindgen_bitfield_unit.set(21usize, 11u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValEncAV1Ext1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1Ext1."] +pub type VAConfigAttribValEncAV1Ext1 = _VAConfigAttribValEncAV1Ext1; +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1Ext2."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAConfigAttribValEncAV1Ext2 { + pub bits: _VAConfigAttribValEncAV1Ext2__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAConfigAttribValEncAV1Ext2__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAConfigAttribValEncAV1Ext2__bindgen_ty_1 { + #[inline] + pub fn tile_size_bytes_minus1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_tile_size_bytes_minus1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn tile_size_bytes_minus1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tile_size_bytes_minus1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn obu_size_bytes_minus1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } + } + #[inline] + pub fn set_obu_size_bytes_minus1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn obu_size_bytes_minus1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_obu_size_bytes_minus1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn tx_mode_support(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u32) } + } + #[inline] + pub fn set_tx_mode_support(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn tx_mode_support_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tx_mode_support_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn max_tile_num_minus1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 13u8) as u32) } + } + #[inline] + pub fn set_max_tile_num_minus1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 13u8, val as u64) + } + } + #[inline] + pub unsafe fn max_tile_num_minus1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 13u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_tile_num_minus1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 13u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + tile_size_bytes_minus1: u32, + obu_size_bytes_minus1: u32, + tx_mode_support: u32, + max_tile_num_minus1: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let tile_size_bytes_minus1: u32 = unsafe { ::std::mem::transmute(tile_size_bytes_minus1) }; + tile_size_bytes_minus1 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let obu_size_bytes_minus1: u32 = unsafe { ::std::mem::transmute(obu_size_bytes_minus1) }; + obu_size_bytes_minus1 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 3u8, { + let tx_mode_support: u32 = unsafe { ::std::mem::transmute(tx_mode_support) }; + tx_mode_support as u64 + }); + __bindgen_bitfield_unit.set(7usize, 13u8, { + let max_tile_num_minus1: u32 = unsafe { ::std::mem::transmute(max_tile_num_minus1) }; + max_tile_num_minus1 as u64 + }); + __bindgen_bitfield_unit.set(20usize, 12u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAConfigAttribValEncAV1Ext2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Attribute value for VAConfigAttribEncAV1Ext2."] +pub type VAConfigAttribValEncAV1Ext2 = _VAConfigAttribValEncAV1Ext2; +pub mod VAEncPackedHeaderTypeAV1 { + #[doc = " \\brief Packed header types specific to AV1 encoding.\n\n Types of packed headers generally used for AV1 encoding.\n"] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Packed Sequence Parameter Set (SPS).\n\n The corresponding packed header data buffer shall contain the\n complete sequence_header_obu() syntax element.\n"] + pub const VAEncPackedHeaderAV1_SPS: Type = 1; + #[doc = " \\brief Packed Picture Parameter Set (PPS).\n\n The corresponding packed header data buffer shall contain the\n complete frame_header_obu() syntax element.\n"] + pub const VAEncPackedHeaderAV1_PPS: Type = 2; +} +#[doc = " \\brief AV1 Encoding Sequence Parameter Buffer Structure.\n\n This structure conveys sequence level parameters.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSequenceParameterBufferAV1 { + #[doc = " \\brief AV1 profile setting.\n value range [0..2]."] + pub seq_profile: u8, + #[doc = " \\brief Level Setting of current operation point.\n value range [0..23]."] + pub seq_level_idx: u8, + #[doc = " \\brief Tier Setting of current operation point.\n value range [0..1]."] + pub seq_tier: u8, + #[doc = " \\brief Indicates whether or not the encoding is in dyadic hierarchical GOP structure.\n value range [0..1]."] + pub hierarchical_flag: u8, + #[doc = " \\brief Period between intra_only frames."] + pub intra_period: u32, + #[doc = " \\brief Period between I/P frames.\n For hierarchical structure, this is the anchor frame distance."] + pub ip_period: u32, + #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for CBR mode or\n initial max bitrate value for VBR mode in this sequence.\n i.e. if the encoder pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."] + pub bits_per_second: u32, + pub seq_fields: _VAEncSequenceParameterBufferAV1__bindgen_ty_1, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name.\n value range [0..7]."] + pub order_hint_bits_minus_1: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSequenceParameterBufferAV1__bindgen_ty_1 { + pub bits: _VAEncSequenceParameterBufferAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSequenceParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncSequenceParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn still_picture(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_still_picture(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn still_picture_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_still_picture_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_128x128_superblock(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_128x128_superblock(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_128x128_superblock_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_128x128_superblock_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_filter_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_filter_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_filter_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_filter_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_intra_edge_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_intra_edge_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_intra_edge_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_intra_edge_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_interintra_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_interintra_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_interintra_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_interintra_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_masked_compound(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_masked_compound(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_masked_compound_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_masked_compound_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_warped_motion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_warped_motion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_warped_motion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_warped_motion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_dual_filter(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_dual_filter(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_dual_filter_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_dual_filter_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_order_hint(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_order_hint(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_order_hint_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_order_hint_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_jnt_comp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_jnt_comp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_jnt_comp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_jnt_comp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_ref_frame_mvs(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_ref_frame_mvs(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_ref_frame_mvs_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_ref_frame_mvs_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_superres(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_superres(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_superres_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_superres_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_cdef(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_cdef(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_cdef_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_cdef_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_restoration(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_restoration(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_restoration_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_restoration_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bit_depth_minus8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 3u8) as u32) } + } + #[inline] + pub fn set_bit_depth_minus8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn bit_depth_minus8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_bit_depth_minus8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn subsampling_x(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_x(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_x_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_x_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn subsampling_y(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_subsampling_y(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn subsampling_y_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_subsampling_y_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mono_chrome(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_mono_chrome(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mono_chrome_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mono_chrome_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved_bits(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved_bits(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_bits_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_bits_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + still_picture: u32, + use_128x128_superblock: u32, + enable_filter_intra: u32, + enable_intra_edge_filter: u32, + enable_interintra_compound: u32, + enable_masked_compound: u32, + enable_warped_motion: u32, + enable_dual_filter: u32, + enable_order_hint: u32, + enable_jnt_comp: u32, + enable_ref_frame_mvs: u32, + enable_superres: u32, + enable_cdef: u32, + enable_restoration: u32, + bit_depth_minus8: u32, + subsampling_x: u32, + subsampling_y: u32, + mono_chrome: u32, + reserved_bits: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let still_picture: u32 = unsafe { ::std::mem::transmute(still_picture) }; + still_picture as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let use_128x128_superblock: u32 = unsafe { ::std::mem::transmute(use_128x128_superblock) }; + use_128x128_superblock as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let enable_filter_intra: u32 = unsafe { ::std::mem::transmute(enable_filter_intra) }; + enable_filter_intra as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let enable_intra_edge_filter: u32 = unsafe { ::std::mem::transmute(enable_intra_edge_filter) }; + enable_intra_edge_filter as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let enable_interintra_compound: u32 = unsafe { ::std::mem::transmute(enable_interintra_compound) }; + enable_interintra_compound as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let enable_masked_compound: u32 = unsafe { ::std::mem::transmute(enable_masked_compound) }; + enable_masked_compound as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let enable_warped_motion: u32 = unsafe { ::std::mem::transmute(enable_warped_motion) }; + enable_warped_motion as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let enable_dual_filter: u32 = unsafe { ::std::mem::transmute(enable_dual_filter) }; + enable_dual_filter as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let enable_order_hint: u32 = unsafe { ::std::mem::transmute(enable_order_hint) }; + enable_order_hint as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let enable_jnt_comp: u32 = unsafe { ::std::mem::transmute(enable_jnt_comp) }; + enable_jnt_comp as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let enable_ref_frame_mvs: u32 = unsafe { ::std::mem::transmute(enable_ref_frame_mvs) }; + enable_ref_frame_mvs as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let enable_superres: u32 = unsafe { ::std::mem::transmute(enable_superres) }; + enable_superres as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_cdef: u32 = unsafe { ::std::mem::transmute(enable_cdef) }; + enable_cdef as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let enable_restoration: u32 = unsafe { ::std::mem::transmute(enable_restoration) }; + enable_restoration as u64 + }); + __bindgen_bitfield_unit.set(14usize, 3u8, { + let bit_depth_minus8: u32 = unsafe { ::std::mem::transmute(bit_depth_minus8) }; + bit_depth_minus8 as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let subsampling_x: u32 = unsafe { ::std::mem::transmute(subsampling_x) }; + subsampling_x as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let subsampling_y: u32 = unsafe { ::std::mem::transmute(subsampling_y) }; + subsampling_y as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let mono_chrome: u32 = unsafe { ::std::mem::transmute(mono_chrome) }; + mono_chrome as u64 + }); + __bindgen_bitfield_unit.set(20usize, 12u8, { + let reserved_bits: u32 = unsafe { ::std::mem::transmute(reserved_bits) }; + reserved_bits as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSequenceParameterBufferAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSequenceParameterBufferAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief AV1 Encoding Sequence Parameter Buffer Structure.\n\n This structure conveys sequence level parameters.\n"] +pub type VAEncSequenceParameterBufferAV1 = _VAEncSequenceParameterBufferAV1; +#[doc = " \\brief Segment parameters"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncSegParamAV1 { + pub seg_flags: _VAEncSegParamAV1__bindgen_ty_1, + #[doc = " If segmentation_enabled equals 1, this parameter indicates\n the number of segments conveyed through VAAPI. In this case,\n if segment_number equals 0, it will force the driver to determine\n how many segments would be created as well as the segmentation map\n to be generated. Also the driver shall write the segmentation_params()\n syntax in the uncompressed header at \\c bit_offset_segmentation (back-annotation).\n In application, the rest parameters in this structure should be all\n set to 0 and ignored by driver. And app should NOT send the\n \"Segment map data buffer\". In packed uncompressed header\n bitstream, app should write syntax element segmentation_enabled\n as 0 and segmentation_params() should be only 1-bit-long.\n If segment_number > 0, and segmentation_update_map = 1, app should provide\n the \"Segment map data buffer\" and populate the rest of the\n current data structure. And that underline encoder would honor\n the segmentation parameters feature_data[0..segment_number-1][]\n and feature_mask[0..segment_number-1], etc.\n Value range [0..8]."] + pub segment_number: u8, + #[doc = " \\brief segment parameters.\n feature_data[][] is equivalent to variable FeatureData[][] in spec,\n which is after clip3() operation.\n Clip3(x, y, z) = (z y)? y : z);\n The limit is defined in Segmentation_Feature_Max[ SEG_LVL_MAX ] = {\n 255, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER,\n MAX_LOOP_FILTER, 7, 0, 0 }"] + pub feature_data: [[i16; 8usize]; 8usize], + #[doc = " \\brief Bit field to indicate each feature is enabled or not per\n segment_id. Each bit is the feature_id."] + pub feature_mask: [u8; 8usize], + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub va_reserved: [u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncSegParamAV1__bindgen_ty_1 { + pub bits: _VAEncSegParamAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSegParamAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncSegParamAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn segmentation_enabled(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_segmentation_enabled(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_enabled_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segmentation_enabled_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_update_map(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } + } + #[inline] + pub fn set_segmentation_update_map(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_update_map_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segmentation_update_map_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn segmentation_temporal_update(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) } + } + #[inline] + pub fn set_segmentation_temporal_update(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn segmentation_temporal_update_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_segmentation_temporal_update_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 5u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + segmentation_enabled: u8, + segmentation_update_map: u8, + segmentation_temporal_update: u8, + reserved: u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let segmentation_enabled: u8 = unsafe { ::std::mem::transmute(segmentation_enabled) }; + segmentation_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let segmentation_update_map: u8 = unsafe { ::std::mem::transmute(segmentation_update_map) }; + segmentation_update_map as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let segmentation_temporal_update: u8 = unsafe { ::std::mem::transmute(segmentation_temporal_update) }; + segmentation_temporal_update as u64 + }); + __bindgen_bitfield_unit.set(3usize, 5u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncSegParamAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncSegParamAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Segment parameters"] +pub type VAEncSegParamAV1 = _VAEncSegParamAV1; +#[doc = " \\brief Segment map data buffer.\n\n This buffer is optional depending on the value of av1_segments.segmentation_enabled.\n If av1_segments.segmentation_enabled in the picture parameters equals 1,\n and RateControlMethod is not CQP and this surface is not provided by App,\n the encoder will determine the per block segmentation map. In this case,\n App should not provide the segmentation parameter data structure\n in frame header as well. If av1_segments.segmentation_enabled equals 1\n and the segmentation map buffer is provided, app should embed the\n segmentation info in frame header, populate the VAEncSegParamAV1 structure with\n #VAEncMacroblockMapBufferType and the driver as well as the underline encoder\n should honor what is given by the app."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncSegMapBufferAV1 { + #[doc = " \\brief Segment map data size."] + pub segmentMapDataSize: u32, + #[doc = " \\brief Segment map.\n Size of this map is indicated by \\ref segmentMapDataSize and each element\n in this map contains the segment id of a particular block.\n The element is indexed by raster scan order.\n The value of each entry should be in the range [0..7], inclusive."] + pub pSegmentMap: *mut u8, +} +impl Default for _VAEncSegMapBufferAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Segment map data buffer.\n\n This buffer is optional depending on the value of av1_segments.segmentation_enabled.\n If av1_segments.segmentation_enabled in the picture parameters equals 1,\n and RateControlMethod is not CQP and this surface is not provided by App,\n the encoder will determine the per block segmentation map. In this case,\n App should not provide the segmentation parameter data structure\n in frame header as well. If av1_segments.segmentation_enabled equals 1\n and the segmentation map buffer is provided, app should embed the\n segmentation info in frame header, populate the VAEncSegParamAV1 structure with\n #VAEncMacroblockMapBufferType and the driver as well as the underline encoder\n should honor what is given by the app."] +pub type VAEncSegMapBufferAV1 = _VAEncSegMapBufferAV1; +pub mod VAEncTransformationTypeAV1 { + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Identity transformation, 0-parameter."] + pub const VAAV1EncTransformationIdentity: Type = 0; + #[doc = " \\brief Translational motion, 2-parameter."] + pub const VAAV1EncTransformationTranslation: Type = 1; + #[doc = " \\brief Simplified affine with rotation + zoom only, 4-parameter."] + pub const VAAV1EncTransformationRotzoom: Type = 2; + #[doc = " \\brief Affine, 6-parameter."] + pub const VAAV1EncTransformationAffine: Type = 3; + #[doc = " \\brief Transformation count."] + pub const VAAV1EncTransformationCount: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncWarpedMotionParamsAV1 { + #[doc = " \\brief Specify the type of warped motion."] + pub wmtype: VAEncTransformationTypeAV1::Type, + #[doc = " \\brief Specify warp motion parameters.\n wm.wmmat[] corresponds to gm_params[][] in spec.\n Details in AV1 spec section 5.9.24 or refer to libaom code\n https://aomedia.googlesource.com/aom/+/refs/heads/master/av1/decoder/decodeframe.c."] + pub wmmat: [i32; 8usize], + #[doc = " \\brief Valid or invalid on affine set."] + pub invalid: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAEncWarpedMotionParamsAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub type VAEncWarpedMotionParamsAV1 = _VAEncWarpedMotionParamsAV1; +#[doc = " \\brief Reference frame control.\n\n Suggest which frame to be used as reference along with preferred search order.\n\n search_idx#: index into ref_frame_idx[] to indicate that frame will be included\n in the reference list if value in range [1..7]. Invalid when value is 0.\n The order of the search_idx# indicates the preferred search order.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union VARefFrameCtrlAV1 { + pub fields: VARefFrameCtrlAV1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct VARefFrameCtrlAV1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl VARefFrameCtrlAV1__bindgen_ty_1 { + #[inline] + pub fn search_idx0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx5(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx5(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx5_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx5_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn search_idx6(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 3u8) as u32) } + } + #[inline] + pub fn set_search_idx6(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn search_idx6_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_idx6_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn Reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) } + } + #[inline] + pub fn set_Reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 11u8, val as u64) + } + } + #[inline] + pub unsafe fn Reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 11u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_Reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 11u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + search_idx0: u32, + search_idx1: u32, + search_idx2: u32, + search_idx3: u32, + search_idx4: u32, + search_idx5: u32, + search_idx6: u32, + Reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 3u8, { + let search_idx0: u32 = unsafe { ::std::mem::transmute(search_idx0) }; + search_idx0 as u64 + }); + __bindgen_bitfield_unit.set(3usize, 3u8, { + let search_idx1: u32 = unsafe { ::std::mem::transmute(search_idx1) }; + search_idx1 as u64 + }); + __bindgen_bitfield_unit.set(6usize, 3u8, { + let search_idx2: u32 = unsafe { ::std::mem::transmute(search_idx2) }; + search_idx2 as u64 + }); + __bindgen_bitfield_unit.set(9usize, 3u8, { + let search_idx3: u32 = unsafe { ::std::mem::transmute(search_idx3) }; + search_idx3 as u64 + }); + __bindgen_bitfield_unit.set(12usize, 3u8, { + let search_idx4: u32 = unsafe { ::std::mem::transmute(search_idx4) }; + search_idx4 as u64 + }); + __bindgen_bitfield_unit.set(15usize, 3u8, { + let search_idx5: u32 = unsafe { ::std::mem::transmute(search_idx5) }; + search_idx5 as u64 + }); + __bindgen_bitfield_unit.set(18usize, 3u8, { + let search_idx6: u32 = unsafe { ::std::mem::transmute(search_idx6) }; + search_idx6 as u64 + }); + __bindgen_bitfield_unit.set(21usize, 11u8, { + let Reserved: u32 = unsafe { ::std::mem::transmute(Reserved) }; + Reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for VARefFrameCtrlAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief AV1 Encoding Picture Parameter Buffer Structure.\n\n This structure conveys picture level parameters.\n"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncPictureParameterBufferAV1 { + #[doc = " \\brief AV1 encoder may support SupRes and dynamic scaling function.\n For SupRes, underline encoder is responsible to do downscaling.\n For dynamic scaling, app should provide the scaled raw source.\n/\n/** \\brief Raw source frame width in pixels."] + pub frame_width_minus_1: u16, + #[doc = " \\brief Raw source frame height in pixels."] + pub frame_height_minus_1: u16, + #[doc = " \\brief Surface to store reconstructed frame, not used for enc only case."] + pub reconstructed_frame: VASurfaceID, + #[doc = " \\brief Buffer to store coded data."] + pub coded_buf: VABufferID, + #[doc = " \\brief Reference frame buffers.\n Each entry of the array specifies the surface index of the picture\n that is referred by current picture or will be referred by any future\n picture. The valid entries take value from 0 to 127, inclusive.\n Non-valid entries, those do not point to pictures which are referred\n by current picture or future pictures, should take value 0xFF.\n Other values are not allowed.\n\n Application should update this array based on the refreshing\n information expected."] + pub reference_frames: [VASurfaceID; 8usize], + #[doc = " \\brief Reference index list.\n Contains a list of indices into refernce_frames[].\n Indice with refernce frames range: [LAST_FRAME - LAST_FRAME,\n LAST2_FRAME - LAST_FRAME, ..., ALTREF2_FRAME - LAST_FRAME].\n #define LAST_FRAME 1\n #define LAST2_FRAME 2\n #define LAST3_FRAME 3\n #define GOLDEN_FRAME 4\n #define BWDREF_FRAME 5\n #define ALTREF_FRAME 6\n #define ALTREF2_FRAME 7\n value range [0..7]."] + pub ref_frame_idx: [u8; 7usize], + #[doc = " \\brief When hierarchical_level_plus1 > 0, hierarchical_level_plus1-1 indicates\n the current frame's level. If VAEncMiscParameterTemporalLayerStructure\n is valid (number_of_layers >0), hierarchical_level_plus1 shouldn't larger than number_of_layers."] + pub hierarchical_level_plus1: u8, + #[doc = " \\brief primary reference frame.\n Index into reference_frames[]\n segment id map, context table, etc. come from the reference\n frame pointed by this index.\n value range [0..7]."] + pub primary_ref_frame: u8, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name."] + pub order_hint: u8, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name."] + pub refresh_frame_flags: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub reserved8bits1: u8, + #[doc = " \\brief Suggest which frames to be used as references.\n see struct #VARefFrameCtrl for details."] + pub ref_frame_ctrl_l0: VARefFrameCtrlAV1, + pub ref_frame_ctrl_l1: VARefFrameCtrlAV1, + pub picture_flags: _VAEncPictureParameterBufferAV1__bindgen_ty_1, + #[doc = " \\brief Block size for each Segment ID in Segment Map.\n should be \\c VA_SEGID_BLOCK_XXXX;"] + pub seg_id_block_size: u8, + #[doc = " \\brief Number of tile groups minus 1.\n value range [0..255]."] + pub num_tile_groups_minus1: u8, + #[doc = " \\brief Temporal id of the frame."] + pub temporal_id: u8, + #[doc = " \\brief Deblock filter parameters.\n value range [0..63]."] + pub filter_level: [u8; 2usize], + pub filter_level_u: u8, + pub filter_level_v: u8, + pub loop_filter_flags: _VAEncPictureParameterBufferAV1__bindgen_ty_2, + #[doc = " \\brief Super resolution scale denominator.\n value range [9..16]."] + pub superres_scale_denominator: u8, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name."] + pub interpolation_filter: u8, + #[doc = " \\brief Loop filter ref deltas.\n value range [-63..63]."] + pub ref_deltas: [i8; 8usize], + #[doc = " \\brief Loop filter mode deltas.\n value range [-63..63]."] + pub mode_deltas: [i8; 2usize], + #[doc = " \\brief Quantization params."] + pub base_qindex: u8, + pub y_dc_delta_q: i8, + pub u_dc_delta_q: i8, + pub u_ac_delta_q: i8, + pub v_dc_delta_q: i8, + pub v_ac_delta_q: i8, + #[doc = " \\brief Min value for base q index for BRC.\n value range [1..255]."] + pub min_base_qindex: u8, + #[doc = " \\brief Max value for base q index for BRC.\n value range [1..255]."] + pub max_base_qindex: u8, + pub qmatrix_flags: _VAEncPictureParameterBufferAV1__bindgen_ty_3, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub reserved16bits1: u16, + pub mode_control_flags: _VAEncPictureParameterBufferAV1__bindgen_ty_4, + #[doc = " \\brief Segmentation parameters."] + pub segments: VAEncSegParamAV1, + #[doc = " \\brief Number of tile columns."] + pub tile_cols: u8, + #[doc = " \\brief Number of tile rows."] + pub tile_rows: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub reserved16bits2: u16, + #[doc = " \\brief The last tile column or row size needs to be derived."] + pub width_in_sbs_minus_1: [u16; 63usize], + pub height_in_sbs_minus_1: [u16; 63usize], + #[doc = " \\brief specify which tile to use for the CDF update.\n value range [0..127]"] + pub context_update_tile_id: u16, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name.\n value range [0..3]."] + pub cdef_damping_minus_3: u8, + #[doc = " \\brief Corresponds to AV1 syntax element of the same name.\n value range [0..3]."] + pub cdef_bits: u8, + #[doc = " \\brief CDEF Y strengths.\n value range [0..63]"] + pub cdef_y_strengths: [u8; 8usize], + #[doc = " \\brief CDEF UV strengths.\n value range [0..63]"] + pub cdef_uv_strengths: [u8; 8usize], + pub loop_restoration_flags: _VAEncPictureParameterBufferAV1__bindgen_ty_5, + #[doc = " \\brief Global motion."] + pub wm: [VAEncWarpedMotionParamsAV1; 7usize], + #[doc = " Offset in bits for syntax base_q_idx in packed frame header bit stream\n from the start of the packed header data.\n In BRC mode, this parameter should be set and driver will update base_q_idx in\n uncompressed header according to this offset.\n In CQP mode, this parameter should be set to 0 and ignored by driver."] + pub bit_offset_qindex: u32, + #[doc = " Offset in bits for syntax segmentation_enabled of frame header OBU\n in packed frame header bit stream from the start of the packed header data.\n Valid only in auto segmentation mode. Other than that, this parameter\n should be set to 0 and ignored by driver."] + pub bit_offset_segmentation: u32, + #[doc = " Offset in bits for syntax loop_filter_params() in packed frame\n header bit stream from the start of the packed header data.\n In BRC mode, this parameter should be set and driver will update filter params\n in packed frame header according to this offset.\n In CQP mode, this parameter should be set to 0 and ignored by driver."] + pub bit_offset_loopfilter_params: u32, + #[doc = " In BRC mode, underline encoder should generate the approperiate\n CDEF values and write back into uncompressed header. And app\n should provide default CDEF values in packed header. This parameter\n should point to the starting bit of cdef_params() syntax structure\n in packed header.\n In CQP mode, this parameter should be set to 0 and ignored by driver."] + pub bit_offset_cdef_params: u32, + #[doc = " In BRC mode, this parameter indicates the actual bit usage of\n cdef_params() syntax structure in packed uncompressed header.\n In CQP mode, this parameter should be set to 0 and ignored by driver."] + pub size_in_bits_cdef_params: u32, + #[doc = " Offset in bytes for syntax obu_size of frame header OBU in packed\n frame header bit stream from the start of the packed header. The frame\n header OBU size depends on the encoded tile sizes. It applies to both\n Frame Header OBU and Frame OBU if obu_size needs to be updated by\n underline encoder. Otherwise, app can set it to 0 and ignored by driver.\n\n In BRC mode, obu_size needs to be updated and this parameter should be set.\n In CQP mode, obu_size needs to be updated if \\c enable_frame_obu == 1. Otherwise\n this parameter should be set to 0 and ignored by driver."] + pub byte_offset_frame_hdr_obu_size: u32, + #[doc = " Frame header OBU bit stream size in bits. The frame header obu packed bit\n stream contains an obu header, a 4-byte long obu_size field, frame_header_obu()\n syntax chain, and a trailing bit if not inside a frame obu. If \\c enable_frame_obu == 1,\n the value should include and up to the last bit of frame_header_obu() and\n excluding the bits generated by byte_alignment(). If \\c enable_frame_obu == 0,\n the value should include and up to the trailing bit at the end of the frame\n header obu. The size will be used by encoder to calculate the final frame\n header size after bit shifting due to auto segmentation.\n In CQP mode, this parameter should be set to 0 and ignored by driver."] + pub size_in_bits_frame_hdr_obu: u32, + pub tile_group_obu_hdr_info: _VAEncPictureParameterBufferAV1__bindgen_ty_6, + #[doc = " \\brief The number of frames skipped prior to the current frame.\n It includes only the skipped frames that were not counted before.\n App may generate the \"show_existing_frame\" short frame header OBUs\n and send to driver with the next frame. Default value 0."] + pub number_skip_frames: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub reserved16bits3: u16, + #[doc = " \\brief Indicates the application forced frame size change in bytes.\n When the value is positive, the frame size is reduced. Otherwise, the frame\n size increases. The parameter can be used when application skips frames with\n setting of NumSkipFrames. And application can also use it for other scenarios\n such as inserting \"show_existing_frame\" at very end of the sequence."] + pub skip_frames_reduced_size: i32, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub va_reserved: [u32; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_1 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn frame_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_frame_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn error_resilient_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_error_resilient_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn error_resilient_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_error_resilient_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_cdf_update(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_cdf_update(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_cdf_update_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_cdf_update_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_superres(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_superres(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_superres_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_superres_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_high_precision_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_high_precision_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_high_precision_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_high_precision_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_ref_frame_mvs(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_ref_frame_mvs(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_ref_frame_mvs_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_use_ref_frame_mvs_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_frame_end_update_cdf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_frame_end_update_cdf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_frame_end_update_cdf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_frame_end_update_cdf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reduced_tx_set(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_reduced_tx_set(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reduced_tx_set_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reduced_tx_set_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_frame_obu(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_frame_obu(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_frame_obu_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_frame_obu_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn long_term_reference(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn long_term_reference_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_long_term_reference_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_frame_recon(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_frame_recon(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_frame_recon_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_frame_recon_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_intrabc(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_intrabc(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_intrabc_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_intrabc_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn palette_mode_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_palette_mode_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn palette_mode_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_palette_mode_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn allow_screen_content_tools(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_allow_screen_content_tools(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn allow_screen_content_tools_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_allow_screen_content_tools_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_integer_mv(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_integer_mv(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_integer_mv_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_integer_mv_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_type: u32, + error_resilient_mode: u32, + disable_cdf_update: u32, + use_superres: u32, + allow_high_precision_mv: u32, + use_ref_frame_mvs: u32, + disable_frame_end_update_cdf: u32, + reduced_tx_set: u32, + enable_frame_obu: u32, + long_term_reference: u32, + disable_frame_recon: u32, + allow_intrabc: u32, + palette_mode_enable: u32, + allow_screen_content_tools: u32, + force_integer_mv: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let frame_type: u32 = unsafe { ::std::mem::transmute(frame_type) }; + frame_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let error_resilient_mode: u32 = unsafe { ::std::mem::transmute(error_resilient_mode) }; + error_resilient_mode as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let disable_cdf_update: u32 = unsafe { ::std::mem::transmute(disable_cdf_update) }; + disable_cdf_update as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let use_superres: u32 = unsafe { ::std::mem::transmute(use_superres) }; + use_superres as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let allow_high_precision_mv: u32 = unsafe { ::std::mem::transmute(allow_high_precision_mv) }; + allow_high_precision_mv as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let use_ref_frame_mvs: u32 = unsafe { ::std::mem::transmute(use_ref_frame_mvs) }; + use_ref_frame_mvs as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let disable_frame_end_update_cdf: u32 = unsafe { ::std::mem::transmute(disable_frame_end_update_cdf) }; + disable_frame_end_update_cdf as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let reduced_tx_set: u32 = unsafe { ::std::mem::transmute(reduced_tx_set) }; + reduced_tx_set as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let enable_frame_obu: u32 = unsafe { ::std::mem::transmute(enable_frame_obu) }; + enable_frame_obu as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let long_term_reference: u32 = unsafe { ::std::mem::transmute(long_term_reference) }; + long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let disable_frame_recon: u32 = unsafe { ::std::mem::transmute(disable_frame_recon) }; + disable_frame_recon as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let allow_intrabc: u32 = unsafe { ::std::mem::transmute(allow_intrabc) }; + allow_intrabc as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let palette_mode_enable: u32 = unsafe { ::std::mem::transmute(palette_mode_enable) }; + palette_mode_enable as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let allow_screen_content_tools: u32 = unsafe { ::std::mem::transmute(allow_screen_content_tools) }; + allow_screen_content_tools as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let force_integer_mv: u32 = unsafe { ::std::mem::transmute(force_integer_mv) }; + force_integer_mv as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_2 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_2__bindgen_ty_1 { + #[inline] + pub fn sharpness_level(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) } + } + #[inline] + pub fn set_sharpness_level(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn sharpness_level_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 3u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_sharpness_level_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn mode_ref_delta_enabled(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) } + } + #[inline] + pub fn set_mode_ref_delta_enabled(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mode_ref_delta_enabled_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_mode_ref_delta_enabled_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mode_ref_delta_update(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } + } + #[inline] + pub fn set_mode_ref_delta_update(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mode_ref_delta_update_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_mode_ref_delta_update_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 3u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + sharpness_level: u8, + mode_ref_delta_enabled: u8, + mode_ref_delta_update: u8, + reserved: u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 3u8, { + let sharpness_level: u8 = unsafe { ::std::mem::transmute(sharpness_level) }; + sharpness_level as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let mode_ref_delta_enabled: u8 = unsafe { ::std::mem::transmute(mode_ref_delta_enabled) }; + mode_ref_delta_enabled as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let mode_ref_delta_update: u8 = unsafe { ::std::mem::transmute(mode_ref_delta_update) }; + mode_ref_delta_update as u64 + }); + __bindgen_bitfield_unit.set(5usize, 3u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Quantization matrix."] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_3 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[repr(align(2))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_3__bindgen_ty_1 { + #[inline] + pub fn using_qmatrix(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } + } + #[inline] + pub fn set_using_qmatrix(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn using_qmatrix_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_using_qmatrix_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_y(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_y(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_y_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_y_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_u(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_u(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_u_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_u_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn qm_v(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u16) } + } + #[inline] + pub fn set_qm_v(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn qm_v_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 4u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_qm_v_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 3u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + using_qmatrix: u16, + qm_y: u16, + qm_u: u16, + qm_v: u16, + reserved: u16, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let using_qmatrix: u16 = unsafe { ::std::mem::transmute(using_qmatrix) }; + using_qmatrix as u64 + }); + __bindgen_bitfield_unit.set(1usize, 4u8, { + let qm_y: u16 = unsafe { ::std::mem::transmute(qm_y) }; + qm_y as u64 + }); + __bindgen_bitfield_unit.set(5usize, 4u8, { + let qm_u: u16 = unsafe { ::std::mem::transmute(qm_u) }; + qm_u as u64 + }); + __bindgen_bitfield_unit.set(9usize, 4u8, { + let qm_v: u16 = unsafe { ::std::mem::transmute(qm_v) }; + qm_v as u64 + }); + __bindgen_bitfield_unit.set(13usize, 3u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_3 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_4 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1, + pub value: u32, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_4__bindgen_ty_1 { + #[inline] + pub fn delta_q_present(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_q_present(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_q_present_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_q_present_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_q_res(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } + } + #[inline] + pub fn set_delta_q_res(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_q_res_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_q_res_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_lf_present(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_lf_present(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_lf_present_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_lf_present_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_lf_res(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_delta_lf_res(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_lf_res_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_lf_res_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn delta_lf_multi(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_lf_multi(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn delta_lf_multi_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_delta_lf_multi_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn tx_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 2u8) as u32) } + } + #[inline] + pub fn set_tx_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn tx_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tx_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reference_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u32) } + } + #[inline] + pub fn set_reference_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn reference_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reference_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn skip_mode_present(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_skip_mode_present(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn skip_mode_present_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_skip_mode_present_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 20u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 20u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 20u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + delta_q_present: u32, + delta_q_res: u32, + delta_lf_present: u32, + delta_lf_res: u32, + delta_lf_multi: u32, + tx_mode: u32, + reference_mode: u32, + skip_mode_present: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let delta_q_present: u32 = unsafe { ::std::mem::transmute(delta_q_present) }; + delta_q_present as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let delta_q_res: u32 = unsafe { ::std::mem::transmute(delta_q_res) }; + delta_q_res as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let delta_lf_present: u32 = unsafe { ::std::mem::transmute(delta_lf_present) }; + delta_lf_present as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let delta_lf_res: u32 = unsafe { ::std::mem::transmute(delta_lf_res) }; + delta_lf_res as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let delta_lf_multi: u32 = unsafe { ::std::mem::transmute(delta_lf_multi) }; + delta_lf_multi as u64 + }); + __bindgen_bitfield_unit.set(7usize, 2u8, { + let tx_mode: u32 = unsafe { ::std::mem::transmute(tx_mode) }; + tx_mode as u64 + }); + __bindgen_bitfield_unit.set(9usize, 2u8, { + let reference_mode: u32 = unsafe { ::std::mem::transmute(reference_mode) }; + reference_mode as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let skip_mode_present: u32 = unsafe { ::std::mem::transmute(skip_mode_present) }; + skip_mode_present as u64 + }); + __bindgen_bitfield_unit.set(12usize, 20u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_4 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_5 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1, + pub value: u16, +} +#[repr(C)] +#[repr(align(2))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_5__bindgen_ty_1 { + #[inline] + pub fn yframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) } + } + #[inline] + pub fn set_yframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn yframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_yframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn cbframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u16) } + } + #[inline] + pub fn set_cbframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn cbframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_cbframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn crframe_restoration_type(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u16) } + } + #[inline] + pub fn set_crframe_restoration_type(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn crframe_restoration_type_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_crframe_restoration_type_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn lr_unit_shift(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u16) } + } + #[inline] + pub fn set_lr_unit_shift(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn lr_unit_shift_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_lr_unit_shift_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn lr_uv_shift(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } + } + #[inline] + pub fn set_lr_uv_shift(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn lr_uv_shift_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_lr_uv_shift_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u16 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 7u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + yframe_restoration_type: u16, + cbframe_restoration_type: u16, + crframe_restoration_type: u16, + lr_unit_shift: u16, + lr_uv_shift: u16, + reserved: u16, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let yframe_restoration_type: u16 = unsafe { ::std::mem::transmute(yframe_restoration_type) }; + yframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 2u8, { + let cbframe_restoration_type: u16 = unsafe { ::std::mem::transmute(cbframe_restoration_type) }; + cbframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let crframe_restoration_type: u16 = unsafe { ::std::mem::transmute(crframe_restoration_type) }; + crframe_restoration_type as u64 + }); + __bindgen_bitfield_unit.set(6usize, 2u8, { + let lr_unit_shift: u16 = unsafe { ::std::mem::transmute(lr_unit_shift) }; + lr_unit_shift as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let lr_uv_shift: u16 = unsafe { ::std::mem::transmute(lr_uv_shift) }; + lr_uv_shift as u64 + }); + __bindgen_bitfield_unit.set(9usize, 7u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_5 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Tile Group OBU header"] +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncPictureParameterBufferAV1__bindgen_ty_6 { + pub bits: _VAEncPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1, + pub value: u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncPictureParameterBufferAV1__bindgen_ty_6__bindgen_ty_1 { + #[inline] + pub fn obu_extension_flag(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_obu_extension_flag(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn obu_extension_flag_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_obu_extension_flag_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn obu_has_size_field(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } + } + #[inline] + pub fn set_obu_has_size_field(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn obu_has_size_field_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_obu_has_size_field_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn temporal_id(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 3u8) as u8) } + } + #[inline] + pub fn set_temporal_id(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn temporal_id_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 3u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn spatial_id(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u8) } + } + #[inline] + pub fn set_spatial_id(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn spatial_id_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 2u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_spatial_id_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + obu_extension_flag: u8, + obu_has_size_field: u8, + temporal_id: u8, + spatial_id: u8, + reserved: u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let obu_extension_flag: u8 = unsafe { ::std::mem::transmute(obu_extension_flag) }; + obu_extension_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let obu_has_size_field: u8 = unsafe { ::std::mem::transmute(obu_has_size_field) }; + obu_has_size_field as u64 + }); + __bindgen_bitfield_unit.set(2usize, 3u8, { + let temporal_id: u8 = unsafe { ::std::mem::transmute(temporal_id) }; + temporal_id as u64 + }); + __bindgen_bitfield_unit.set(5usize, 2u8, { + let spatial_id: u8 = unsafe { ::std::mem::transmute(spatial_id) }; + spatial_id as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncPictureParameterBufferAV1__bindgen_ty_6 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncPictureParameterBufferAV1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief AV1 Encoding Picture Parameter Buffer Structure.\n\n This structure conveys picture level parameters.\n"] +pub type VAEncPictureParameterBufferAV1 = _VAEncPictureParameterBufferAV1; +#[doc = " \\brief Tile Group Buffer."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncTileGroupBufferAV1 { + #[doc = " \\brief Tile group start location.\n The position of the first tile in current tile group\n in raster scan order across the frame.\n value range [0..127]."] + pub tg_start: u8, + #[doc = " \\brief Tile group end location.\n The position of the last tile in current tile group\n in raster scan order across the frame.\n value range [0..127]."] + pub tg_end: u8, + #[doc = " \\brief Reserved bytes for future use, must be zero."] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Tile Group Buffer."] +pub type VAEncTileGroupBufferAV1 = _VAEncTileGroupBufferAV1; +#[doc = " \\brief FEI frame level control buffer for H.264"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncMiscParameterFEIFrameControlH264 { + pub function: u32, + #[doc = " \\brief MB (16x16) control input buffer. It is valid only when (mb_input | mb_size_ctrl)\n is set to 1. The data in this buffer correspond to the input source. 16x16 MB is in raster scan order,\n each MB control data structure is defined by VAEncFEIMBControlH264.\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAEncFEIMBControlH264).\n Note: if mb_qp is set, VAEncQPBufferH264 is expected."] + pub mb_ctrl: VABufferID, + #[doc = " \\brief distortion output of MB ENC or ENC_PAK.\n Each 16x16 block has one distortion data with VAEncFEIDistortionH264 layout\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAEncFEIDistortionH264)."] + pub distortion: VABufferID, + #[doc = " \\brief MVs data output of MB ENC.\n Each 16x16 block has one MVs data with layout VAMotionVector\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAMotionVector) * 16."] + pub mv_data: VABufferID, + #[doc = " \\brief MBCode data output of MB ENC.\n Each 16x16 block has one MB Code data with layout VAEncFEIMBCodeH264\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAEncFEIMBCodeH264)."] + pub mb_code_data: VABufferID, + #[doc = " \\brief QP input buffer with layout VAEncQPBufferH264. It is valid only when mb_qp is set to 1.\n The data in this buffer correspond to the input source.\n One QP per 16x16 block in raster scan order, each QP is a signed char (8-bit) value."] + pub qp: VABufferID, + #[doc = " \\brief MV predictor. It is valid only when mv_predictor_enable is set to 1.\n Each 16x16 block has one or more pair of motion vectors and the corresponding\n reference indexes as defined by VAEncFEIMVPredictorH264. 16x16 block is in raster scan order.\n Buffer size shall not be less than the number of 16x16 blocks multiplied by\n sizeof(VAEncFEIMVPredictorH264)."] + pub mv_predictor: VABufferID, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, + #[doc = " \\brief max frame size control with multi passes QP setting"] + pub max_frame_size: u32, + #[doc = " \\brief number of passes, every pass has different QP"] + pub num_passes: u32, + #[doc = " \\brief delta QP list for every pass"] + pub delta_qp: *mut u8, + pub reserved3: [u32; 4usize], +} +impl Default for _VAEncMiscParameterFEIFrameControlH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl _VAEncMiscParameterFEIFrameControlH264 { + #[inline] + pub fn num_mv_predictors_l0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_num_mv_predictors_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn num_mv_predictors_l0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_mv_predictors_l0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn num_mv_predictors_l1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_num_mv_predictors_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn num_mv_predictors_l1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_mv_predictors_l1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn search_path(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + } + #[inline] + pub fn set_search_path(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn search_path_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_path_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn len_sp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } + } + #[inline] + pub fn set_len_sp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn len_sp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_len_sp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_mb_part_mask(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 7u8) as u32) } + } + #[inline] + pub fn set_sub_mb_part_mask(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_mb_part_mask_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_mb_part_mask_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_part_mask(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(71usize, 5u8) as u32) } + } + #[inline] + pub fn set_intra_part_mask(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(71usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_part_mask_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 71usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_part_mask_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 71usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn multi_pred_l0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(76usize, 1u8) as u32) } + } + #[inline] + pub fn set_multi_pred_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(76usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn multi_pred_l0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 76usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_pred_l0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 76usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn multi_pred_l1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(77usize, 1u8) as u32) } + } + #[inline] + pub fn set_multi_pred_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(77usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn multi_pred_l1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 77usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_pred_l1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 77usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_pel_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(78usize, 2u8) as u32) } + } + #[inline] + pub fn set_sub_pel_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(78usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_pel_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 78usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_pel_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 78usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn inter_sad(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 2u8) as u32) } + } + #[inline] + pub fn set_inter_sad(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn inter_sad_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_inter_sad_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_sad(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(82usize, 2u8) as u32) } + } + #[inline] + pub fn set_intra_sad(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(82usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_sad_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 82usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_sad_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 82usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn distortion_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(84usize, 1u8) as u32) } + } + #[inline] + pub fn set_distortion_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(84usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn distortion_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 84usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_distortion_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 84usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn repartition_check_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(85usize, 1u8) as u32) } + } + #[inline] + pub fn set_repartition_check_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(85usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn repartition_check_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 85usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_repartition_check_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 85usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn adaptive_search(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(86usize, 1u8) as u32) } + } + #[inline] + pub fn set_adaptive_search(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(86usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn adaptive_search_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 86usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_adaptive_search_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 86usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mv_predictor_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(87usize, 1u8) as u32) } + } + #[inline] + pub fn set_mv_predictor_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(87usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mv_predictor_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 87usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mv_predictor_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 87usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_qp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(88usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_qp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(88usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_qp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 88usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_qp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 88usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_input(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(89usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_input(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(89usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_input_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 89usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_input_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 89usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_size_ctrl(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(90usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_size_ctrl(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(90usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_size_ctrl_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 90usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_size_ctrl_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 90usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn colocated_mb_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(91usize, 1u8) as u32) } + } + #[inline] + pub fn set_colocated_mb_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(91usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn colocated_mb_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 91usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_colocated_mb_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 91usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(92usize, 4u8) as u32) } + } + #[inline] + pub fn set_reserved1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(92usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 92usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 92usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_width(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(96usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_width(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(96usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_width_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 96usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_width_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 96usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_height(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(104usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_height(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(104usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_height_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 104usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_height_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 104usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn search_window(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(112usize, 4u8) as u32) } + } + #[inline] + pub fn set_search_window(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(112usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn search_window_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 112usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_window_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 112usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(116usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(116usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 116usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 116usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + num_mv_predictors_l0: u32, + num_mv_predictors_l1: u32, + search_path: u32, + len_sp: u32, + reserved0: u32, + sub_mb_part_mask: u32, + intra_part_mask: u32, + multi_pred_l0: u32, + multi_pred_l1: u32, + sub_pel_mode: u32, + inter_sad: u32, + intra_sad: u32, + distortion_type: u32, + repartition_check_enable: u32, + adaptive_search: u32, + mv_predictor_enable: u32, + mb_qp: u32, + mb_input: u32, + mb_size_ctrl: u32, + colocated_mb_distortion: u32, + reserved1: u32, + ref_width: u32, + ref_height: u32, + search_window: u32, + reserved2: u32, + ) -> __BindgenBitfieldUnit<[u8; 16usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let num_mv_predictors_l0: u32 = unsafe { ::std::mem::transmute(num_mv_predictors_l0) }; + num_mv_predictors_l0 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let num_mv_predictors_l1: u32 = unsafe { ::std::mem::transmute(num_mv_predictors_l1) }; + num_mv_predictors_l1 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 8u8, { + let search_path: u32 = unsafe { ::std::mem::transmute(search_path) }; + search_path as u64 + }); + __bindgen_bitfield_unit.set(40usize, 8u8, { + let len_sp: u32 = unsafe { ::std::mem::transmute(len_sp) }; + len_sp as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 7u8, { + let sub_mb_part_mask: u32 = unsafe { ::std::mem::transmute(sub_mb_part_mask) }; + sub_mb_part_mask as u64 + }); + __bindgen_bitfield_unit.set(71usize, 5u8, { + let intra_part_mask: u32 = unsafe { ::std::mem::transmute(intra_part_mask) }; + intra_part_mask as u64 + }); + __bindgen_bitfield_unit.set(76usize, 1u8, { + let multi_pred_l0: u32 = unsafe { ::std::mem::transmute(multi_pred_l0) }; + multi_pred_l0 as u64 + }); + __bindgen_bitfield_unit.set(77usize, 1u8, { + let multi_pred_l1: u32 = unsafe { ::std::mem::transmute(multi_pred_l1) }; + multi_pred_l1 as u64 + }); + __bindgen_bitfield_unit.set(78usize, 2u8, { + let sub_pel_mode: u32 = unsafe { ::std::mem::transmute(sub_pel_mode) }; + sub_pel_mode as u64 + }); + __bindgen_bitfield_unit.set(80usize, 2u8, { + let inter_sad: u32 = unsafe { ::std::mem::transmute(inter_sad) }; + inter_sad as u64 + }); + __bindgen_bitfield_unit.set(82usize, 2u8, { + let intra_sad: u32 = unsafe { ::std::mem::transmute(intra_sad) }; + intra_sad as u64 + }); + __bindgen_bitfield_unit.set(84usize, 1u8, { + let distortion_type: u32 = unsafe { ::std::mem::transmute(distortion_type) }; + distortion_type as u64 + }); + __bindgen_bitfield_unit.set(85usize, 1u8, { + let repartition_check_enable: u32 = unsafe { ::std::mem::transmute(repartition_check_enable) }; + repartition_check_enable as u64 + }); + __bindgen_bitfield_unit.set(86usize, 1u8, { + let adaptive_search: u32 = unsafe { ::std::mem::transmute(adaptive_search) }; + adaptive_search as u64 + }); + __bindgen_bitfield_unit.set(87usize, 1u8, { + let mv_predictor_enable: u32 = unsafe { ::std::mem::transmute(mv_predictor_enable) }; + mv_predictor_enable as u64 + }); + __bindgen_bitfield_unit.set(88usize, 1u8, { + let mb_qp: u32 = unsafe { ::std::mem::transmute(mb_qp) }; + mb_qp as u64 + }); + __bindgen_bitfield_unit.set(89usize, 1u8, { + let mb_input: u32 = unsafe { ::std::mem::transmute(mb_input) }; + mb_input as u64 + }); + __bindgen_bitfield_unit.set(90usize, 1u8, { + let mb_size_ctrl: u32 = unsafe { ::std::mem::transmute(mb_size_ctrl) }; + mb_size_ctrl as u64 + }); + __bindgen_bitfield_unit.set(91usize, 1u8, { + let colocated_mb_distortion: u32 = unsafe { ::std::mem::transmute(colocated_mb_distortion) }; + colocated_mb_distortion as u64 + }); + __bindgen_bitfield_unit.set(92usize, 4u8, { + let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(96usize, 8u8, { + let ref_width: u32 = unsafe { ::std::mem::transmute(ref_width) }; + ref_width as u64 + }); + __bindgen_bitfield_unit.set(104usize, 8u8, { + let ref_height: u32 = unsafe { ::std::mem::transmute(ref_height) }; + ref_height as u64 + }); + __bindgen_bitfield_unit.set(112usize, 4u8, { + let search_window: u32 = unsafe { ::std::mem::transmute(search_window) }; + search_window as u64 + }); + __bindgen_bitfield_unit.set(116usize, 12u8, { + let reserved2: u32 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief FEI frame level control buffer for H.264"] +pub type VAEncMiscParameterFEIFrameControlH264 = _VAEncMiscParameterFEIFrameControlH264; +#[doc = " \\brief FEI MB level control data structure"] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMBControlH264 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub reserved1: u32, + pub reserved2: u32, + pub _bitfield_align_2: [u16; 0], + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl _VAEncFEIMBControlH264 { + #[inline] + pub fn force_to_intra(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_intra_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_intra_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_to_skip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_skip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_skip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_skip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn force_to_nonskip(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_force_to_nonskip(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn force_to_nonskip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_force_to_nonskip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_direct_bias_adjustment(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_direct_bias_adjustment(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_direct_bias_adjustment_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_direct_bias_adjustment_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_motion_bias_adjustment(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_motion_bias_adjustment(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_motion_bias_adjustment_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_motion_bias_adjustment_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ext_mv_cost_scaling_factor(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) } + } + #[inline] + pub fn set_ext_mv_cost_scaling_factor(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn ext_mv_cost_scaling_factor_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ext_mv_cost_scaling_factor_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + force_to_intra: u32, + force_to_skip: u32, + force_to_nonskip: u32, + enable_direct_bias_adjustment: u32, + enable_motion_bias_adjustment: u32, + ext_mv_cost_scaling_factor: u32, + reserved0: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let force_to_intra: u32 = unsafe { ::std::mem::transmute(force_to_intra) }; + force_to_intra as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let force_to_skip: u32 = unsafe { ::std::mem::transmute(force_to_skip) }; + force_to_skip as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let force_to_nonskip: u32 = unsafe { ::std::mem::transmute(force_to_nonskip) }; + force_to_nonskip as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let enable_direct_bias_adjustment: u32 = unsafe { ::std::mem::transmute(enable_direct_bias_adjustment) }; + enable_direct_bias_adjustment as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let enable_motion_bias_adjustment: u32 = unsafe { ::std::mem::transmute(enable_motion_bias_adjustment) }; + enable_motion_bias_adjustment as u64 + }); + __bindgen_bitfield_unit.set(5usize, 3u8, { + let ext_mv_cost_scaling_factor: u32 = unsafe { ::std::mem::transmute(ext_mv_cost_scaling_factor) }; + ext_mv_cost_scaling_factor as u64 + }); + __bindgen_bitfield_unit.set(8usize, 24u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit + } + #[inline] + pub fn reserved3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn target_size_in_word(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(16usize, 8u8) as u32) } + } + #[inline] + pub fn set_target_size_in_word(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(16usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn target_size_in_word_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 16usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_target_size_in_word_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 16usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn max_size_in_word(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_max_size_in_word(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn max_size_in_word_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 24usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_size_in_word_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 24usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_2( + reserved3: u32, + target_size_in_word: u32, + max_size_in_word: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let reserved3: u32 = unsafe { ::std::mem::transmute(reserved3) }; + reserved3 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 8u8, { + let target_size_in_word: u32 = unsafe { ::std::mem::transmute(target_size_in_word) }; + target_size_in_word as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let max_size_in_word: u32 = unsafe { ::std::mem::transmute(max_size_in_word) }; + max_size_in_word as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief FEI MB level control data structure"] +pub type VAEncFEIMBControlH264 = _VAEncFEIMBControlH264; +#[doc = " \\brief Application can use this definition as reference to allocate the buffer\n based on MaxNumPredictor returned from attribute VAConfigAttribFEIMVPredictors query."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMVPredictorH264 { + pub ref_idx: [_VAEncFEIMVPredictorH264__bindgen_ty_1; 4usize], + pub reserved: u32, + #[doc = " \\brief MV. MaxNumPredictor must be the returned value from attribute VAConfigAttribFEIMVPredictors query.\n Even application doesn't use the maximum predictors, the VAFEIMVPredictorH264 structure size\n has to be defined as maximum so each MB can be at a fixed location.\n Note that 0x8000 must be used for correspondent intra block."] + pub mv: [VAMotionVector; 4usize], +} +#[doc = " \\brief Reference index corresponding to the entry of RefPicList0 & RefPicList1 in VAEncSliceParameterBufferH264.\n Note that RefPicList0 & RefPicList1 needs to be the same for all slices.\n ref_idx_l0_x : index to RefPicList0; ref_idx_l1_x : index to RefPicList1; x : 0 - MaxNumPredictor."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMVPredictorH264__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +impl _VAEncFEIMVPredictorH264__bindgen_ty_1 { + #[inline] + pub fn ref_idx_l0(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_ref_idx_l0(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1(&self) -> u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_ref_idx_l1(&mut self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_raw(this: *const Self) -> u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_raw(this: *mut Self, val: u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(ref_idx_l0: u8, ref_idx_l1: u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let ref_idx_l0: u8 = unsafe { ::std::mem::transmute(ref_idx_l0) }; + ref_idx_l0 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let ref_idx_l1: u8 = unsafe { ::std::mem::transmute(ref_idx_l1) }; + ref_idx_l1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief Application can use this definition as reference to allocate the buffer\n based on MaxNumPredictor returned from attribute VAConfigAttribFEIMVPredictors query."] +pub type VAEncFEIMVPredictorH264 = _VAEncFEIMVPredictorH264; +#[doc = " \\brief VAEncFEIMBCodeH264 defines the data structure for VAEncFEIMBCodeBufferType per 16x16 MB block.\n it is output buffer of ENC and ENC_PAK modes, it's also input buffer of PAK mode.\n The 16x16 block is in raster scan order. Buffer size shall not be less than the number of 16x16 blocks\n multiplied by sizeof(VAEncFEIMBCodeH264). Note that, when separate ENC and PAK is enabled,\n the exact layout of this buffer is needed for PAK input. App can reuse this buffer,\n or copy to a different buffer as PAK input, reserved elements must not be modified when used as PAK input."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _VAEncFEIMBCodeH264 { + pub reserved0: [u32; 3usize], + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, + pub mb_mode: _VAEncFEIMBCodeH264__bindgen_ty_1, + pub _bitfield_align_2: [u16; 0], + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 4usize]>, + pub reserved9: [u32; 4usize], + pub reserved10: u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union _VAEncFEIMBCodeH264__bindgen_ty_1 { + pub intra_mb: _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_1, + pub inter_mb: _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 12usize]>, +} +impl _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn luma_intra_pred_modes0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_luma_intra_pred_modes0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn luma_intra_pred_modes0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_luma_intra_pred_modes0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn luma_intra_pred_modes1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_luma_intra_pred_modes1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn luma_intra_pred_modes1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_luma_intra_pred_modes1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn luma_intra_pred_modes2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 16u8) as u32) } + } + #[inline] + pub fn set_luma_intra_pred_modes2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn luma_intra_pred_modes2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_luma_intra_pred_modes2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn luma_intra_pred_modes3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_luma_intra_pred_modes3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn luma_intra_pred_modes3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_luma_intra_pred_modes3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn chroma_intra_pred_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 2u8) as u32) } + } + #[inline] + pub fn set_chroma_intra_pred_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn chroma_intra_pred_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_chroma_intra_pred_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_pred_avail_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(66usize, 5u8) as u32) } + } + #[inline] + pub fn set_intra_pred_avail_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(66usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_pred_avail_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 66usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_pred_avail_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 66usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_pred_avail_flagF(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(71usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_pred_avail_flagF(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(71usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_pred_avail_flagF_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 71usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_pred_avail_flagF_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 71usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved6(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(72usize, 24u8) as u32) } + } + #[inline] + pub fn set_reserved6(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(72usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved6_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 72usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved6_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 72usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + luma_intra_pred_modes0: u32, + luma_intra_pred_modes1: u32, + luma_intra_pred_modes2: u32, + luma_intra_pred_modes3: u32, + chroma_intra_pred_mode: u32, + intra_pred_avail_flag: u32, + intra_pred_avail_flagF: u32, + reserved6: u32, + ) -> __BindgenBitfieldUnit<[u8; 12usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 12usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let luma_intra_pred_modes0: u32 = unsafe { ::std::mem::transmute(luma_intra_pred_modes0) }; + luma_intra_pred_modes0 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let luma_intra_pred_modes1: u32 = unsafe { ::std::mem::transmute(luma_intra_pred_modes1) }; + luma_intra_pred_modes1 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 16u8, { + let luma_intra_pred_modes2: u32 = unsafe { ::std::mem::transmute(luma_intra_pred_modes2) }; + luma_intra_pred_modes2 as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let luma_intra_pred_modes3: u32 = unsafe { ::std::mem::transmute(luma_intra_pred_modes3) }; + luma_intra_pred_modes3 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 2u8, { + let chroma_intra_pred_mode: u32 = unsafe { ::std::mem::transmute(chroma_intra_pred_mode) }; + chroma_intra_pred_mode as u64 + }); + __bindgen_bitfield_unit.set(66usize, 5u8, { + let intra_pred_avail_flag: u32 = unsafe { ::std::mem::transmute(intra_pred_avail_flag) }; + intra_pred_avail_flag as u64 + }); + __bindgen_bitfield_unit.set(71usize, 1u8, { + let intra_pred_avail_flagF: u32 = unsafe { ::std::mem::transmute(intra_pred_avail_flagF) }; + intra_pred_avail_flagF as u64 + }); + __bindgen_bitfield_unit.set(72usize, 24u8, { + let reserved6: u32 = unsafe { ::std::mem::transmute(reserved6) }; + reserved6 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_2 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 12usize]>, +} +impl _VAEncFEIMBCodeH264__bindgen_ty_1__bindgen_ty_2 { + #[inline] + pub fn sub_mb_shapes(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_sub_mb_shapes(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_mb_shapes_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_mb_shapes_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_mb_pred_modes(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + } + #[inline] + pub fn set_sub_mb_pred_modes(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_mb_pred_modes_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_mb_pred_modes_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved7(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved7(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved7_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved7_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l0_0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l0_0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l0_1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l0_1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l0_2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l0_2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l0_3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l0_3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(56usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l0_3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 56usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l0_3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 56usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1_0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l1_0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1_1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(72usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l1_1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(72usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 72usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 72usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1_2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l1_2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_idx_l1_3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(88usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_idx_l1_3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(88usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_idx_l1_3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 12usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 88usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_idx_l1_3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 12usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 88usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + sub_mb_shapes: u32, + sub_mb_pred_modes: u32, + reserved7: u32, + ref_idx_l0_0: u32, + ref_idx_l0_1: u32, + ref_idx_l0_2: u32, + ref_idx_l0_3: u32, + ref_idx_l1_0: u32, + ref_idx_l1_1: u32, + ref_idx_l1_2: u32, + ref_idx_l1_3: u32, + ) -> __BindgenBitfieldUnit<[u8; 12usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 12usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let sub_mb_shapes: u32 = unsafe { ::std::mem::transmute(sub_mb_shapes) }; + sub_mb_shapes as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let sub_mb_pred_modes: u32 = unsafe { ::std::mem::transmute(sub_mb_pred_modes) }; + sub_mb_pred_modes as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let reserved7: u32 = unsafe { ::std::mem::transmute(reserved7) }; + reserved7 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 8u8, { + let ref_idx_l0_0: u32 = unsafe { ::std::mem::transmute(ref_idx_l0_0) }; + ref_idx_l0_0 as u64 + }); + __bindgen_bitfield_unit.set(40usize, 8u8, { + let ref_idx_l0_1: u32 = unsafe { ::std::mem::transmute(ref_idx_l0_1) }; + ref_idx_l0_1 as u64 + }); + __bindgen_bitfield_unit.set(48usize, 8u8, { + let ref_idx_l0_2: u32 = unsafe { ::std::mem::transmute(ref_idx_l0_2) }; + ref_idx_l0_2 as u64 + }); + __bindgen_bitfield_unit.set(56usize, 8u8, { + let ref_idx_l0_3: u32 = unsafe { ::std::mem::transmute(ref_idx_l0_3) }; + ref_idx_l0_3 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 8u8, { + let ref_idx_l1_0: u32 = unsafe { ::std::mem::transmute(ref_idx_l1_0) }; + ref_idx_l1_0 as u64 + }); + __bindgen_bitfield_unit.set(72usize, 8u8, { + let ref_idx_l1_1: u32 = unsafe { ::std::mem::transmute(ref_idx_l1_1) }; + ref_idx_l1_1 as u64 + }); + __bindgen_bitfield_unit.set(80usize, 8u8, { + let ref_idx_l1_2: u32 = unsafe { ::std::mem::transmute(ref_idx_l1_2) }; + ref_idx_l1_2 as u64 + }); + __bindgen_bitfield_unit.set(88usize, 8u8, { + let ref_idx_l1_3: u32 = unsafe { ::std::mem::transmute(ref_idx_l1_3) }; + ref_idx_l1_3 as u64 + }); + __bindgen_bitfield_unit + } +} +impl Default for _VAEncFEIMBCodeH264__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl Default for _VAEncFEIMBCodeH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl _VAEncFEIMBCodeH264 { + #[inline] + pub fn inter_mb_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_inter_mb_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn inter_mb_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_inter_mb_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_skip_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_skip_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_skip_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_skip_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_reserved1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_mb_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) } + } + #[inline] + pub fn set_intra_mb_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_mb_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_mb_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_reserved2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn field_mb_polarity_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_mb_polarity_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn field_mb_polarity_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_mb_polarity_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_type(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) } + } + #[inline] + pub fn set_mb_type(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_type_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_type_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_mb_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_mb_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_mb_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_mb_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn field_mb_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_mb_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn field_mb_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_field_mb_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn transform8x8_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform8x8_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn transform8x8_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_transform8x8_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_reserved3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dc_block_coded_cr_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_dc_block_coded_cr_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dc_block_coded_cr_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dc_block_coded_cr_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dc_block_coded_cb_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_dc_block_coded_cb_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dc_block_coded_cb_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dc_block_coded_cb_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dc_block_coded_y_flag(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_dc_block_coded_y_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn dc_block_coded_y_flag_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dc_block_coded_y_flag_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved4(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved4(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved4_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved4_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn horz_origin(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + } + #[inline] + pub fn set_horz_origin(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn horz_origin_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_horz_origin_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn vert_origin(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } + } + #[inline] + pub fn set_vert_origin(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn vert_origin_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vert_origin_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn cbp_y(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_cbp_y(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn cbp_y_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cbp_y_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn cbp_cb(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 16u8) as u32) } + } + #[inline] + pub fn set_cbp_cb(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn cbp_cb_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cbp_cb_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn cbp_cr(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 16u8) as u32) } + } + #[inline] + pub fn set_cbp_cr(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn cbp_cr_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_cbp_cr_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn qp_prime_y(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(96usize, 8u8) as u32) } + } + #[inline] + pub fn set_qp_prime_y(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(96usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn qp_prime_y_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 96usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_qp_prime_y_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 96usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved5(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(104usize, 17u8) as u32) } + } + #[inline] + pub fn set_reserved5(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(104usize, 17u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved5_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 104usize, + 17u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved5_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 104usize, + 17u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_skip_conv_disable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(121usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_skip_conv_disable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(121usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_skip_conv_disable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 121usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_skip_conv_disable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 121usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_last_mb(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(122usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_last_mb(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(122usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_last_mb_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 122usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_last_mb_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 122usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_coefficient_clamp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(123usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_coefficient_clamp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(123usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_coefficient_clamp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 123usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_coefficient_clamp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 123usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn direct8x8_pattern(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(124usize, 4u8) as u32) } + } + #[inline] + pub fn set_direct8x8_pattern(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(124usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn direct8x8_pattern_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 124usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_direct8x8_pattern_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 124usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + inter_mb_mode: u32, + mb_skip_flag: u32, + reserved1: u32, + intra_mb_mode: u32, + reserved2: u32, + field_mb_polarity_flag: u32, + mb_type: u32, + intra_mb_flag: u32, + field_mb_flag: u32, + transform8x8_flag: u32, + reserved3: u32, + dc_block_coded_cr_flag: u32, + dc_block_coded_cb_flag: u32, + dc_block_coded_y_flag: u32, + reserved4: u32, + horz_origin: u32, + vert_origin: u32, + cbp_y: u32, + cbp_cb: u32, + cbp_cr: u32, + qp_prime_y: u32, + reserved5: u32, + mb_skip_conv_disable: u32, + is_last_mb: u32, + enable_coefficient_clamp: u32, + direct8x8_pattern: u32, + ) -> __BindgenBitfieldUnit<[u8; 16usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let inter_mb_mode: u32 = unsafe { ::std::mem::transmute(inter_mb_mode) }; + inter_mb_mode as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let mb_skip_flag: u32 = unsafe { ::std::mem::transmute(mb_skip_flag) }; + mb_skip_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(4usize, 2u8, { + let intra_mb_mode: u32 = unsafe { ::std::mem::transmute(intra_mb_mode) }; + intra_mb_mode as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let reserved2: u32 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let field_mb_polarity_flag: u32 = unsafe { ::std::mem::transmute(field_mb_polarity_flag) }; + field_mb_polarity_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 5u8, { + let mb_type: u32 = unsafe { ::std::mem::transmute(mb_type) }; + mb_type as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let intra_mb_flag: u32 = unsafe { ::std::mem::transmute(intra_mb_flag) }; + intra_mb_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let field_mb_flag: u32 = unsafe { ::std::mem::transmute(field_mb_flag) }; + field_mb_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let transform8x8_flag: u32 = unsafe { ::std::mem::transmute(transform8x8_flag) }; + transform8x8_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let reserved3: u32 = unsafe { ::std::mem::transmute(reserved3) }; + reserved3 as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let dc_block_coded_cr_flag: u32 = unsafe { ::std::mem::transmute(dc_block_coded_cr_flag) }; + dc_block_coded_cr_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let dc_block_coded_cb_flag: u32 = unsafe { ::std::mem::transmute(dc_block_coded_cb_flag) }; + dc_block_coded_cb_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let dc_block_coded_y_flag: u32 = unsafe { ::std::mem::transmute(dc_block_coded_y_flag) }; + dc_block_coded_y_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 12u8, { + let reserved4: u32 = unsafe { ::std::mem::transmute(reserved4) }; + reserved4 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 8u8, { + let horz_origin: u32 = unsafe { ::std::mem::transmute(horz_origin) }; + horz_origin as u64 + }); + __bindgen_bitfield_unit.set(40usize, 8u8, { + let vert_origin: u32 = unsafe { ::std::mem::transmute(vert_origin) }; + vert_origin as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let cbp_y: u32 = unsafe { ::std::mem::transmute(cbp_y) }; + cbp_y as u64 + }); + __bindgen_bitfield_unit.set(64usize, 16u8, { + let cbp_cb: u32 = unsafe { ::std::mem::transmute(cbp_cb) }; + cbp_cb as u64 + }); + __bindgen_bitfield_unit.set(80usize, 16u8, { + let cbp_cr: u32 = unsafe { ::std::mem::transmute(cbp_cr) }; + cbp_cr as u64 + }); + __bindgen_bitfield_unit.set(96usize, 8u8, { + let qp_prime_y: u32 = unsafe { ::std::mem::transmute(qp_prime_y) }; + qp_prime_y as u64 + }); + __bindgen_bitfield_unit.set(104usize, 17u8, { + let reserved5: u32 = unsafe { ::std::mem::transmute(reserved5) }; + reserved5 as u64 + }); + __bindgen_bitfield_unit.set(121usize, 1u8, { + let mb_skip_conv_disable: u32 = unsafe { ::std::mem::transmute(mb_skip_conv_disable) }; + mb_skip_conv_disable as u64 + }); + __bindgen_bitfield_unit.set(122usize, 1u8, { + let is_last_mb: u32 = unsafe { ::std::mem::transmute(is_last_mb) }; + is_last_mb as u64 + }); + __bindgen_bitfield_unit.set(123usize, 1u8, { + let enable_coefficient_clamp: u32 = unsafe { ::std::mem::transmute(enable_coefficient_clamp) }; + enable_coefficient_clamp as u64 + }); + __bindgen_bitfield_unit.set(124usize, 4u8, { + let direct8x8_pattern: u32 = unsafe { ::std::mem::transmute(direct8x8_pattern) }; + direct8x8_pattern as u64 + }); + __bindgen_bitfield_unit + } + #[inline] + pub fn reserved8(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved8(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved8_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved8_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn target_size_in_word(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(16usize, 8u8) as u32) } + } + #[inline] + pub fn set_target_size_in_word(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(16usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn target_size_in_word_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 16usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_target_size_in_word_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 16usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn max_size_in_word(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_max_size_in_word(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn max_size_in_word_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 24usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_max_size_in_word_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 24usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_2( + reserved8: u32, + target_size_in_word: u32, + max_size_in_word: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let reserved8: u32 = unsafe { ::std::mem::transmute(reserved8) }; + reserved8 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 8u8, { + let target_size_in_word: u32 = unsafe { ::std::mem::transmute(target_size_in_word) }; + target_size_in_word as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let max_size_in_word: u32 = unsafe { ::std::mem::transmute(max_size_in_word) }; + max_size_in_word as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief VAEncFEIMBCodeH264 defines the data structure for VAEncFEIMBCodeBufferType per 16x16 MB block.\n it is output buffer of ENC and ENC_PAK modes, it's also input buffer of PAK mode.\n The 16x16 block is in raster scan order. Buffer size shall not be less than the number of 16x16 blocks\n multiplied by sizeof(VAEncFEIMBCodeH264). Note that, when separate ENC and PAK is enabled,\n the exact layout of this buffer is needed for PAK input. App can reuse this buffer,\n or copy to a different buffer as PAK input, reserved elements must not be modified when used as PAK input."] +pub type VAEncFEIMBCodeH264 = _VAEncFEIMBCodeH264; +#[doc = " \\brief VAEncFEIDistortionH264 defines the data structure for VAEncFEIDistortionBufferType per 16x16 MB block.\n It is output buffer of ENC and ENC_PAK modes, The 16x16 block is in raster scan order.\n Buffer size shall not be less than the number of 16x16 blocks multiple by sizeof(VAEncFEIDistortionH264)."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAEncFEIDistortionH264 { + #[doc = " \\brief Inter-prediction-distortion associated with motion vector i (co-located with subblock_4x4_i).\n Its meaning is determined by sub-shape. It must be zero if the corresponding sub-shape is not chosen."] + pub inter_distortion: [u16; 16usize], + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub reserved1: [u32; 2usize], +} +impl _VAEncFEIDistortionH264 { + #[inline] + pub fn best_inter_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_best_inter_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn best_inter_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_best_inter_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn best_intra_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_best_intra_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn best_intra_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_best_intra_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn colocated_mb_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 16u8) as u32) } + } + #[inline] + pub fn set_colocated_mb_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn colocated_mb_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_colocated_mb_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + best_inter_distortion: u32, + best_intra_distortion: u32, + colocated_mb_distortion: u32, + reserved0: u32, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let best_inter_distortion: u32 = unsafe { ::std::mem::transmute(best_inter_distortion) }; + best_inter_distortion as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let best_intra_distortion: u32 = unsafe { ::std::mem::transmute(best_intra_distortion) }; + best_intra_distortion as u64 + }); + __bindgen_bitfield_unit.set(32usize, 16u8, { + let colocated_mb_distortion: u32 = unsafe { ::std::mem::transmute(colocated_mb_distortion) }; + colocated_mb_distortion as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief VAEncFEIDistortionH264 defines the data structure for VAEncFEIDistortionBufferType per 16x16 MB block.\n It is output buffer of ENC and ENC_PAK modes, The 16x16 block is in raster scan order.\n Buffer size shall not be less than the number of 16x16 blocks multiple by sizeof(VAEncFEIDistortionH264)."] +pub type VAEncFEIDistortionH264 = _VAEncFEIDistortionH264; +#[doc = " \\brief Motion Vector and Statistics frame level controls.\n VAStatsStatisticsParameterBufferType for H264 16x16 block"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAStatsStatisticsParameterH264 { + pub stats_params: VAStatsStatisticsParameter, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, + pub reserved4: [u32; 2usize], +} +impl Default for _VAStatsStatisticsParameterH264 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl _VAStatsStatisticsParameterH264 { + #[inline] + pub fn frame_qp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_frame_qp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn frame_qp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_frame_qp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn len_sp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + } + #[inline] + pub fn set_len_sp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn len_sp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_len_sp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn search_path(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } + } + #[inline] + pub fn set_search_path(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn search_path_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_path_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_mb_part_mask(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 7u8) as u32) } + } + #[inline] + pub fn set_sub_mb_part_mask(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_mb_part_mask_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_mb_part_mask_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn sub_pel_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 2u8) as u32) } + } + #[inline] + pub fn set_sub_pel_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(39usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn sub_pel_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 39usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_sub_pel_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 39usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn inter_sad(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(41usize, 2u8) as u32) } + } + #[inline] + pub fn set_inter_sad(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(41usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn inter_sad_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 41usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_inter_sad_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 41usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_sad(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(43usize, 2u8) as u32) } + } + #[inline] + pub fn set_intra_sad(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(43usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_sad_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 43usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_sad_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 43usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn adaptive_search(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(45usize, 1u8) as u32) } + } + #[inline] + pub fn set_adaptive_search(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(45usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn adaptive_search_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 45usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_adaptive_search_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 45usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mv_predictor_ctrl(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(46usize, 3u8) as u32) } + } + #[inline] + pub fn set_mv_predictor_ctrl(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(46usize, 3u8, val as u64) + } + } + #[inline] + pub unsafe fn mv_predictor_ctrl_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 46usize, + 3u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mv_predictor_ctrl_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 46usize, + 3u8, + val as u64, + ) + } + } + #[inline] + pub fn mb_qp(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(49usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_qp(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(49usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_qp_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 49usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_qp_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 49usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ft_enable(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(50usize, 1u8) as u32) } + } + #[inline] + pub fn set_ft_enable(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(50usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ft_enable_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 50usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ft_enable_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 50usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_part_mask(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(51usize, 5u8) as u32) } + } + #[inline] + pub fn set_intra_part_mask(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(51usize, 5u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_part_mask_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 51usize, + 5u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_part_mask_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 51usize, + 5u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } + } + #[inline] + pub fn set_reserved1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(56usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 56usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 56usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_width(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_width(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_width_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_width_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_height(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(72usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_height(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(72usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_height_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 72usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_height_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 72usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn search_window(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 4u8) as u32) } + } + #[inline] + pub fn set_search_window(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn search_window_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_search_window_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved2(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(84usize, 12u8) as u32) } + } + #[inline] + pub fn set_reserved2(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(84usize, 12u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved2_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 84usize, + 12u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved2_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 84usize, + 12u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_mv_output(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(96usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_mv_output(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(96usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_mv_output_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 96usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_mv_output_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 96usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn disable_statistics_output(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(97usize, 1u8) as u32) } + } + #[inline] + pub fn set_disable_statistics_output(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(97usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disable_statistics_output_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 97usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_disable_statistics_output_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 97usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_8x8_statistics(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(98usize, 1u8) as u32) } + } + #[inline] + pub fn set_enable_8x8_statistics(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(98usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_8x8_statistics_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 98usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_enable_8x8_statistics_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 98usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved3(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(99usize, 29u8) as u32) } + } + #[inline] + pub fn set_reserved3(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(99usize, 29u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved3_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 99usize, + 29u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved3_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 99usize, + 29u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + frame_qp: u32, + len_sp: u32, + search_path: u32, + reserved0: u32, + sub_mb_part_mask: u32, + sub_pel_mode: u32, + inter_sad: u32, + intra_sad: u32, + adaptive_search: u32, + mv_predictor_ctrl: u32, + mb_qp: u32, + ft_enable: u32, + intra_part_mask: u32, + reserved1: u32, + ref_width: u32, + ref_height: u32, + search_window: u32, + reserved2: u32, + disable_mv_output: u32, + disable_statistics_output: u32, + enable_8x8_statistics: u32, + reserved3: u32, + ) -> __BindgenBitfieldUnit<[u8; 16usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let frame_qp: u32 = unsafe { ::std::mem::transmute(frame_qp) }; + frame_qp as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let len_sp: u32 = unsafe { ::std::mem::transmute(len_sp) }; + len_sp as u64 + }); + __bindgen_bitfield_unit.set(16usize, 8u8, { + let search_path: u32 = unsafe { ::std::mem::transmute(search_path) }; + search_path as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 7u8, { + let sub_mb_part_mask: u32 = unsafe { ::std::mem::transmute(sub_mb_part_mask) }; + sub_mb_part_mask as u64 + }); + __bindgen_bitfield_unit.set(39usize, 2u8, { + let sub_pel_mode: u32 = unsafe { ::std::mem::transmute(sub_pel_mode) }; + sub_pel_mode as u64 + }); + __bindgen_bitfield_unit.set(41usize, 2u8, { + let inter_sad: u32 = unsafe { ::std::mem::transmute(inter_sad) }; + inter_sad as u64 + }); + __bindgen_bitfield_unit.set(43usize, 2u8, { + let intra_sad: u32 = unsafe { ::std::mem::transmute(intra_sad) }; + intra_sad as u64 + }); + __bindgen_bitfield_unit.set(45usize, 1u8, { + let adaptive_search: u32 = unsafe { ::std::mem::transmute(adaptive_search) }; + adaptive_search as u64 + }); + __bindgen_bitfield_unit.set(46usize, 3u8, { + let mv_predictor_ctrl: u32 = unsafe { ::std::mem::transmute(mv_predictor_ctrl) }; + mv_predictor_ctrl as u64 + }); + __bindgen_bitfield_unit.set(49usize, 1u8, { + let mb_qp: u32 = unsafe { ::std::mem::transmute(mb_qp) }; + mb_qp as u64 + }); + __bindgen_bitfield_unit.set(50usize, 1u8, { + let ft_enable: u32 = unsafe { ::std::mem::transmute(ft_enable) }; + ft_enable as u64 + }); + __bindgen_bitfield_unit.set(51usize, 5u8, { + let intra_part_mask: u32 = unsafe { ::std::mem::transmute(intra_part_mask) }; + intra_part_mask as u64 + }); + __bindgen_bitfield_unit.set(56usize, 8u8, { + let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 8u8, { + let ref_width: u32 = unsafe { ::std::mem::transmute(ref_width) }; + ref_width as u64 + }); + __bindgen_bitfield_unit.set(72usize, 8u8, { + let ref_height: u32 = unsafe { ::std::mem::transmute(ref_height) }; + ref_height as u64 + }); + __bindgen_bitfield_unit.set(80usize, 4u8, { + let search_window: u32 = unsafe { ::std::mem::transmute(search_window) }; + search_window as u64 + }); + __bindgen_bitfield_unit.set(84usize, 12u8, { + let reserved2: u32 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit.set(96usize, 1u8, { + let disable_mv_output: u32 = unsafe { ::std::mem::transmute(disable_mv_output) }; + disable_mv_output as u64 + }); + __bindgen_bitfield_unit.set(97usize, 1u8, { + let disable_statistics_output: u32 = unsafe { ::std::mem::transmute(disable_statistics_output) }; + disable_statistics_output as u64 + }); + __bindgen_bitfield_unit.set(98usize, 1u8, { + let enable_8x8_statistics: u32 = unsafe { ::std::mem::transmute(enable_8x8_statistics) }; + enable_8x8_statistics as u64 + }); + __bindgen_bitfield_unit.set(99usize, 29u8, { + let reserved3: u32 = unsafe { ::std::mem::transmute(reserved3) }; + reserved3 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief Motion Vector and Statistics frame level controls.\n VAStatsStatisticsParameterBufferType for H264 16x16 block"] +pub type VAStatsStatisticsParameterH264 = _VAStatsStatisticsParameterH264; +#[doc = " \\brief VAStatsStatisticsH264. H264 Statistics buffer layout for VAStatsStatisticsBufferType\n and VAStatsStatisticsBottomFieldBufferType(for interlaced only).\n Statistics output is per 16x16 block. Data structure per 16x16 block is defined below.\n The 16x16 block is in raster scan order. The buffer size shall be greater than or equal to\n the number of 16x16 blocks multiplied by sizeof(VAStatsStatisticsH264)."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAStatsStatisticsH264 { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, + pub sum_coef: u32, + pub _bitfield_align_2: [u32; 0], + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 4usize]>, + #[doc = " \\brief DWORD 6 variance for block16x16"] + pub variance_16x16: u32, + #[doc = " \\brief DWORD 7 ~ 10, variance for block8x8"] + pub variance_8x8: [u32; 4usize], + #[doc = " \\brief DWORD 11 pixel_average for block16x16"] + pub pixel_average_16x16: u32, + #[doc = " \\brief DWORD 12 ~ 15, pixel_average for block8x8"] + pub pixel_average_8x8: [u32; 4usize], +} +impl _VAStatsStatisticsH264 { + #[inline] + pub fn best_inter_distortion0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_best_inter_distortion0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn best_inter_distortion0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_best_inter_distortion0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn inter_mode0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_inter_mode0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn inter_mode0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_inter_mode0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn best_inter_distortion1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 16u8) as u32) } + } + #[inline] + pub fn set_best_inter_distortion1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn best_inter_distortion1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_best_inter_distortion1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn inter_mode1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 16u8) as u32) } + } + #[inline] + pub fn set_inter_mode1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(48usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn inter_mode1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 48usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_inter_mode1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 48usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn best_intra_distortion(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(64usize, 16u8) as u32) } + } + #[inline] + pub fn set_best_intra_distortion(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(64usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn best_intra_distortion_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 64usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_best_intra_distortion_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 64usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn intra_mode(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(80usize, 16u8) as u32) } + } + #[inline] + pub fn set_intra_mode(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(80usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn intra_mode_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 80usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_intra_mode_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 80usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn num_non_zero_coef(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(96usize, 16u8) as u32) } + } + #[inline] + pub fn set_num_non_zero_coef(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(96usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn num_non_zero_coef_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 96usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_num_non_zero_coef_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 96usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved0(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(112usize, 16u8) as u32) } + } + #[inline] + pub fn set_reserved0(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(112usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved0_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 16usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 112usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved0_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 16usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 112usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + best_inter_distortion0: u32, + inter_mode0: u32, + best_inter_distortion1: u32, + inter_mode1: u32, + best_intra_distortion: u32, + intra_mode: u32, + num_non_zero_coef: u32, + reserved0: u32, + ) -> __BindgenBitfieldUnit<[u8; 16usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let best_inter_distortion0: u32 = unsafe { ::std::mem::transmute(best_inter_distortion0) }; + best_inter_distortion0 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let inter_mode0: u32 = unsafe { ::std::mem::transmute(inter_mode0) }; + inter_mode0 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 16u8, { + let best_inter_distortion1: u32 = unsafe { ::std::mem::transmute(best_inter_distortion1) }; + best_inter_distortion1 as u64 + }); + __bindgen_bitfield_unit.set(48usize, 16u8, { + let inter_mode1: u32 = unsafe { ::std::mem::transmute(inter_mode1) }; + inter_mode1 as u64 + }); + __bindgen_bitfield_unit.set(64usize, 16u8, { + let best_intra_distortion: u32 = unsafe { ::std::mem::transmute(best_intra_distortion) }; + best_intra_distortion as u64 + }); + __bindgen_bitfield_unit.set(80usize, 16u8, { + let intra_mode: u32 = unsafe { ::std::mem::transmute(intra_mode) }; + intra_mode as u64 + }); + __bindgen_bitfield_unit.set(96usize, 16u8, { + let num_non_zero_coef: u32 = unsafe { ::std::mem::transmute(num_non_zero_coef) }; + num_non_zero_coef as u64 + }); + __bindgen_bitfield_unit.set(112usize, 16u8, { + let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit + } + #[inline] + pub fn mb_is_flat(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_is_flat(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mb_is_flat_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mb_is_flat_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved1(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved1(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved1_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_2), + 1usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved1_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_2), + 1usize, + 31u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_2(mb_is_flat: u32, reserved1: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let mb_is_flat: u32 = unsafe { ::std::mem::transmute(mb_is_flat) }; + mb_is_flat as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[doc = " \\brief VAStatsStatisticsH264. H264 Statistics buffer layout for VAStatsStatisticsBufferType\n and VAStatsStatisticsBottomFieldBufferType(for interlaced only).\n Statistics output is per 16x16 block. Data structure per 16x16 block is defined below.\n The 16x16 block is in raster scan order. The buffer size shall be greater than or equal to\n the number of 16x16 blocks multiplied by sizeof(VAStatsStatisticsH264)."] +pub type VAStatsStatisticsH264 = _VAStatsStatisticsH264; +pub const _VAProcFilterType_VAProcFilterNone: _VAProcFilterType = 0; +#[doc = " \\brief Noise reduction filter."] +pub const _VAProcFilterType_VAProcFilterNoiseReduction: _VAProcFilterType = 1; +#[doc = " \\brief Deinterlacing filter."] +pub const _VAProcFilterType_VAProcFilterDeinterlacing: _VAProcFilterType = 2; +#[doc = " \\brief Sharpening filter."] +pub const _VAProcFilterType_VAProcFilterSharpening: _VAProcFilterType = 3; +#[doc = " \\brief Color balance parameters."] +pub const _VAProcFilterType_VAProcFilterColorBalance: _VAProcFilterType = 4; +#[doc = " \\brief Skin Tone Enhancement."] +pub const _VAProcFilterType_VAProcFilterSkinToneEnhancement: _VAProcFilterType = 5; +#[doc = " \\brief Total Color Correction."] +pub const _VAProcFilterType_VAProcFilterTotalColorCorrection: _VAProcFilterType = 6; +#[doc = " \\brief Human Vision System(HVS) Noise reduction filter."] +pub const _VAProcFilterType_VAProcFilterHVSNoiseReduction: _VAProcFilterType = 7; +#[doc = " \\brief High Dynamic Range Tone Mapping."] +pub const _VAProcFilterType_VAProcFilterHighDynamicRangeToneMapping: _VAProcFilterType = 8; +#[doc = " \\brief Three-Dimensional Look Up Table (3DLUT)."] +pub const _VAProcFilterType_VAProcFilter3DLUT: _VAProcFilterType = 9; +#[doc = " \\brief Number of video filters."] +pub const _VAProcFilterType_VAProcFilterCount: _VAProcFilterType = 10; +#[doc = " \\brief Video filter types."] +pub type _VAProcFilterType = ::std::os::raw::c_uint; +#[doc = " \\brief Video filter types."] +pub use self::_VAProcFilterType as VAProcFilterType; +pub const _VAProcDeinterlacingType_VAProcDeinterlacingNone: _VAProcDeinterlacingType = 0; +#[doc = " \\brief Bob deinterlacing algorithm."] +pub const _VAProcDeinterlacingType_VAProcDeinterlacingBob: _VAProcDeinterlacingType = 1; +#[doc = " \\brief Weave deinterlacing algorithm."] +pub const _VAProcDeinterlacingType_VAProcDeinterlacingWeave: _VAProcDeinterlacingType = 2; +#[doc = " \\brief Motion adaptive deinterlacing algorithm."] +pub const _VAProcDeinterlacingType_VAProcDeinterlacingMotionAdaptive: _VAProcDeinterlacingType = 3; +#[doc = " \\brief Motion compensated deinterlacing algorithm."] +pub const _VAProcDeinterlacingType_VAProcDeinterlacingMotionCompensated: _VAProcDeinterlacingType = 4; +#[doc = " \\brief Number of deinterlacing algorithms."] +pub const _VAProcDeinterlacingType_VAProcDeinterlacingCount: _VAProcDeinterlacingType = 5; +#[doc = " \\brief Deinterlacing types."] +pub type _VAProcDeinterlacingType = ::std::os::raw::c_uint; +#[doc = " \\brief Deinterlacing types."] +pub use self::_VAProcDeinterlacingType as VAProcDeinterlacingType; +pub const _VAProcColorBalanceType_VAProcColorBalanceNone: _VAProcColorBalanceType = 0; +#[doc = " \\brief Hue."] +pub const _VAProcColorBalanceType_VAProcColorBalanceHue: _VAProcColorBalanceType = 1; +#[doc = " \\brief Saturation."] +pub const _VAProcColorBalanceType_VAProcColorBalanceSaturation: _VAProcColorBalanceType = 2; +#[doc = " \\brief Brightness."] +pub const _VAProcColorBalanceType_VAProcColorBalanceBrightness: _VAProcColorBalanceType = 3; +#[doc = " \\brief Contrast."] +pub const _VAProcColorBalanceType_VAProcColorBalanceContrast: _VAProcColorBalanceType = 4; +#[doc = " \\brief Automatically adjusted saturation."] +pub const _VAProcColorBalanceType_VAProcColorBalanceAutoSaturation: _VAProcColorBalanceType = 5; +#[doc = " \\brief Automatically adjusted brightness."] +pub const _VAProcColorBalanceType_VAProcColorBalanceAutoBrightness: _VAProcColorBalanceType = 6; +#[doc = " \\brief Automatically adjusted contrast."] +pub const _VAProcColorBalanceType_VAProcColorBalanceAutoContrast: _VAProcColorBalanceType = 7; +#[doc = " \\brief Number of color balance attributes."] +pub const _VAProcColorBalanceType_VAProcColorBalanceCount: _VAProcColorBalanceType = 8; +#[doc = " \\brief Color balance types."] +pub type _VAProcColorBalanceType = ::std::os::raw::c_uint; +#[doc = " \\brief Color balance types."] +pub use self::_VAProcColorBalanceType as VAProcColorBalanceType; +pub const _VAProcColorStandardType_VAProcColorStandardNone: _VAProcColorStandardType = 0; +#[doc = " \\brief ITU-R BT.601.\n\n It is unspecified whether this will use 525-line or 625-line values;\n specify the colour primaries and matrix coefficients explicitly if\n it is known which one is required.\n\n Equivalent to:\n colour_primaries = 5 or 6\n transfer_characteristics = 6\n matrix_coefficients = 5 or 6"] +pub const _VAProcColorStandardType_VAProcColorStandardBT601: _VAProcColorStandardType = 1; +#[doc = " \\brief ITU-R BT.709.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 1\n matrix_coefficients = 1"] +pub const _VAProcColorStandardType_VAProcColorStandardBT709: _VAProcColorStandardType = 2; +#[doc = " \\brief ITU-R BT.470-2 System M.\n\n Equivalent to:\n colour_primaries = 4\n transfer_characteristics = 4\n matrix_coefficients = 4"] +pub const _VAProcColorStandardType_VAProcColorStandardBT470M: _VAProcColorStandardType = 3; +#[doc = " \\brief ITU-R BT.470-2 System B, G.\n\n Equivalent to:\n colour_primaries = 5\n transfer_characteristics = 5\n matrix_coefficients = 5"] +pub const _VAProcColorStandardType_VAProcColorStandardBT470BG: _VAProcColorStandardType = 4; +#[doc = " \\brief SMPTE-170M.\n\n Equivalent to:\n colour_primaries = 6\n transfer_characteristics = 6\n matrix_coefficients = 6"] +pub const _VAProcColorStandardType_VAProcColorStandardSMPTE170M: _VAProcColorStandardType = 5; +#[doc = " \\brief SMPTE-240M.\n\n Equivalent to:\n colour_primaries = 7\n transfer_characteristics = 7\n matrix_coefficients = 7"] +pub const _VAProcColorStandardType_VAProcColorStandardSMPTE240M: _VAProcColorStandardType = 6; +#[doc = " \\brief Generic film.\n\n Equivalent to:\n colour_primaries = 8\n transfer_characteristics = 1\n matrix_coefficients = 1"] +pub const _VAProcColorStandardType_VAProcColorStandardGenericFilm: _VAProcColorStandardType = 7; +#[doc = " \\brief sRGB.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 13\n matrix_coefficients = 0"] +pub const _VAProcColorStandardType_VAProcColorStandardSRGB: _VAProcColorStandardType = 8; +#[doc = " \\brief stRGB.\n\n ???"] +pub const _VAProcColorStandardType_VAProcColorStandardSTRGB: _VAProcColorStandardType = 9; +#[doc = " \\brief xvYCC601.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 11\n matrix_coefficients = 5"] +pub const _VAProcColorStandardType_VAProcColorStandardXVYCC601: _VAProcColorStandardType = 10; +#[doc = " \\brief xvYCC709.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 11\n matrix_coefficients = 1"] +pub const _VAProcColorStandardType_VAProcColorStandardXVYCC709: _VAProcColorStandardType = 11; +#[doc = " \\brief ITU-R BT.2020.\n\n Equivalent to:\n colour_primaries = 9\n transfer_characteristics = 14\n matrix_coefficients = 9"] +pub const _VAProcColorStandardType_VAProcColorStandardBT2020: _VAProcColorStandardType = 12; +#[doc = " \\brief Explicitly specified color properties.\n\n Use corresponding color properties section.\n For example, HDR10 content:\n colour_primaries = 9 (BT2020)\n transfer_characteristics = 16 (SMPTE ST2084)\n matrix_coefficients = 9"] +pub const _VAProcColorStandardType_VAProcColorStandardExplicit: _VAProcColorStandardType = 13; +#[doc = " \\brief Number of color standards."] +pub const _VAProcColorStandardType_VAProcColorStandardCount: _VAProcColorStandardType = 14; +#[doc = " \\brief Color standard types.\n\n These define a set of color properties corresponding to particular\n video standards.\n\n Where matrix_coefficients is specified, it applies only to YUV data -\n RGB data always use the identity matrix (matrix_coefficients = 0)."] +pub type _VAProcColorStandardType = ::std::os::raw::c_uint; +#[doc = " \\brief Color standard types.\n\n These define a set of color properties corresponding to particular\n video standards.\n\n Where matrix_coefficients is specified, it applies only to YUV data -\n RGB data always use the identity matrix (matrix_coefficients = 0)."] +pub use self::_VAProcColorStandardType as VAProcColorStandardType; +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionNone: _VAProcTotalColorCorrectionType = 0; +#[doc = " \\brief Red Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionRed: _VAProcTotalColorCorrectionType = 1; +#[doc = " \\brief Green Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionGreen: _VAProcTotalColorCorrectionType = 2; +#[doc = " \\brief Blue Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionBlue: _VAProcTotalColorCorrectionType = 3; +#[doc = " \\brief Cyan Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionCyan: _VAProcTotalColorCorrectionType = 4; +#[doc = " \\brief Magenta Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionMagenta: _VAProcTotalColorCorrectionType = 5; +#[doc = " \\brief Yellow Saturation."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionYellow: _VAProcTotalColorCorrectionType = 6; +#[doc = " \\brief Number of color correction attributes."] +pub const _VAProcTotalColorCorrectionType_VAProcTotalColorCorrectionCount: _VAProcTotalColorCorrectionType = 7; +#[doc = " \\brief Total color correction types."] +pub type _VAProcTotalColorCorrectionType = ::std::os::raw::c_uint; +#[doc = " \\brief Total color correction types."] +pub use self::_VAProcTotalColorCorrectionType as VAProcTotalColorCorrectionType; +pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataNone: _VAProcHighDynamicRangeMetadataType = + 0; +#[doc = " \\brief Metadata type for HDR10."] +pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataHDR10: _VAProcHighDynamicRangeMetadataType = + 1; +#[doc = " \\brief Number of Metadata type."] +pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataTypeCount: + _VAProcHighDynamicRangeMetadataType = 2; +#[doc = " \\brief High Dynamic Range Metadata types."] +pub type _VAProcHighDynamicRangeMetadataType = ::std::os::raw::c_uint; +#[doc = " \\brief High Dynamic Range Metadata types."] +pub use self::_VAProcHighDynamicRangeMetadataType as VAProcHighDynamicRangeMetadataType; +#[doc = " \\brief Default Mode.\n In this mode, pipeline is decided in driver to the appropriate mode.\n e.g. a mode that's a balance between power and performance."] +pub const _VAProcMode_VAProcDefaultMode: _VAProcMode = 0; +#[doc = " \\brief Power Saving Mode.\n In this mode, pipeline is optimized for power saving."] +pub const _VAProcMode_VAProcPowerSavingMode: _VAProcMode = 1; +#[doc = " \\brief Performance Mode.\n In this mode, pipeline is optimized for performance."] +pub const _VAProcMode_VAProcPerformanceMode: _VAProcMode = 2; +#[doc = " \\brief Video Processing Mode."] +pub type _VAProcMode = ::std::os::raw::c_uint; +#[doc = " \\brief Video Processing Mode."] +pub use self::_VAProcMode as VAProcMode; +#[doc = " \\brief Video blending state definition."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct _VABlendState { + #[doc = " \\brief Video blending flags."] + pub flags: ::std::os::raw::c_uint, + #[doc = " \\brief Global alpha value.\n\n Valid if \\ref flags has VA_BLEND_GLOBAL_ALPHA.\n Valid range is 0.0 to 1.0 inclusive."] + pub global_alpha: f32, + #[doc = " \\brief Minimum luma value.\n\n Valid if \\ref flags has VA_BLEND_LUMA_KEY.\n Valid range is 0.0 to 1.0 inclusive.\n \\ref min_luma shall be set to a sensible value lower than \\ref max_luma."] + pub min_luma: f32, + #[doc = " \\brief Maximum luma value.\n\n Valid if \\ref flags has VA_BLEND_LUMA_KEY.\n Valid range is 0.0 to 1.0 inclusive.\n \\ref max_luma shall be set to a sensible value larger than \\ref min_luma."] + pub max_luma: f32, +} +#[doc = " \\brief Video blending state definition."] +pub type VABlendState = _VABlendState; +#[doc = " \\brief Video processing pipeline capabilities."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcPipelineCaps { + #[doc = " \\brief Pipeline flags. See VAProcPipelineParameterBuffer::pipeline_flags."] + pub pipeline_flags: u32, + #[doc = " \\brief Extra filter flags. See VAProcPipelineParameterBuffer::filter_flags."] + pub filter_flags: u32, + #[doc = " \\brief Number of forward reference frames that are needed."] + pub num_forward_references: u32, + #[doc = " \\brief Number of backward reference frames that are needed."] + pub num_backward_references: u32, + #[doc = " \\brief List of color standards supported on input."] + pub input_color_standards: *mut VAProcColorStandardType, + #[doc = " \\brief Number of elements in \\ref input_color_standards array."] + pub num_input_color_standards: u32, + #[doc = " \\brief List of color standards supported on output."] + pub output_color_standards: *mut VAProcColorStandardType, + #[doc = " \\brief Number of elements in \\ref output_color_standards array."] + pub num_output_color_standards: u32, + #[doc = " \\brief Rotation flags.\n\n For each rotation angle supported by the underlying hardware,\n the corresponding bit is set in \\ref rotation_flags. See\n \"Rotation angles\" for a description of rotation angles.\n\n A value of 0 means the underlying hardware does not support any\n rotation. Otherwise, a check for a specific rotation angle can be\n performed as follows:\n\n \\code\n VAProcPipelineCaps pipeline_caps;\n ...\n vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx,\n filter_bufs, num_filter_bufs,\n &pipeline_caps\n );\n ...\n if (pipeline_caps.rotation_flags & (1 << VA_ROTATION_xxx)) {\n // Clockwise rotation by xxx degrees is supported\n ...\n }\n \\endcode"] + pub rotation_flags: u32, + #[doc = " \\brief Blend flags. See \"Video blending flags\"."] + pub blend_flags: u32, + #[doc = " \\brief Mirroring flags.\n\n For each mirroring direction supported by the underlying hardware,\n the corresponding bit is set in \\ref mirror_flags. See\n \"Mirroring directions\" for a description of mirroring directions.\n"] + pub mirror_flags: u32, + #[doc = " \\brief Number of additional output surfaces supported by the pipeline"] + pub num_additional_outputs: u32, + #[doc = " \\brief Number of elements in \\ref input_pixel_format array."] + pub num_input_pixel_formats: u32, + #[doc = " \\brief List of input pixel formats in fourcc."] + pub input_pixel_format: *mut u32, + #[doc = " \\brief Number of elements in \\ref output_pixel_format array."] + pub num_output_pixel_formats: u32, + #[doc = " \\brief List of output pixel formats in fourcc."] + pub output_pixel_format: *mut u32, + #[doc = " \\brief Max supported input width in pixels."] + pub max_input_width: u32, + #[doc = " \\brief Max supported input height in pixels."] + pub max_input_height: u32, + #[doc = " \\brief Min supported input width in pixels."] + pub min_input_width: u32, + #[doc = " \\brief Min supported input height in pixels."] + pub min_input_height: u32, + #[doc = " \\brief Max supported output width in pixels."] + pub max_output_width: u32, + #[doc = " \\brief Max supported output height in pixels."] + pub max_output_height: u32, + #[doc = " \\brief Min supported output width in pixels."] + pub min_output_width: u32, + #[doc = " \\brief Min supported output height in pixels."] + pub min_output_height: u32, + #[cfg(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows))))] + pub va_reserved: [u32; 14usize], + #[cfg(not(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows)))))] + pub va_reserved: [u32; 16usize], +} +impl Default for _VAProcPipelineCaps { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Video processing pipeline capabilities."] +pub type VAProcPipelineCaps = _VAProcPipelineCaps; +#[doc = " \\brief Specification of values supported by the filter."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct _VAProcFilterValueRange { + #[doc = " \\brief Minimum value supported, inclusive."] + pub min_value: f32, + #[doc = " \\brief Maximum value supported, inclusive."] + pub max_value: f32, + #[doc = " \\brief Default value."] + pub default_value: f32, + #[doc = " \\brief Step value that alters the filter behaviour in a sensible way."] + pub step: f32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Specification of values supported by the filter."] +pub type VAProcFilterValueRange = _VAProcFilterValueRange; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcColorProperties { + #[doc = " Chroma sample location.\\c VA_CHROMA_SITING_VERTICAL_XXX | VA_CHROMA_SITING_HORIZONTAL_XXX"] + pub chroma_sample_location: u8, + #[doc = " Color range. \\c VA_SOURCE_RANGE_XXX"] + pub color_range: u8, + #[doc = " Colour primaries.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.1 and table 2.\n Only used if the color standard in use is \\c VAColorStandardExplicit.\n Below list the typical colour primaries for the reference.\n ---------------------------------------------------------------------------------\n | Value | Primaries | Informative Remark |\n --------------------------------------------------------------------------------\n | 1 |primary x y |Rec.ITU-R BT.709-5 |\n | |green 0.300 0.600 |IEC 61966-2-1(sRGB or sYCC) |\n | |blue 0.150 0.060 | |\n | |red 0.640 0.330 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------\n | 6 |primary x y |Rec.ITU-R BT.601-6 525 |\n | |green 0.310 0.595 | |\n | |blue 0.155 0.070 | |\n | |red 0.630 0.340 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------\n | 9 |primary x y |Rec.ITU-R BT.2020 |\n | |green 0.170 0.797 | |\n | |blue 0.131 0.046 | |\n | |red 0.708 0.292 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------"] + pub colour_primaries: u8, + #[doc = " Transfer characteristics.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.2 and table 3.\n Only used if the color standard in use is \\c VAColorStandardExplicit.\n Below list the typical transfer characteristics for the reference.\n -----------------------------------------------------------\n | Value | Informative Remark |\n -----------------------------------------------------------\n | 1 |Rec.ITU-R BT.709-5 |\n | |colour gamut system |\n -----------------------------------------------------------\n | 4 |Assumed display gamma 2.2 |\n -----------------------------------------------------------\n | 6 |Rec.ITU-R BT.601-6 525 or 625 |\n -----------------------------------------------------------\n | 8 |Linear transfer characteristics |\n -----------------------------------------------------------\n | 13 |IEC 61966-2-1(sRGB or sYCC) |\n -----------------------------------------------------------\n | 14,15 |Rec.ITU-R BT.2020 |\n -----------------------------------------------------------\n | 16 |SMPTE ST 2084 for 10,12,14 and 16bit system |\n -----------------------------------------------------------"] + pub transfer_characteristics: u8, + #[doc = " Matrix coefficients.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.3 and table 4.\n Only used if the color standard in use is \\c VAColorStandardExplicit."] + pub matrix_coefficients: u8, + #[doc = " Reserved bytes for future use, must be zero."] + pub reserved: [u8; 3usize], +} +pub type VAProcColorProperties = _VAProcColorProperties; +#[doc = " \\brief Capabilities specification for the High Dynamic Range filter."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterCapHighDynamicRange { + #[doc = " \\brief high dynamic range type."] + pub metadata_type: VAProcHighDynamicRangeMetadataType, + #[doc = " \\brief flag for high dynamic range tone mapping\n\n The flag is the combination of VA_TONE_MAPPING_XXX_TO_XXX.\n It could be VA_TONE_MAPPING_HDR_TO_HDR | VA_TONE_MAPPING_HDR_TO_SDR.\n SDR content to SDR display is always supported by default since it is legacy path."] + pub caps_flag: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u16; 16usize], +} +impl Default for _VAProcFilterCapHighDynamicRange { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Capabilities specification for the High Dynamic Range filter."] +pub type VAProcFilterCapHighDynamicRange = _VAProcFilterCapHighDynamicRange; +#[doc = " \\brief High Dynamic Range Meta Data."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAHdrMetaData { + #[doc = " \\brief high dynamic range metadata type, HDR10 etc."] + pub metadata_type: VAProcHighDynamicRangeMetadataType, + #[doc = " \\brief Pointer to high dynamic range metadata.\n\n The pointer could point to VAHdrMetaDataHDR10 or other HDR meta data."] + pub metadata: *mut ::std::os::raw::c_void, + #[doc = " \\brief Size of high dynamic range metadata."] + pub metadata_size: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub reserved: [u32; 4usize], +} +impl Default for _VAHdrMetaData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief High Dynamic Range Meta Data."] +pub type VAHdrMetaData = _VAHdrMetaData; +#[doc = " \\brief Video processing pipeline configuration.\n\n This buffer defines a video processing pipeline. The actual filters to\n be applied are provided in the \\c filters field, they can be re-used\n in other processing pipelines.\n\n The target surface is specified by the \\c render_target argument of\n \\c vaBeginPicture(). The general usage model is described as follows:\n - \\c vaBeginPicture(): specify the target surface that receives the\n processed output;\n - \\c vaRenderPicture(): specify a surface to be processed and composed\n into the \\c render_target. Use as many \\c vaRenderPicture() calls as\n necessary surfaces to compose ;\n - \\c vaEndPicture(): tell the driver to start processing the surfaces\n with the requested filters.\n\n If a filter (e.g. noise reduction) needs to be applied with different\n values for multiple surfaces, the application needs to create as many\n filter parameter buffers as necessary. i.e. the filter parameters shall\n not change between two calls to \\c vaRenderPicture().\n\n For composition usage models, the first surface to process will generally\n use an opaque background color, i.e. \\c output_background_color set with\n the most significant byte set to \\c 0xff. For instance, \\c 0xff000000 for\n a black background. Then, subsequent surfaces would use a transparent\n background color."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcPipelineParameterBuffer { + #[doc = " \\brief Source surface ID.\n\n ID of the source surface to process. If subpictures are associated\n with the video surfaces then they shall be rendered to the target\n surface, if the #VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set."] + pub surface: VASurfaceID, + #[doc = " \\brief Region within the source surface to be processed.\n\n Pointer to a #VARectangle defining the region within the source\n surface to be processed. If NULL, \\c surface_region implies the\n whole surface."] + pub surface_region: *const VARectangle, + #[doc = " \\brief Requested input color standard.\n\n Color properties are implicitly converted throughout the processing\n pipeline. The video processor chooses the best moment to apply\n this conversion. The set of supported color standards for input shall\n be queried with vaQueryVideoProcPipelineCaps().\n\n If this is set to VAProcColorStandardExplicit, the color properties\n are specified explicitly in input_color_properties instead."] + pub surface_color_standard: VAProcColorStandardType, + #[doc = " \\brief Region within the output surface.\n\n Pointer to a #VARectangle defining the region within the output\n surface that receives the processed pixels. If NULL, \\c output_region\n implies the whole surface.\n\n Note that any pixels residing outside the specified region will\n be filled in with the \\ref output_background_color."] + pub output_region: *const VARectangle, + #[doc = " \\brief Background color.\n\n Background color used to fill in pixels that reside outside of the\n specified \\ref output_region. The color is specified in ARGB format:\n [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.\n\n Unless the alpha value is zero or the \\ref output_region represents\n the whole target surface size, implementations shall not render the\n source surface to the target surface directly. Rather, in order to\n maintain the exact semantics of \\ref output_background_color, the\n driver shall use a temporary surface and fill it in with the\n appropriate background color. Next, the driver will blend this\n temporary surface into the target surface."] + pub output_background_color: u32, + #[doc = " \\brief Requested output color standard.\n\n If this is set to VAProcColorStandardExplicit, the color properties\n are specified explicitly in output_color_properties instead."] + pub output_color_standard: VAProcColorStandardType, + #[doc = " \\brief Pipeline filters. See video pipeline flags.\n\n Flags to control the pipeline, like whether to apply subpictures\n or not, notify the driver that it can opt for power optimizations,\n should this be needed."] + pub pipeline_flags: u32, + #[doc = " \\brief Extra filter flags. See vaPutSurface() flags.\n\n Filter flags are used as a fast path, wherever possible, to use\n vaPutSurface() flags instead of explicit filter parameter buffers.\n\n Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps()\n to check for implementation details:\n - Bob-deinterlacing: \\c VA_FRAME_PICTURE, \\c VA_TOP_FIELD,\n \\c VA_BOTTOM_FIELD. Note that any deinterlacing filter\n (#VAProcFilterDeinterlacing) will override those flags.\n - Color space conversion: \\c VA_SRC_BT601, \\c VA_SRC_BT709,\n \\c VA_SRC_SMPTE_240.\n - Scaling: \\c VA_FILTER_SCALING_DEFAULT, \\c VA_FILTER_SCALING_FAST,\n \\c VA_FILTER_SCALING_HQ, \\c VA_FILTER_SCALING_NL_ANAMORPHIC.\n - Interpolation Method: \\c VA_FILTER_INTERPOLATION_DEFAULT,\n \\c VA_FILTER_INTERPOLATION_NEAREST_NEIGHBOR,\n \\c VA_FILTER_INTERPOLATION_BILINEAR, \\c VA_FILTER_INTERPOLATION_ADVANCED."] + pub filter_flags: u32, + #[doc = " \\brief Array of filters to apply to the surface.\n\n The list of filters shall be ordered in the same way the driver expects\n them. i.e. as was returned from vaQueryVideoProcFilters().\n Otherwise, a #VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned\n from vaRenderPicture() with this buffer.\n\n #VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list\n contains an unsupported filter.\n"] + pub filters: *mut VABufferID, + #[doc = " \\brief Actual number of filters."] + pub num_filters: u32, + #[doc = " \\brief Array of forward reference frames (past frames)."] + pub forward_references: *mut VASurfaceID, + #[doc = " \\brief Number of forward reference frames that were supplied."] + pub num_forward_references: u32, + #[doc = " \\brief Array of backward reference frames (future frames)."] + pub backward_references: *mut VASurfaceID, + #[doc = " \\brief Number of backward reference frames that were supplied."] + pub num_backward_references: u32, + #[doc = " \\brief Rotation state. See rotation angles.\n\n The rotation angle is clockwise. There is no specific rotation\n center for this operation. Rather, The source \\ref surface is\n first rotated by the specified angle and then scaled to fit the\n \\ref output_region.\n\n This means that the top-left hand corner (0,0) of the output\n (rotated) surface is expressed as follows:\n - \\ref VA_ROTATION_NONE: (0,0) is the top left corner of the\n source surface -- no rotation is performed ;\n - \\ref VA_ROTATION_90: (0,0) is the bottom-left corner of the\n source surface ;\n - \\ref VA_ROTATION_180: (0,0) is the bottom-right corner of the\n source surface -- the surface is flipped around the X axis ;\n - \\ref VA_ROTATION_270: (0,0) is the top-right corner of the\n source surface.\n\n Check VAProcPipelineCaps::rotation_flags first prior to\n defining a specific rotation angle. Otherwise, the hardware can\n perfectly ignore this variable if it does not support any\n rotation."] + pub rotation_state: u32, + #[doc = " \\brief blending state. See \"Video blending state definition\".\n\n If \\ref blend_state is NULL, then default operation mode depends\n on the source \\ref surface format:\n - RGB: per-pixel alpha blending ;\n - YUV: no blending, i.e override the underlying pixels.\n\n Otherwise, \\ref blend_state is a pointer to a #VABlendState\n structure that shall be live until vaEndPicture().\n\n Implementation note: the driver is responsible for checking the\n blend state flags against the actual source \\ref surface format.\n e.g. premultiplied alpha blending is only applicable to RGB\n surfaces, and luma keying is only applicable to YUV surfaces.\n If a mismatch occurs, then #VA_STATUS_ERROR_INVALID_BLEND_STATE\n is returned."] + pub blend_state: *const VABlendState, + #[doc = " \\brief mirroring state. See \"Mirroring directions\".\n\n Mirroring of an image can be performed either along the\n horizontal or vertical axis. It is assumed that the rotation\n operation is always performed before the mirroring operation."] + pub mirror_state: u32, + #[doc = " \\brief Array of additional output surfaces."] + pub additional_outputs: *mut VASurfaceID, + #[doc = " \\brief Number of additional output surfaces."] + pub num_additional_outputs: u32, + #[doc = " \\brief Flag to indicate the input surface flag\n\n bit0~3: Surface sample type\n - 0000: Progressive --> VA_FRAME_PICTURE\n - 0001: Single Top Field --> VA_TOP_FIELD\n - 0010: Single Bottom Field --> VA_BOTTOM_FIELD\n - 0100: Interleaved Top Field First --> VA_TOP_FIELD_FIRST\n - 1000: Interleaved Bottom Field First --> VA_BOTTOM_FIELD_FIRST\n\n For interlaced scaling, examples as follow:\n - 1. Interleaved to Interleaved (Suppose input is top field first)\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_TOP_FIELD_FIRST\n - 2. Interleaved to Field (Suppose input is top field first)\n An interleaved frame need to be passed twice.\n First cycle to get the first field:\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_TOP_FIELD\n Second cycle to get the second field:\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_BOTTOM_FIELD\n - 3. Field to Interleaved (Suppose first field is top field)\n -- create two surfaces, one for top field, the other for bottom field\n -- set surface with the first field surface id\n -- set backward_reference with the second field surface id\n -- set input_surface_flag as VA_TOP_FIELD\n -- set output_surface_flag as VA_TOP_FIELD_FIRST\n - 4. Field to Field:\n -- set flag according to each frame.\n\n bit31: Surface encryption\n - 0: non-protected\n - 1: protected\n\n bit4~30 for future"] + pub input_surface_flag: u32, + #[doc = " \\brief Flag to indicate the output surface flag\n\n bit0~3: Surface sample type\n - 0000: Progressive --> VA_FRAME_PICTURE\n - 0001: Top Field --> VA_TOP_FIELD\n - 0010: Bottom Field --> VA_BOTTOM_FIELD\n - 0100: Top Field First --> VA_TOP_FIELD_FIRST\n - 1000: Bottom Field First --> VA_BOTTOM_FIELD_FIRST\n\n bit31: Surface encryption\n - 0: non-protected\n - 1: protected\n\n bit4~30 for future"] + pub output_surface_flag: u32, + #[doc = " \\brief Input Color Properties. See \"VAProcColorProperties\"."] + pub input_color_properties: VAProcColorProperties, + #[doc = " \\brief Output Color Properties. See \"VAProcColorProperties\"."] + pub output_color_properties: VAProcColorProperties, + #[doc = " \\brief Processing mode. See \"VAProcMode\"."] + pub processing_mode: VAProcMode, + #[doc = " \\brief Output High Dynamic Metadata.\n\n If output_metadata is NULL, then output default to SDR."] + pub output_hdr_metadata: *mut VAHdrMetaData, + #[cfg(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows))))] + pub va_reserved: [u32; 16usize], + #[cfg(not(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows)))))] + pub va_reserved: [u32; 19usize], +} +impl Default for _VAProcPipelineParameterBuffer { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Video processing pipeline configuration.\n\n This buffer defines a video processing pipeline. The actual filters to\n be applied are provided in the \\c filters field, they can be re-used\n in other processing pipelines.\n\n The target surface is specified by the \\c render_target argument of\n \\c vaBeginPicture(). The general usage model is described as follows:\n - \\c vaBeginPicture(): specify the target surface that receives the\n processed output;\n - \\c vaRenderPicture(): specify a surface to be processed and composed\n into the \\c render_target. Use as many \\c vaRenderPicture() calls as\n necessary surfaces to compose ;\n - \\c vaEndPicture(): tell the driver to start processing the surfaces\n with the requested filters.\n\n If a filter (e.g. noise reduction) needs to be applied with different\n values for multiple surfaces, the application needs to create as many\n filter parameter buffers as necessary. i.e. the filter parameters shall\n not change between two calls to \\c vaRenderPicture().\n\n For composition usage models, the first surface to process will generally\n use an opaque background color, i.e. \\c output_background_color set with\n the most significant byte set to \\c 0xff. For instance, \\c 0xff000000 for\n a black background. Then, subsequent surfaces would use a transparent\n background color."] +pub type VAProcPipelineParameterBuffer = _VAProcPipelineParameterBuffer; +#[doc = " \\brief Filter parameter buffer base.\n\n This is a helper structure used by driver implementations only.\n Users are not supposed to allocate filter parameter buffers of this\n type."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterParameterBufferBase { + #[doc = " \\brief Filter type."] + pub type_: VAProcFilterType, +} +impl Default for _VAProcFilterParameterBufferBase { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Filter parameter buffer base.\n\n This is a helper structure used by driver implementations only.\n Users are not supposed to allocate filter parameter buffers of this\n type."] +pub type VAProcFilterParameterBufferBase = _VAProcFilterParameterBufferBase; +#[doc = " \\brief Default filter parametrization.\n\n Unless there is a filter-specific parameter buffer,\n #VAProcFilterParameterBuffer is the default type to use."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct _VAProcFilterParameterBuffer { + #[doc = " \\brief Filter type."] + pub type_: VAProcFilterType, + #[doc = " \\brief Value."] + pub value: f32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAProcFilterParameterBuffer { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Default filter parametrization.\n\n Unless there is a filter-specific parameter buffer,\n #VAProcFilterParameterBuffer is the default type to use."] +pub type VAProcFilterParameterBuffer = _VAProcFilterParameterBuffer; +#[doc = " \\brief Deinterlacing filter parametrization."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterParameterBufferDeinterlacing { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilterDeinterlacing."] + pub type_: VAProcFilterType, + #[doc = " \\brief Deinterlacing algorithm."] + pub algorithm: VAProcDeinterlacingType, + #[doc = " \\brief Deinterlacing flags."] + pub flags: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAProcFilterParameterBufferDeinterlacing { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Deinterlacing filter parametrization."] +pub type VAProcFilterParameterBufferDeinterlacing = _VAProcFilterParameterBufferDeinterlacing; +#[doc = " \\brief Color balance filter parametrization.\n\n This buffer defines color balance attributes. A VA buffer can hold\n several color balance attributes by creating a VA buffer of desired\n number of elements. This can be achieved by the following pseudo-code:\n\n \\code\n enum { kHue, kSaturation, kBrightness, kContrast };\n\n // Initial color balance parameters\n static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =\n {\n [kHue] =\n { VAProcFilterColorBalance, VAProcColorBalanceHue, 0.5 },\n [kSaturation] =\n { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 },\n [kBrightness] =\n { VAProcFilterColorBalance, VAProcColorBalanceBrightness, 0.5 },\n [kSaturation] =\n { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 }\n };\n\n // Create buffer\n VABufferID colorBalanceBuffer;\n vaCreateBuffer(va_dpy, vpp_ctx,\n VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,\n colorBalanceParams,\n &colorBalanceBuffer\n );\n\n VAProcFilterParameterBufferColorBalance *pColorBalanceParam;\n vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);\n {\n // Change brightness only\n pColorBalanceBuffer[kBrightness].value = 0.75;\n }\n vaUnmapBuffer(va_dpy, colorBalanceBuffer);\n \\endcode"] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct _VAProcFilterParameterBufferColorBalance { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilterColorBalance."] + pub type_: VAProcFilterType, + #[doc = " \\brief Color balance attribute."] + pub attrib: VAProcColorBalanceType, + #[doc = " \\brief Color balance value.\n\n Special case for automatically adjusted attributes. e.g.\n #VAProcColorBalanceAutoSaturation,\n #VAProcColorBalanceAutoBrightness,\n #VAProcColorBalanceAutoContrast.\n - If \\ref value is \\c 1.0 +/- \\c FLT_EPSILON, the attribute is\n automatically adjusted and overrides any other attribute of\n the same type that would have been set explicitly;\n - If \\ref value is \\c 0.0 +/- \\c FLT_EPSILON, the attribute is\n disabled and other attribute of the same type is used instead."] + pub value: f32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAProcFilterParameterBufferColorBalance { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Color balance filter parametrization.\n\n This buffer defines color balance attributes. A VA buffer can hold\n several color balance attributes by creating a VA buffer of desired\n number of elements. This can be achieved by the following pseudo-code:\n\n \\code\n enum { kHue, kSaturation, kBrightness, kContrast };\n\n // Initial color balance parameters\n static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =\n {\n [kHue] =\n { VAProcFilterColorBalance, VAProcColorBalanceHue, 0.5 },\n [kSaturation] =\n { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 },\n [kBrightness] =\n { VAProcFilterColorBalance, VAProcColorBalanceBrightness, 0.5 },\n [kSaturation] =\n { VAProcFilterColorBalance, VAProcColorBalanceSaturation, 0.5 }\n };\n\n // Create buffer\n VABufferID colorBalanceBuffer;\n vaCreateBuffer(va_dpy, vpp_ctx,\n VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,\n colorBalanceParams,\n &colorBalanceBuffer\n );\n\n VAProcFilterParameterBufferColorBalance *pColorBalanceParam;\n vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);\n {\n // Change brightness only\n pColorBalanceBuffer[kBrightness].value = 0.75;\n }\n vaUnmapBuffer(va_dpy, colorBalanceBuffer);\n \\endcode"] +pub type VAProcFilterParameterBufferColorBalance = _VAProcFilterParameterBufferColorBalance; +#[doc = " \\brief Total color correction filter parametrization."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct _VAProcFilterParameterBufferTotalColorCorrection { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilterTotalColorCorrection."] + pub type_: VAProcFilterType, + #[doc = " \\brief Color to correct."] + pub attrib: VAProcTotalColorCorrectionType, + #[doc = " \\brief Color correction value."] + pub value: f32, +} +impl Default for _VAProcFilterParameterBufferTotalColorCorrection { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Total color correction filter parametrization."] +pub type VAProcFilterParameterBufferTotalColorCorrection = _VAProcFilterParameterBufferTotalColorCorrection; +#[doc = " \\brief Human Vision System(HVS) Noise reduction filter parametrization."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterParameterBufferHVSNoiseReduction { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilterHVSNoiseReduction."] + pub type_: VAProcFilterType, + #[doc = " \\brief QP for encoding, used for HVS Denoise"] + pub qp: u16, + #[doc = " \\brief QP to Noise Reduction Strength Mode, used for Human Vision System Based Noise Reduction.\n Controls Noise Reduction strength of conservative and aggressive mode.\n It is an integer from [0-16].\n Value 0 means completely turn off Noise Reduction;\n Value 16 means the most aggressive mode of Noise Reduction;\n Value 10 is the default value."] + pub strength: u16, + #[doc = " \\brief HVS Denoise Mode which controls denoise method.\n It is a value of VA_PROC_HVS_DENOISE_xxx.\n Please see the definition of VA_PROC_HVS_DENOISE_xxx."] + pub mode: u16, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u16; 15usize], +} +impl Default for _VAProcFilterParameterBufferHVSNoiseReduction { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Human Vision System(HVS) Noise reduction filter parametrization."] +pub type VAProcFilterParameterBufferHVSNoiseReduction = _VAProcFilterParameterBufferHVSNoiseReduction; +#[doc = " \\brief High Dynamic Range(HDR) Tone Mapping filter parametrization."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterParameterBufferHDRToneMapping { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilterHighDynamicRangeToneMapping."] + pub type_: VAProcFilterType, + #[doc = " \\brief High Dynamic Range metadata, could be HDR10 etc.\n\n This metadata is mainly for the input surface. Given that dynamic metadata is changing\n on frame-by-frame or scene-by-scene basis for HDR10 plus, differentiate the metadata\n for the input and output."] + pub data: VAHdrMetaData, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 16usize], +} +impl Default for _VAProcFilterParameterBufferHDRToneMapping { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief High Dynamic Range(HDR) Tone Mapping filter parametrization."] +pub type VAProcFilterParameterBufferHDRToneMapping = _VAProcFilterParameterBufferHDRToneMapping; +#[doc = " \\brief 3DLUT filter parametrization.\n\n 3DLUT (Three Dimensional Look Up Table) is often used when converting an image or a video frame\n from one color representation to another, for example, when converting log and gamma encodings,\n changing the color space, applying a color correction, changing the dynamic range, gamut mapping etc.\n\n This buffer defines 3DLUT attributes and memory layout. The typical 3DLUT has fixed number(lut_size)\n per dimension and memory layout is 3 dimensional array as 3dlut[stride_0][stride_1][stride_2] (lut_size\n shall be smaller than stride_0/1/2).\n\n API user should query hardware capability by using the VAProcFilterCap3DLUT to get the 3DLUT attributes\n which hardware supports, and use these attributes. For example, if the user queries hardware, the API user\n could get caps with 3dlut[33][33][64] (lut_size = 33, lut_stride[0/1/2] = 33/33/64). API user shall not\n use the attributes which hardware can not support.\n\n 3DLUT is usually used to transform input RGB/YUV values in one color space to output RGB values in another\n color space. Based on 1) the format and color space of VPP input and output and 2) 3DLUT memory layout and\n channel mapping, driver will enable some color space conversion implicitly if needed. For example, the input of\n VPP is P010 format in BT2020 color space, the output of VPP is NV12 in BT709 color space and the 3DLUT channel\n mapping is VA_3DLUT_CHANNEL_RGB_RGB, driver could build the data pipeline as P010(BT2020)->RGB(BT2020)\n ->3DULT(BT709)->NV12(BT709). Please note, the limitation of 3DLUT filter color space is that the color space of\n 3DLUT filter input data needs to be same as the input data of VPP; the color space of 3DLUT filter output data\n needs to be same as the output data of VPP; format does not have such limitation."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterParameterBuffer3DLUT { + #[doc = " \\brief Filter type. Shall be set to #VAProcFilter3DLUT."] + pub type_: VAProcFilterType, + #[doc = " \\brief lut_surface contains 3DLUT data in the 3DLUT memory layout, must be linear"] + pub lut_surface: VASurfaceID, + #[doc = " \\brief lut_size is the number of valid points on every dimension of the three dimensional look up table.\n The size of LUT (lut_size) shall be same among every dimension of the three dimensional look up table.\n The size of LUT (lut_size) shall be smaller than lut_stride[0/1/2]."] + pub lut_size: u16, + #[doc = " \\brief lut_stride are the number of points on every dimension of the three dimensional look up table.\n Three dimension can has 3 different stride, lut3d[lut_stride[0]][lut_stride[1]][lut_stride[2]].\n But the valid point shall start from 0, the range of valid point is [0, lut_size-1] for every dimension."] + pub lut_stride: [u16; 3usize], + #[doc = " \\brief bit_depth is the number of bits for every channel R, G or B (or Y, U, V)"] + pub bit_depth: u16, + #[doc = " \\brief num_channel is the number of channels"] + pub num_channel: u16, + #[doc = " \\brief channel_mapping defines the mapping of input and output channels, could be one of VA_3DLUT_CHANNEL_XXX"] + pub channel_mapping: u32, + #[doc = " \\brief reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 16usize], +} +impl Default for _VAProcFilterParameterBuffer3DLUT { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief 3DLUT filter parametrization.\n\n 3DLUT (Three Dimensional Look Up Table) is often used when converting an image or a video frame\n from one color representation to another, for example, when converting log and gamma encodings,\n changing the color space, applying a color correction, changing the dynamic range, gamut mapping etc.\n\n This buffer defines 3DLUT attributes and memory layout. The typical 3DLUT has fixed number(lut_size)\n per dimension and memory layout is 3 dimensional array as 3dlut[stride_0][stride_1][stride_2] (lut_size\n shall be smaller than stride_0/1/2).\n\n API user should query hardware capability by using the VAProcFilterCap3DLUT to get the 3DLUT attributes\n which hardware supports, and use these attributes. For example, if the user queries hardware, the API user\n could get caps with 3dlut[33][33][64] (lut_size = 33, lut_stride[0/1/2] = 33/33/64). API user shall not\n use the attributes which hardware can not support.\n\n 3DLUT is usually used to transform input RGB/YUV values in one color space to output RGB values in another\n color space. Based on 1) the format and color space of VPP input and output and 2) 3DLUT memory layout and\n channel mapping, driver will enable some color space conversion implicitly if needed. For example, the input of\n VPP is P010 format in BT2020 color space, the output of VPP is NV12 in BT709 color space and the 3DLUT channel\n mapping is VA_3DLUT_CHANNEL_RGB_RGB, driver could build the data pipeline as P010(BT2020)->RGB(BT2020)\n ->3DULT(BT709)->NV12(BT709). Please note, the limitation of 3DLUT filter color space is that the color space of\n 3DLUT filter input data needs to be same as the input data of VPP; the color space of 3DLUT filter output data\n needs to be same as the output data of VPP; format does not have such limitation."] +pub type VAProcFilterParameterBuffer3DLUT = _VAProcFilterParameterBuffer3DLUT; +#[doc = " \\brief Capabilities specification for the 3DLUT filter."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterCap3DLUT { + #[doc = " \\brief lut_size is the number of valid points on every dimension of the three dimensional look up table."] + pub lut_size: u16, + #[doc = " \\brief lut_stride are the number of points on every dimension of the three dimensional look up table. lut3d[lut_stride[0]][lut_stride[1]][lut_stride[2]]"] + pub lut_stride: [u16; 3usize], + #[doc = " \\brief bit_depth is the number of bits for every channel R, G or B (or Y, U, V)"] + pub bit_depth: u16, + #[doc = " \\brief num_channel is the number of channels"] + pub num_channel: u16, + #[doc = " \\brief channel_mapping defines the mapping of channels, could be some combination of VA_3DLUT_CHANNEL_XXX"] + pub channel_mapping: u32, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 16usize], +} +#[doc = " \\brief Capabilities specification for the 3DLUT filter."] +pub type VAProcFilterCap3DLUT = _VAProcFilterCap3DLUT; +#[doc = " \\brief Default filter cap specification (single range value).\n\n Unless there is a filter-specific cap structure, #VAProcFilterCap is the\n default type to use for output caps from vaQueryVideoProcFilterCaps()."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct _VAProcFilterCap { + #[doc = " \\brief Range of supported values for the filter."] + pub range: VAProcFilterValueRange, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +#[doc = " \\brief Default filter cap specification (single range value).\n\n Unless there is a filter-specific cap structure, #VAProcFilterCap is the\n default type to use for output caps from vaQueryVideoProcFilterCaps()."] +pub type VAProcFilterCap = _VAProcFilterCap; +#[doc = " \\brief Capabilities specification for the deinterlacing filter."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct _VAProcFilterCapDeinterlacing { + #[doc = " \\brief Deinterlacing algorithm."] + pub type_: VAProcDeinterlacingType, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAProcFilterCapDeinterlacing { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Capabilities specification for the deinterlacing filter."] +pub type VAProcFilterCapDeinterlacing = _VAProcFilterCapDeinterlacing; +#[doc = " \\brief Capabilities specification for the color balance filter."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct _VAProcFilterCapColorBalance { + #[doc = " \\brief Color balance operation."] + pub type_: VAProcColorBalanceType, + #[doc = " \\brief Range of supported values for the specified operation."] + pub range: VAProcFilterValueRange, + #[doc = " \\brief Reserved bytes for future use, must be zero"] + pub va_reserved: [u32; 4usize], +} +impl Default for _VAProcFilterCapColorBalance { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Capabilities specification for the color balance filter."] +pub type VAProcFilterCapColorBalance = _VAProcFilterCapColorBalance; +#[doc = " \\brief Capabilities specification for the Total Color Correction filter."] +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct _VAProcFilterCapTotalColorCorrection { + #[doc = " \\brief Color to correct."] + pub type_: VAProcTotalColorCorrectionType, + #[doc = " \\brief Range of supported values for the specified color."] + pub range: VAProcFilterValueRange, +} +impl Default for _VAProcFilterCapTotalColorCorrection { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[doc = " \\brief Capabilities specification for the Total Color Correction filter."] +pub type VAProcFilterCapTotalColorCorrection = _VAProcFilterCapTotalColorCorrection; +#[doc = " ProtectedSessions and Contexts\n\n According to #VAContextID, Context represents a \"virtual\" video decode,\n encode or video processing pipeline. Surfaces are render targets for a given\n context. The data in the surfaces are not accessible to the client except if\n derived image is supported and the internal data format of the surface is\n implementation specific. Application can create a video decode, encode or\n processing context which represents a \"virtualized\" hardware device.\n\n Since Protected Session does not virtualize any HW device or build any\n pipeline but rather accessorize existing virtualized HW device or pipeline\n to operate in protected mode so we decided to create separate function.\n Beside this, a virtualized HW device or pipeline could own several protected\n sessions and operate in those protected modes without ever re-creating\n virtualization of HW device or re-building HW pipeline (an unique protected\n environment multiplexing capability in Intel HW).\n\n The returned protected_session represents a notion of Host and TEE clients\n while representing protection status in GPU and Display.\n\n Both contexts and protected sessions are identified by unique IDs and its\n implementation specific internals are kept opaque to the clients"] +pub type VAProtectedSessionID = VAGenericID; +pub mod _bindgen_ty_1 { + #[doc = " \\brief DRM authentication type."] + pub type Type = ::std::os::raw::c_uint; + #[doc = " \\brief Disconnected."] + pub const VA_DRM_AUTH_NONE: Type = 0; + #[doc = " \\brief Connected. Authenticated with DRI1 protocol.\n\n @deprecated\n This is a deprecated authentication type. All DRI-based drivers have\n been migrated to use the DRI2 protocol. Newly written drivers shall\n use DRI2 protocol only, or a custom authentication means. e.g. opt\n for authenticating on the VA driver side, instead of libva side."] + pub const VA_DRM_AUTH_DRI1: Type = 1; + #[doc = " \\brief Connected. Authenticated with DRI2 protocol.\n\n This is only useful to VA/X11 drivers. The libva-x11 library provides\n a helper function VA_DRI2Authenticate() for authenticating the\n connection. However, DRI2 conformant drivers don't need to call that\n function since authentication happens on the libva side, implicitly."] + pub const VA_DRM_AUTH_DRI2: Type = 2; + #[doc = " \\brief Connected. Authenticated with some alternate raw protocol.\n\n This authentication mode is mainly used in non-VA/X11 drivers.\n Authentication happens through some alternative method, at the\n discretion of the VA driver implementation."] + pub const VA_DRM_AUTH_CUSTOM: Type = 3; +} +#[doc = " \\brief External buffer descriptor for a DRM PRIME surface.\n\n For export, call vaExportSurfaceHandle() with mem_type set to\n VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and pass a pointer to an\n instance of this structure to fill.\n If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each\n layer will contain exactly one plane. For example, an NV12\n surface will be exported as two layers, one of DRM_FORMAT_R8 and\n one of DRM_FORMAT_GR88.\n If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,\n there will be exactly one layer.\n\n For import, call vaCreateSurfaces() with the MemoryType attribute\n set to VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and the\n ExternalBufferDescriptor attribute set to point to an array of\n num_surfaces instances of this structure.\n The number of planes which need to be provided for a given layer\n is dependent on both the format and the format modifier used for\n the objects containing it. For example, the format DRM_FORMAT_RGBA\n normally requires one plane, but with the format modifier\n I915_FORMAT_MOD_Y_TILED_CCS it requires two planes - the first\n being the main data plane and the second containing the color\n control surface.\n Note that a given driver may only support a subset of possible\n representations of a particular format. For example, it may only\n support NV12 surfaces when they are contained within a single DRM\n object, and therefore fail to create such surfaces if the two\n planes are in different DRM objects.\n Note that backend driver will retrieve the resource represent by fd,\n and a valid surface ID is generated. Backend driver will not close\n the file descriptor. Application should handle the release of the fd.\n releasing the fd will not impact the existence of the surface."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIMESurfaceDescriptor { + #[doc = " Pixel format fourcc of the whole surface (VA_FOURCC_*)."] + pub fourcc: u32, + #[doc = " Width of the surface in pixels."] + pub width: u32, + #[doc = " Height of the surface in pixels."] + pub height: u32, + #[doc = " Number of distinct DRM objects making up the surface."] + pub num_objects: u32, + pub objects: [_VADRMPRIMESurfaceDescriptor__bindgen_ty_1; 4usize], + #[doc = " Number of layers making up the surface."] + pub num_layers: u32, + pub layers: [_VADRMPRIMESurfaceDescriptor__bindgen_ty_2; 4usize], +} +#[doc = " Description of each object."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIMESurfaceDescriptor__bindgen_ty_1 { + #[doc = " DRM PRIME file descriptor for this object."] + pub fd: ::std::os::raw::c_int, + #[doc = " Total size of this object (may include regions which are\n not part of the surface)."] + pub size: u32, + #[doc = " Format modifier applied to this object."] + pub drm_format_modifier: u64, +} +#[doc = " Description of each layer in the surface."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIMESurfaceDescriptor__bindgen_ty_2 { + #[doc = " DRM format fourcc of this layer (DRM_FOURCC_*)."] + pub drm_format: u32, + #[doc = " Number of planes in this layer."] + pub num_planes: u32, + #[doc = " Index in the objects array of the object containing each\n plane."] + pub object_index: [u32; 4usize], + #[doc = " Offset within the object of each plane."] + pub offset: [u32; 4usize], + #[doc = " Pitch of each plane."] + pub pitch: [u32; 4usize], +} +#[doc = " \\brief External buffer descriptor for a DRM PRIME surface.\n\n For export, call vaExportSurfaceHandle() with mem_type set to\n VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and pass a pointer to an\n instance of this structure to fill.\n If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each\n layer will contain exactly one plane. For example, an NV12\n surface will be exported as two layers, one of DRM_FORMAT_R8 and\n one of DRM_FORMAT_GR88.\n If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,\n there will be exactly one layer.\n\n For import, call vaCreateSurfaces() with the MemoryType attribute\n set to VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and the\n ExternalBufferDescriptor attribute set to point to an array of\n num_surfaces instances of this structure.\n The number of planes which need to be provided for a given layer\n is dependent on both the format and the format modifier used for\n the objects containing it. For example, the format DRM_FORMAT_RGBA\n normally requires one plane, but with the format modifier\n I915_FORMAT_MOD_Y_TILED_CCS it requires two planes - the first\n being the main data plane and the second containing the color\n control surface.\n Note that a given driver may only support a subset of possible\n representations of a particular format. For example, it may only\n support NV12 surfaces when they are contained within a single DRM\n object, and therefore fail to create such surfaces if the two\n planes are in different DRM objects.\n Note that backend driver will retrieve the resource represent by fd,\n and a valid surface ID is generated. Backend driver will not close\n the file descriptor. Application should handle the release of the fd.\n releasing the fd will not impact the existence of the surface."] +pub type VADRMPRIMESurfaceDescriptor = _VADRMPRIMESurfaceDescriptor; +#[doc = " \\brief External buffer descriptor for a DRM PRIME surface with flags\n\n This structure is an extention for VADRMPRIMESurfaceDescriptor,\n it has the same behavior as if used with VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2.\n\n The field \"flags\" is added, see \"Surface external buffer descriptor flags\".\n To use this structure, use VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3 instead."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIME3SurfaceDescriptor { + #[doc = " Pixel format fourcc of the whole surface (VA_FOURCC_*)."] + pub fourcc: u32, + #[doc = " Width of the surface in pixels."] + pub width: u32, + #[doc = " Height of the surface in pixels."] + pub height: u32, + #[doc = " Number of distinct DRM objects making up the surface."] + pub num_objects: u32, + pub objects: [_VADRMPRIME3SurfaceDescriptor__bindgen_ty_1; 4usize], + #[doc = " Number of layers making up the surface."] + pub num_layers: u32, + pub layers: [_VADRMPRIME3SurfaceDescriptor__bindgen_ty_2; 4usize], + #[doc = " \\brief flags. See \"Surface external buffer descriptor flags\"."] + pub flags: u32, + #[doc = " reserved bytes, must be zero"] + pub reserved: [u32; 7usize], +} +#[doc = " Description of each object."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIME3SurfaceDescriptor__bindgen_ty_1 { + #[doc = " DRM PRIME file descriptor for this object."] + pub fd: ::std::os::raw::c_int, + #[doc = " Total size of this object (may include regions which are\n not part of the surface)."] + pub size: u32, + #[doc = " Format modifier applied to this object."] + pub drm_format_modifier: u64, +} +#[doc = " Description of each layer in the surface."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] +pub struct _VADRMPRIME3SurfaceDescriptor__bindgen_ty_2 { + #[doc = " DRM format fourcc of this layer (DRM_FOURCC_*)."] + pub drm_format: u32, + #[doc = " Number of planes in this layer."] + pub num_planes: u32, + #[doc = " Index in the objects array of the object containing each\n plane."] + pub object_index: [u32; 4usize], + #[doc = " Offset within the object of each plane."] + pub offset: [u32; 4usize], + #[doc = " Pitch of each plane."] + pub pitch: [u32; 4usize], +} +#[doc = " \\brief External buffer descriptor for a DRM PRIME surface with flags\n\n This structure is an extention for VADRMPRIMESurfaceDescriptor,\n it has the same behavior as if used with VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2.\n\n The field \"flags\" is added, see \"Surface external buffer descriptor flags\".\n To use this structure, use VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_3 instead."] +pub type VADRMPRIME3SurfaceDescriptor = _VADRMPRIME3SurfaceDescriptor; +pub struct Va { + __library: ::libloading::Library, + pub vaErrorStr: + Result *const ::std::os::raw::c_char, ::libloading::Error>, + pub vaSetErrorCallback: Result< + unsafe extern "C" fn( + dpy: VADisplay, + callback: VAMessageCallback, + user_context: *mut ::std::os::raw::c_void, + ) -> VAMessageCallback, + ::libloading::Error, + >, + pub vaSetInfoCallback: Result< + unsafe extern "C" fn( + dpy: VADisplay, + callback: VAMessageCallback, + user_context: *mut ::std::os::raw::c_void, + ) -> VAMessageCallback, + ::libloading::Error, + >, + pub vaDisplayIsValid: Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaSetDriverName: Result< + unsafe extern "C" fn(dpy: VADisplay, driver_name: *mut ::std::os::raw::c_char) -> VAStatus, + ::libloading::Error, + >, + pub vaInitialize: Result< + unsafe extern "C" fn( + dpy: VADisplay, + major_version: *mut ::std::os::raw::c_int, + minor_version: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaTerminate: Result VAStatus, ::libloading::Error>, + pub vaQueryVendorString: + Result *const ::std::os::raw::c_char, ::libloading::Error>, + pub vaGetLibFunc: Result< + unsafe extern "C" fn(dpy: VADisplay, func: *const ::std::os::raw::c_char) -> VAPrivFunc, + ::libloading::Error, + >, + pub vaMaxNumProfiles: Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaMaxNumEntrypoints: Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaMaxNumConfigAttributes: + Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaQueryConfigProfiles: Result< + unsafe extern "C" fn( + dpy: VADisplay, + profile_list: *mut VAProfile::Type, + num_profiles: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQueryConfigEntrypoints: Result< + unsafe extern "C" fn( + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint_list: *mut VAEntrypoint::Type, + num_entrypoints: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaGetConfigAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint: VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateConfig: Result< + unsafe extern "C" fn( + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint: VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: ::std::os::raw::c_int, + config_id: *mut VAConfigID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroyConfig: + Result VAStatus, ::libloading::Error>, + pub vaQueryConfigAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + config_id: VAConfigID, + profile: *mut VAProfile::Type, + entrypoint: *mut VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQuerySurfaceAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + config: VAConfigID, + attrib_list: *mut VASurfaceAttrib, + num_attribs: *mut ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateSurfaces: Result< + unsafe extern "C" fn( + dpy: VADisplay, + format: ::std::os::raw::c_uint, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_uint, + attrib_list: *mut VASurfaceAttrib, + num_attribs: ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroySurfaces: Result< + unsafe extern "C" fn( + dpy: VADisplay, + surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateContext: Result< + unsafe extern "C" fn( + dpy: VADisplay, + config_id: VAConfigID, + picture_width: ::std::os::raw::c_int, + picture_height: ::std::os::raw::c_int, + flag: ::std::os::raw::c_int, + render_targets: *mut VASurfaceID, + num_render_targets: ::std::os::raw::c_int, + context: *mut VAContextID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroyContext: + Result VAStatus, ::libloading::Error>, + pub vaCreateMFContext: + Result VAStatus, ::libloading::Error>, + pub vaMFAddContext: Result< + unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, + ::libloading::Error, + >, + pub vaMFReleaseContext: Result< + unsafe extern "C" fn(dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus, + ::libloading::Error, + >, + pub vaQueryProcessingRate: Result< + unsafe extern "C" fn( + dpy: VADisplay, + config: VAConfigID, + proc_buf: *mut VAProcessingRateParameter, + processing_rate: *mut ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateBuffer: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + type_: VABufferType::Type, + size: ::std::os::raw::c_uint, + num_elements: ::std::os::raw::c_uint, + data: *mut ::std::os::raw::c_void, + buf_id: *mut VABufferID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateBuffer2: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + type_: VABufferType::Type, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + unit_size: *mut ::std::os::raw::c_uint, + pitch: *mut ::std::os::raw::c_uint, + buf_id: *mut VABufferID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaBufferSetNumElements: Result< + unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, num_elements: ::std::os::raw::c_uint) -> VAStatus, + ::libloading::Error, + >, + pub vaMapBuffer: Result< + unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut ::std::os::raw::c_void) -> VAStatus, + ::libloading::Error, + >, + pub vaMapBuffer2: Result< + unsafe extern "C" fn( + dpy: VADisplay, + buf_id: VABufferID, + pbuf: *mut *mut ::std::os::raw::c_void, + flags: u32, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaUnmapBuffer: + Result VAStatus, ::libloading::Error>, + pub vaDestroyBuffer: + Result VAStatus, ::libloading::Error>, + pub vaAcquireBufferHandle: Result< + unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, buf_info: *mut VABufferInfo) -> VAStatus, + ::libloading::Error, + >, + pub vaReleaseBufferHandle: + Result VAStatus, ::libloading::Error>, + pub vaExportSurfaceHandle: Result< + unsafe extern "C" fn( + dpy: VADisplay, + surface_id: VASurfaceID, + mem_type: u32, + flags: u32, + descriptor: *mut ::std::os::raw::c_void, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaBeginPicture: Result< + unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus, + ::libloading::Error, + >, + pub vaRenderPicture: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + buffers: *mut VABufferID, + num_buffers: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaEndPicture: + Result VAStatus, ::libloading::Error>, + pub vaMFSubmit: Result< + unsafe extern "C" fn( + dpy: VADisplay, + mf_context: VAMFContextID, + contexts: *mut VAContextID, + num_contexts: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaSyncSurface: + Result VAStatus, ::libloading::Error>, + pub vaSyncSurface2: Result< + unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, timeout_ns: u64) -> VAStatus, + ::libloading::Error, + >, + pub vaQuerySurfaceStatus: Result< + unsafe extern "C" fn( + dpy: VADisplay, + render_target: VASurfaceID, + status: *mut VASurfaceStatus::Type, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQuerySurfaceError: Result< + unsafe extern "C" fn( + dpy: VADisplay, + surface: VASurfaceID, + error_status: VAStatus, + error_info: *mut *mut ::std::os::raw::c_void, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaSyncBuffer: Result< + unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, timeout_ns: u64) -> VAStatus, + ::libloading::Error, + >, + pub vaMaxNumImageFormats: + Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaQueryImageFormats: Result< + unsafe extern "C" fn( + dpy: VADisplay, + format_list: *mut VAImageFormat, + num_formats: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateImage: Result< + unsafe extern "C" fn( + dpy: VADisplay, + format: *mut VAImageFormat, + width: ::std::os::raw::c_int, + height: ::std::os::raw::c_int, + image: *mut VAImage, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroyImage: Result VAStatus, ::libloading::Error>, + pub vaSetImagePalette: Result< + unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, palette: *mut ::std::os::raw::c_uchar) -> VAStatus, + ::libloading::Error, + >, + pub vaGetImage: Result< + unsafe extern "C" fn( + dpy: VADisplay, + surface: VASurfaceID, + x: ::std::os::raw::c_int, + y: ::std::os::raw::c_int, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + image: VAImageID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaPutImage: Result< + unsafe extern "C" fn( + dpy: VADisplay, + surface: VASurfaceID, + image: VAImageID, + src_x: ::std::os::raw::c_int, + src_y: ::std::os::raw::c_int, + src_width: ::std::os::raw::c_uint, + src_height: ::std::os::raw::c_uint, + dest_x: ::std::os::raw::c_int, + dest_y: ::std::os::raw::c_int, + dest_width: ::std::os::raw::c_uint, + dest_height: ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDeriveImage: Result< + unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus, + ::libloading::Error, + >, + pub vaMaxNumSubpictureFormats: + Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaQuerySubpictureFormats: Result< + unsafe extern "C" fn( + dpy: VADisplay, + format_list: *mut VAImageFormat, + flags: *mut ::std::os::raw::c_uint, + num_formats: *mut ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateSubpicture: Result< + unsafe extern "C" fn(dpy: VADisplay, image: VAImageID, subpicture: *mut VASubpictureID) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroySubpicture: + Result VAStatus, ::libloading::Error>, + pub vaSetSubpictureImage: Result< + unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, image: VAImageID) -> VAStatus, + ::libloading::Error, + >, + pub vaSetSubpictureChromakey: Result< + unsafe extern "C" fn( + dpy: VADisplay, + subpicture: VASubpictureID, + chromakey_min: ::std::os::raw::c_uint, + chromakey_max: ::std::os::raw::c_uint, + chromakey_mask: ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaSetSubpictureGlobalAlpha: Result< + unsafe extern "C" fn(dpy: VADisplay, subpicture: VASubpictureID, global_alpha: f32) -> VAStatus, + ::libloading::Error, + >, + pub vaAssociateSubpicture: Result< + unsafe extern "C" fn( + dpy: VADisplay, + subpicture: VASubpictureID, + target_surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + src_x: i16, + src_y: i16, + src_width: u16, + src_height: u16, + dest_x: i16, + dest_y: i16, + dest_width: u16, + dest_height: u16, + flags: u32, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDeassociateSubpicture: Result< + unsafe extern "C" fn( + dpy: VADisplay, + subpicture: VASubpictureID, + target_surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaMaxNumDisplayAttributes: + Result ::std::os::raw::c_int, ::libloading::Error>, + pub vaQueryDisplayAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: *mut ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaGetDisplayAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaSetDisplayAttributes: Result< + unsafe extern "C" fn( + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: ::std::os::raw::c_int, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCopy: Result< + unsafe extern "C" fn( + dpy: VADisplay, + dst: *mut VACopyObject, + src: *mut VACopyObject, + option: VACopyOption, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQueryVideoProcFilters: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + filters: *mut VAProcFilterType, + num_filters: *mut ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQueryVideoProcFilterCaps: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + type_: VAProcFilterType, + filter_caps: *mut ::std::os::raw::c_void, + num_filter_caps: *mut ::std::os::raw::c_uint, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaQueryVideoProcPipelineCaps: Result< + unsafe extern "C" fn( + dpy: VADisplay, + context: VAContextID, + filters: *mut VABufferID, + num_filters: ::std::os::raw::c_uint, + pipeline_caps: *mut VAProcPipelineCaps, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaCreateProtectedSession: Result< + unsafe extern "C" fn( + dpy: VADisplay, + config_id: VAConfigID, + protected_session: *mut VAProtectedSessionID, + ) -> VAStatus, + ::libloading::Error, + >, + pub vaDestroyProtectedSession: Result< + unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID) -> VAStatus, + ::libloading::Error, + >, + pub vaAttachProtectedSession: Result< + unsafe extern "C" fn(dpy: VADisplay, id: VAGenericID, protected_session: VAProtectedSessionID) -> VAStatus, + ::libloading::Error, + >, + pub vaDetachProtectedSession: + Result VAStatus, ::libloading::Error>, + pub vaProtectedSessionExecute: Result< + unsafe extern "C" fn(dpy: VADisplay, protected_session: VAProtectedSessionID, buf_id: VABufferID) -> VAStatus, + ::libloading::Error, + >, + pub vaGetDisplayDRM: Result VADisplay, ::libloading::Error>, +} +impl Va { + pub unsafe fn new

(path: P) -> Result + where + P: AsRef<::std::ffi::OsStr>, + { + let library = ::libloading::Library::new(path)?; + Self::from_library(library) + } + pub unsafe fn from_library(library: L) -> Result + where + L: Into<::libloading::Library>, + { + let __library = library.into(); + let vaErrorStr = __library.get(b"vaErrorStr\0").map(|sym| *sym); + let vaSetErrorCallback = __library.get(b"vaSetErrorCallback\0").map(|sym| *sym); + let vaSetInfoCallback = __library.get(b"vaSetInfoCallback\0").map(|sym| *sym); + let vaDisplayIsValid = __library.get(b"vaDisplayIsValid\0").map(|sym| *sym); + let vaSetDriverName = __library.get(b"vaSetDriverName\0").map(|sym| *sym); + let vaInitialize = __library.get(b"vaInitialize\0").map(|sym| *sym); + let vaTerminate = __library.get(b"vaTerminate\0").map(|sym| *sym); + let vaQueryVendorString = __library.get(b"vaQueryVendorString\0").map(|sym| *sym); + let vaGetLibFunc = __library.get(b"vaGetLibFunc\0").map(|sym| *sym); + let vaMaxNumProfiles = __library.get(b"vaMaxNumProfiles\0").map(|sym| *sym); + let vaMaxNumEntrypoints = __library.get(b"vaMaxNumEntrypoints\0").map(|sym| *sym); + let vaMaxNumConfigAttributes = __library.get(b"vaMaxNumConfigAttributes\0").map(|sym| *sym); + let vaQueryConfigProfiles = __library.get(b"vaQueryConfigProfiles\0").map(|sym| *sym); + let vaQueryConfigEntrypoints = __library.get(b"vaQueryConfigEntrypoints\0").map(|sym| *sym); + let vaGetConfigAttributes = __library.get(b"vaGetConfigAttributes\0").map(|sym| *sym); + let vaCreateConfig = __library.get(b"vaCreateConfig\0").map(|sym| *sym); + let vaDestroyConfig = __library.get(b"vaDestroyConfig\0").map(|sym| *sym); + let vaQueryConfigAttributes = __library.get(b"vaQueryConfigAttributes\0").map(|sym| *sym); + let vaQuerySurfaceAttributes = __library.get(b"vaQuerySurfaceAttributes\0").map(|sym| *sym); + let vaCreateSurfaces = __library.get(b"vaCreateSurfaces\0").map(|sym| *sym); + let vaDestroySurfaces = __library.get(b"vaDestroySurfaces\0").map(|sym| *sym); + let vaCreateContext = __library.get(b"vaCreateContext\0").map(|sym| *sym); + let vaDestroyContext = __library.get(b"vaDestroyContext\0").map(|sym| *sym); + let vaCreateMFContext = __library.get(b"vaCreateMFContext\0").map(|sym| *sym); + let vaMFAddContext = __library.get(b"vaMFAddContext\0").map(|sym| *sym); + let vaMFReleaseContext = __library.get(b"vaMFReleaseContext\0").map(|sym| *sym); + let vaQueryProcessingRate = __library.get(b"vaQueryProcessingRate\0").map(|sym| *sym); + let vaCreateBuffer = __library.get(b"vaCreateBuffer\0").map(|sym| *sym); + let vaCreateBuffer2 = __library.get(b"vaCreateBuffer2\0").map(|sym| *sym); + let vaBufferSetNumElements = __library.get(b"vaBufferSetNumElements\0").map(|sym| *sym); + let vaMapBuffer = __library.get(b"vaMapBuffer\0").map(|sym| *sym); + let vaMapBuffer2 = __library.get(b"vaMapBuffer2\0").map(|sym| *sym); + let vaUnmapBuffer = __library.get(b"vaUnmapBuffer\0").map(|sym| *sym); + let vaDestroyBuffer = __library.get(b"vaDestroyBuffer\0").map(|sym| *sym); + let vaAcquireBufferHandle = __library.get(b"vaAcquireBufferHandle\0").map(|sym| *sym); + let vaReleaseBufferHandle = __library.get(b"vaReleaseBufferHandle\0").map(|sym| *sym); + let vaExportSurfaceHandle = __library.get(b"vaExportSurfaceHandle\0").map(|sym| *sym); + let vaBeginPicture = __library.get(b"vaBeginPicture\0").map(|sym| *sym); + let vaRenderPicture = __library.get(b"vaRenderPicture\0").map(|sym| *sym); + let vaEndPicture = __library.get(b"vaEndPicture\0").map(|sym| *sym); + let vaMFSubmit = __library.get(b"vaMFSubmit\0").map(|sym| *sym); + let vaSyncSurface = __library.get(b"vaSyncSurface\0").map(|sym| *sym); + let vaSyncSurface2 = __library.get(b"vaSyncSurface2\0").map(|sym| *sym); + let vaQuerySurfaceStatus = __library.get(b"vaQuerySurfaceStatus\0").map(|sym| *sym); + let vaQuerySurfaceError = __library.get(b"vaQuerySurfaceError\0").map(|sym| *sym); + let vaSyncBuffer = __library.get(b"vaSyncBuffer\0").map(|sym| *sym); + let vaMaxNumImageFormats = __library.get(b"vaMaxNumImageFormats\0").map(|sym| *sym); + let vaQueryImageFormats = __library.get(b"vaQueryImageFormats\0").map(|sym| *sym); + let vaCreateImage = __library.get(b"vaCreateImage\0").map(|sym| *sym); + let vaDestroyImage = __library.get(b"vaDestroyImage\0").map(|sym| *sym); + let vaSetImagePalette = __library.get(b"vaSetImagePalette\0").map(|sym| *sym); + let vaGetImage = __library.get(b"vaGetImage\0").map(|sym| *sym); + let vaPutImage = __library.get(b"vaPutImage\0").map(|sym| *sym); + let vaDeriveImage = __library.get(b"vaDeriveImage\0").map(|sym| *sym); + let vaMaxNumSubpictureFormats = __library.get(b"vaMaxNumSubpictureFormats\0").map(|sym| *sym); + let vaQuerySubpictureFormats = __library.get(b"vaQuerySubpictureFormats\0").map(|sym| *sym); + let vaCreateSubpicture = __library.get(b"vaCreateSubpicture\0").map(|sym| *sym); + let vaDestroySubpicture = __library.get(b"vaDestroySubpicture\0").map(|sym| *sym); + let vaSetSubpictureImage = __library.get(b"vaSetSubpictureImage\0").map(|sym| *sym); + let vaSetSubpictureChromakey = __library.get(b"vaSetSubpictureChromakey\0").map(|sym| *sym); + let vaSetSubpictureGlobalAlpha = __library.get(b"vaSetSubpictureGlobalAlpha\0").map(|sym| *sym); + let vaAssociateSubpicture = __library.get(b"vaAssociateSubpicture\0").map(|sym| *sym); + let vaDeassociateSubpicture = __library.get(b"vaDeassociateSubpicture\0").map(|sym| *sym); + let vaMaxNumDisplayAttributes = __library.get(b"vaMaxNumDisplayAttributes\0").map(|sym| *sym); + let vaQueryDisplayAttributes = __library.get(b"vaQueryDisplayAttributes\0").map(|sym| *sym); + let vaGetDisplayAttributes = __library.get(b"vaGetDisplayAttributes\0").map(|sym| *sym); + let vaSetDisplayAttributes = __library.get(b"vaSetDisplayAttributes\0").map(|sym| *sym); + let vaCopy = __library.get(b"vaCopy\0").map(|sym| *sym); + let vaQueryVideoProcFilters = __library.get(b"vaQueryVideoProcFilters\0").map(|sym| *sym); + let vaQueryVideoProcFilterCaps = __library.get(b"vaQueryVideoProcFilterCaps\0").map(|sym| *sym); + let vaQueryVideoProcPipelineCaps = __library.get(b"vaQueryVideoProcPipelineCaps\0").map(|sym| *sym); + let vaCreateProtectedSession = __library.get(b"vaCreateProtectedSession\0").map(|sym| *sym); + let vaDestroyProtectedSession = __library.get(b"vaDestroyProtectedSession\0").map(|sym| *sym); + let vaAttachProtectedSession = __library.get(b"vaAttachProtectedSession\0").map(|sym| *sym); + let vaDetachProtectedSession = __library.get(b"vaDetachProtectedSession\0").map(|sym| *sym); + let vaProtectedSessionExecute = __library.get(b"vaProtectedSessionExecute\0").map(|sym| *sym); + let vaGetDisplayDRM = __library.get(b"vaGetDisplayDRM\0").map(|sym| *sym); + Ok(Va { + __library, + vaErrorStr, + vaSetErrorCallback, + vaSetInfoCallback, + vaDisplayIsValid, + vaSetDriverName, + vaInitialize, + vaTerminate, + vaQueryVendorString, + vaGetLibFunc, + vaMaxNumProfiles, + vaMaxNumEntrypoints, + vaMaxNumConfigAttributes, + vaQueryConfigProfiles, + vaQueryConfigEntrypoints, + vaGetConfigAttributes, + vaCreateConfig, + vaDestroyConfig, + vaQueryConfigAttributes, + vaQuerySurfaceAttributes, + vaCreateSurfaces, + vaDestroySurfaces, + vaCreateContext, + vaDestroyContext, + vaCreateMFContext, + vaMFAddContext, + vaMFReleaseContext, + vaQueryProcessingRate, + vaCreateBuffer, + vaCreateBuffer2, + vaBufferSetNumElements, + vaMapBuffer, + vaMapBuffer2, + vaUnmapBuffer, + vaDestroyBuffer, + vaAcquireBufferHandle, + vaReleaseBufferHandle, + vaExportSurfaceHandle, + vaBeginPicture, + vaRenderPicture, + vaEndPicture, + vaMFSubmit, + vaSyncSurface, + vaSyncSurface2, + vaQuerySurfaceStatus, + vaQuerySurfaceError, + vaSyncBuffer, + vaMaxNumImageFormats, + vaQueryImageFormats, + vaCreateImage, + vaDestroyImage, + vaSetImagePalette, + vaGetImage, + vaPutImage, + vaDeriveImage, + vaMaxNumSubpictureFormats, + vaQuerySubpictureFormats, + vaCreateSubpicture, + vaDestroySubpicture, + vaSetSubpictureImage, + vaSetSubpictureChromakey, + vaSetSubpictureGlobalAlpha, + vaAssociateSubpicture, + vaDeassociateSubpicture, + vaMaxNumDisplayAttributes, + vaQueryDisplayAttributes, + vaGetDisplayAttributes, + vaSetDisplayAttributes, + vaCopy, + vaQueryVideoProcFilters, + vaQueryVideoProcFilterCaps, + vaQueryVideoProcPipelineCaps, + vaCreateProtectedSession, + vaDestroyProtectedSession, + vaAttachProtectedSession, + vaDetachProtectedSession, + vaProtectedSessionExecute, + vaGetDisplayDRM, + }) + } + #[doc = " Returns a short english description of error_status"] + pub unsafe fn vaErrorStr(&self, error_status: VAStatus) -> *const ::std::os::raw::c_char { + (self.vaErrorStr.as_ref().expect("Expected function, got error."))(error_status) + } + #[doc = " Set the callback for error messages, or NULL for no logging.\n Returns the previous one, or NULL if it was disabled."] + pub unsafe fn vaSetErrorCallback( + &self, + dpy: VADisplay, + callback: VAMessageCallback, + user_context: *mut ::std::os::raw::c_void, + ) -> VAMessageCallback { + (self.vaSetErrorCallback.as_ref().expect("Expected function, got error."))(dpy, callback, user_context) + } + #[doc = " Set the callback for info messages, or NULL for no logging.\n Returns the previous one, or NULL if it was disabled."] + pub unsafe fn vaSetInfoCallback( + &self, + dpy: VADisplay, + callback: VAMessageCallback, + user_context: *mut ::std::os::raw::c_void, + ) -> VAMessageCallback { + (self.vaSetInfoCallback.as_ref().expect("Expected function, got error."))(dpy, callback, user_context) + } + pub unsafe fn vaDisplayIsValid(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self.vaDisplayIsValid.as_ref().expect("Expected function, got error."))(dpy) + } + #[doc = " Set the override driver name instead of queried driver driver."] + pub unsafe fn vaSetDriverName(&self, dpy: VADisplay, driver_name: *mut ::std::os::raw::c_char) -> VAStatus { + (self.vaSetDriverName.as_ref().expect("Expected function, got error."))(dpy, driver_name) + } + #[doc = " Initialize the library"] + pub unsafe fn vaInitialize( + &self, + dpy: VADisplay, + major_version: *mut ::std::os::raw::c_int, + minor_version: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self.vaInitialize.as_ref().expect("Expected function, got error."))(dpy, major_version, minor_version) + } + #[doc = " After this call, all library internal resources will be cleaned up"] + pub unsafe fn vaTerminate(&self, dpy: VADisplay) -> VAStatus { + (self.vaTerminate.as_ref().expect("Expected function, got error."))(dpy) + } + #[doc = " vaQueryVendorString returns a pointer to a zero-terminated string\n describing some aspects of the VA implemenation on a specific\n hardware accelerator. The format of the returned string is vendor\n specific and at the discretion of the implementer.\n e.g. for the Intel GMA500 implementation, an example would be:\n \"Intel GMA500 - 2.0.0.32L.0005\""] + pub unsafe fn vaQueryVendorString(&self, dpy: VADisplay) -> *const ::std::os::raw::c_char { + (self + .vaQueryVendorString + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Return a function pointer given a function name in the library.\n This allows private interfaces into the library"] + pub unsafe fn vaGetLibFunc(&self, dpy: VADisplay, func: *const ::std::os::raw::c_char) -> VAPrivFunc { + (self.vaGetLibFunc.as_ref().expect("Expected function, got error."))(dpy, func) + } + #[doc = " Get maximum number of profiles supported by the implementation"] + pub unsafe fn vaMaxNumProfiles(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self.vaMaxNumProfiles.as_ref().expect("Expected function, got error."))(dpy) + } + #[doc = " Get maximum number of entrypoints supported by the implementation"] + pub unsafe fn vaMaxNumEntrypoints(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self + .vaMaxNumEntrypoints + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Get maximum number of attributs supported by the implementation"] + pub unsafe fn vaMaxNumConfigAttributes(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self + .vaMaxNumConfigAttributes + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Query supported profiles\n The caller must provide a \"profile_list\" array that can hold at\n least vaMaxNumProfile() entries. The actual number of profiles\n returned in \"profile_list\" is returned in \"num_profile\"."] + pub unsafe fn vaQueryConfigProfiles( + &self, + dpy: VADisplay, + profile_list: *mut VAProfile::Type, + num_profiles: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaQueryConfigProfiles + .as_ref() + .expect("Expected function, got error."))(dpy, profile_list, num_profiles) + } + #[doc = " Query supported entrypoints for a given profile\n The caller must provide an \"entrypoint_list\" array that can hold at\n least vaMaxNumEntrypoints() entries. The actual number of entrypoints\n returned in \"entrypoint_list\" is returned in \"num_entrypoints\"."] + pub unsafe fn vaQueryConfigEntrypoints( + &self, + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint_list: *mut VAEntrypoint::Type, + num_entrypoints: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaQueryConfigEntrypoints + .as_ref() + .expect("Expected function, got error."))(dpy, profile, entrypoint_list, num_entrypoints) + } + #[doc = " Get attributes for a given profile/entrypoint pair\n The caller must provide an \"attrib_list\" with all attributes to be\n retrieved. Upon return, the attributes in \"attrib_list\" have been\n updated with their value. Unknown attributes or attributes that are\n not supported for the given profile/entrypoint pair will have their\n value set to VA_ATTRIB_NOT_SUPPORTED"] + pub unsafe fn vaGetConfigAttributes( + &self, + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint: VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaGetConfigAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, profile, entrypoint, attrib_list, num_attribs) + } + #[doc = " Create a configuration for the video decode/encode/processing pipeline\n it passes in the attribute list that specifies the attributes it cares\n about, with the rest taking default values."] + pub unsafe fn vaCreateConfig( + &self, + dpy: VADisplay, + profile: VAProfile::Type, + entrypoint: VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: ::std::os::raw::c_int, + config_id: *mut VAConfigID, + ) -> VAStatus { + (self.vaCreateConfig.as_ref().expect("Expected function, got error."))( + dpy, + profile, + entrypoint, + attrib_list, + num_attribs, + config_id, + ) + } + #[doc = " Free resources associdated with a given config"] + pub unsafe fn vaDestroyConfig(&self, dpy: VADisplay, config_id: VAConfigID) -> VAStatus { + (self.vaDestroyConfig.as_ref().expect("Expected function, got error."))(dpy, config_id) + } + #[doc = " Query all attributes for a given configuration\n The profile of the configuration is returned in \"profile\"\n The entrypoint of the configuration is returned in \"entrypoint\"\n The caller must provide an \"attrib_list\" array that can hold at least\n vaMaxNumConfigAttributes() entries. The actual number of attributes\n returned in \"attrib_list\" is returned in \"num_attribs\""] + pub unsafe fn vaQueryConfigAttributes( + &self, + dpy: VADisplay, + config_id: VAConfigID, + profile: *mut VAProfile::Type, + entrypoint: *mut VAEntrypoint::Type, + attrib_list: *mut VAConfigAttrib, + num_attribs: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaQueryConfigAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, config_id, profile, entrypoint, attrib_list, num_attribs) + } + #[doc = " \\brief Queries surface attributes for the supplied config.\n\n This function queries for all supported attributes for the\n supplied VA \\c config. In particular, if the underlying hardware\n supports the creation of VA surfaces in various formats, then\n this function will enumerate all pixel formats that are supported.\n\n The \\c attrib_list array is allocated by the user and \\c\n num_attribs shall be initialized to the number of allocated\n elements in that array. Upon successful return, the actual number\n of attributes will be overwritten into \\c num_attribs. Otherwise,\n \\c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \\c num_attribs\n is adjusted to the number of elements that would be returned if\n enough space was available.\n\n Note: it is perfectly valid to pass NULL to the \\c attrib_list\n argument when vaQuerySurfaceAttributes() is used to determine the\n actual number of elements that need to be allocated.\n\n @param[in] dpy the VA display\n @param[in] config the config identifying a codec or a video\n processing pipeline\n @param[out] attrib_list the output array of #VASurfaceAttrib elements\n @param[in,out] num_attribs the number of elements allocated on\n input, the number of elements actually filled in output"] + pub unsafe fn vaQuerySurfaceAttributes( + &self, + dpy: VADisplay, + config: VAConfigID, + attrib_list: *mut VASurfaceAttrib, + num_attribs: *mut ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaQuerySurfaceAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, config, attrib_list, num_attribs) + } + #[doc = " \\brief Creates an array of surfaces\n\n Creates an array of surfaces. The optional list of attributes shall\n be constructed based on what the underlying hardware could expose\n through vaQuerySurfaceAttributes().\n\n @param[in] dpy the VA display\n @param[in] format the desired surface format. See \\c VA_RT_FORMAT_*\n @param[in] width the surface width\n @param[in] height the surface height\n @param[out] surfaces the array of newly created surfaces\n @param[in] num_surfaces the number of surfaces to create\n @param[in] attrib_list the list of (optional) attributes, or \\c NULL\n @param[in] num_attribs the number of attributes supplied in\n \\c attrib_list, or zero"] + pub unsafe fn vaCreateSurfaces( + &self, + dpy: VADisplay, + format: ::std::os::raw::c_uint, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_uint, + attrib_list: *mut VASurfaceAttrib, + num_attribs: ::std::os::raw::c_uint, + ) -> VAStatus { + (self.vaCreateSurfaces.as_ref().expect("Expected function, got error."))( + dpy, + format, + width, + height, + surfaces, + num_surfaces, + attrib_list, + num_attribs, + ) + } + #[doc = " vaDestroySurfaces - Destroy resources associated with surfaces.\n Surfaces can only be destroyed after all contexts using these surfaces have been\n destroyed.\n dpy: display\n surfaces: array of surfaces to destroy\n num_surfaces: number of surfaces in the array to be destroyed."] + pub unsafe fn vaDestroySurfaces( + &self, + dpy: VADisplay, + surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + ) -> VAStatus { + (self.vaDestroySurfaces.as_ref().expect("Expected function, got error."))(dpy, surfaces, num_surfaces) + } + #[doc = " vaCreateContext - Create a context\n dpy: display\n config_id: configuration for the context\n picture_width: coded picture width\n picture_height: coded picture height\n flag: any combination of the following:\n VA_PROGRESSIVE (only progressive frame pictures in the sequence when set)\n render_targets: a hint for render targets (surfaces) tied to the context\n num_render_targets: number of render targets in the above array\n context: created context id upon return"] + pub unsafe fn vaCreateContext( + &self, + dpy: VADisplay, + config_id: VAConfigID, + picture_width: ::std::os::raw::c_int, + picture_height: ::std::os::raw::c_int, + flag: ::std::os::raw::c_int, + render_targets: *mut VASurfaceID, + num_render_targets: ::std::os::raw::c_int, + context: *mut VAContextID, + ) -> VAStatus { + (self.vaCreateContext.as_ref().expect("Expected function, got error."))( + dpy, + config_id, + picture_width, + picture_height, + flag, + render_targets, + num_render_targets, + context, + ) + } + #[doc = " vaDestroyContext - Destroy a context\n dpy: display\n context: context to be destroyed"] + pub unsafe fn vaDestroyContext(&self, dpy: VADisplay, context: VAContextID) -> VAStatus { + (self.vaDestroyContext.as_ref().expect("Expected function, got error."))(dpy, context) + } + #[doc = " vaCreateMFContext - Create a multi-frame context\n interface encapsulating common for all streams memory objects and structures\n required for single GPU task submission from several VAContextID's.\n Allocation: This call only creates an instance, doesn't allocate any additional memory.\n Support identification: Application can identify multi-frame feature support by ability\n to create multi-frame context. If driver supports multi-frame - call successful,\n mf_context != NULL and VAStatus = VA_STATUS_SUCCESS, otherwise if multi-frame processing\n not supported driver returns VA_STATUS_ERROR_UNIMPLEMENTED and mf_context = NULL.\n return values:\n VA_STATUS_SUCCESS - operation successful.\n VA_STATUS_ERROR_UNIMPLEMENTED - no support for multi-frame.\n dpy: display adapter.\n mf_context: Multi-Frame context encapsulating all associated context\n for multi-frame submission."] + pub unsafe fn vaCreateMFContext(&self, dpy: VADisplay, mf_context: *mut VAMFContextID) -> VAStatus { + (self.vaCreateMFContext.as_ref().expect("Expected function, got error."))(dpy, mf_context) + } + #[doc = " vaMFAddContext - Provide ability to associate each context used for\n Multi-Frame submission and common Multi-Frame context.\n Try to add context to understand if it is supported.\n Allocation: this call allocates and/or reallocates all memory objects\n common for all contexts associated with particular Multi-Frame context.\n All memory required for each context(pixel buffers, internal driver\n buffers required for processing) allocated during standard vaCreateContext call for each context.\n Runtime dependency - if current implementation doesn't allow to run different entry points/profile,\n first context added will set entry point/profile for whole Multi-Frame context,\n all other entry points and profiles can be rejected to be added.\n Return values:\n VA_STATUS_SUCCESS - operation successful, context was added.\n VA_STATUS_ERROR_OPERATION_FAILED - something unexpected happened - application have to close\n current mf_context and associated contexts and start working with new ones.\n VA_STATUS_ERROR_INVALID_CONTEXT - ContextID is invalid, means:\n 1 - mf_context is not valid context or\n 2 - driver can't suport different VAEntrypoint or VAProfile simultaneosly\n and current context contradicts with previously added, application can continue with current mf_context\n and other contexts passed this call, rejected context can continue work in stand-alone\n mode or other mf_context.\n VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT - particular context being added was created with with\n unsupported VAEntrypoint. Application can continue with current mf_context\n and other contexts passed this call, rejected context can continue work in stand-alone\n mode.\n VA_STATUS_ERROR_UNSUPPORTED_PROFILE - Current context with Particular VAEntrypoint is supported\n but VAProfile is not supported. Application can continue with current mf_context\n and other contexts passed this call, rejected context can continue work in stand-alone\n mode.\n dpy: display adapter.\n context: context being associated with Multi-Frame context.\n mf_context: - multi-frame context used to associate contexts for multi-frame submission."] + pub unsafe fn vaMFAddContext(&self, dpy: VADisplay, mf_context: VAMFContextID, context: VAContextID) -> VAStatus { + (self.vaMFAddContext.as_ref().expect("Expected function, got error."))(dpy, mf_context, context) + } + #[doc = " vaMFReleaseContext - Removes context from multi-frame and\n association with multi-frame context.\n After association removed vaEndPicture will submit tasks, but not vaMFSubmit.\n Return values:\n VA_STATUS_SUCCESS - operation successful, context was removed.\n VA_STATUS_ERROR_OPERATION_FAILED - something unexpected happened.\n application need to destroy this VAMFContextID and all assotiated VAContextID\n dpy: display\n mf_context: VAMFContextID where context is added\n context: VAContextID to be added"] + pub unsafe fn vaMFReleaseContext( + &self, + dpy: VADisplay, + mf_context: VAMFContextID, + context: VAContextID, + ) -> VAStatus { + (self.vaMFReleaseContext.as_ref().expect("Expected function, got error."))(dpy, mf_context, context) + } + #[doc = " \\brief Queries processing rate for the supplied config.\n\n This function queries the processing rate based on parameters in\n \\c proc_buf for the given \\c config. Upon successful return, the processing\n rate value will be stored in \\c processing_rate. Processing rate is\n specified as the number of macroblocks/CTU per second.\n\n If NULL is passed to the \\c proc_buf, the default processing rate for the\n given configuration will be returned.\n\n @param[in] dpy the VA display\n @param[in] config the config identifying a codec or a video\n processing pipeline\n @param[in] proc_buf the buffer that contains the parameters for\neither the encode or decode processing rate\n @param[out] processing_rate processing rate in number of macroblocks per\nsecond constrained by parameters specified in proc_buf\n"] + pub unsafe fn vaQueryProcessingRate( + &self, + dpy: VADisplay, + config: VAConfigID, + proc_buf: *mut VAProcessingRateParameter, + processing_rate: *mut ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaQueryProcessingRate + .as_ref() + .expect("Expected function, got error."))(dpy, config, proc_buf, processing_rate) + } + #[doc = " Creates a buffer for \"num_elements\" elements of \"size\" bytes and\n initalize with \"data\".\n if \"data\" is null, then the contents of the buffer data store\n are undefined.\n Basically there are two ways to get buffer data to the server side. One is\n to call vaCreateBuffer() with a non-null \"data\", which results the data being\n copied to the data store on the server side. A different method that\n eliminates this copy is to pass null as \"data\" when calling vaCreateBuffer(),\n and then use vaMapBuffer() to map the data store from the server side to the\n client address space for access.\n The user must call vaDestroyBuffer() to destroy a buffer.\n Note: image buffers are created by the library, not the client. Please see\n vaCreateImage on how image buffers are managed."] + pub unsafe fn vaCreateBuffer( + &self, + dpy: VADisplay, + context: VAContextID, + type_: VABufferType::Type, + size: ::std::os::raw::c_uint, + num_elements: ::std::os::raw::c_uint, + data: *mut ::std::os::raw::c_void, + buf_id: *mut VABufferID, + ) -> VAStatus { + (self.vaCreateBuffer.as_ref().expect("Expected function, got error."))( + dpy, + context, + type_, + size, + num_elements, + data, + buf_id, + ) + } + #[doc = " Create a buffer for given width & height get unit_size, pitch, buf_id for 2D buffer\n for permb qp buffer, it will return unit_size for one MB or LCU and the pitch for alignments\n can call vaMapBuffer with this Buffer ID to get virtual address.\n e.g. AVC 1080P encode, 1920x1088, the size in MB is 120x68,but inside driver,\n maybe it should align with 256, and one byte present one Qp.so, call the function.\n then get unit_size = 1, pitch = 256. call vaMapBuffer to get the virtual address (pBuf).\n then read write the memory like 2D. the size is 256x68, application can only use 120x68\n pBuf + 256 is the start of next line.\n different driver implementation maybe return different unit_size and pitch"] + pub unsafe fn vaCreateBuffer2( + &self, + dpy: VADisplay, + context: VAContextID, + type_: VABufferType::Type, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + unit_size: *mut ::std::os::raw::c_uint, + pitch: *mut ::std::os::raw::c_uint, + buf_id: *mut VABufferID, + ) -> VAStatus { + (self.vaCreateBuffer2.as_ref().expect("Expected function, got error."))( + dpy, context, type_, width, height, unit_size, pitch, buf_id, + ) + } + #[doc = " Convey to the server how many valid elements are in the buffer.\n e.g. if multiple slice parameters are being held in a single buffer,\n this will communicate to the server the number of slice parameters\n that are valid in the buffer."] + pub unsafe fn vaBufferSetNumElements( + &self, + dpy: VADisplay, + buf_id: VABufferID, + num_elements: ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaBufferSetNumElements + .as_ref() + .expect("Expected function, got error."))(dpy, buf_id, num_elements) + } + #[doc = " Map data store of the buffer into the client's address space\n vaCreateBuffer() needs to be called with \"data\" set to NULL before\n calling vaMapBuffer()\n\n if buffer type is VAEncCodedBufferType, pbuf points to link-list of\n VACodedBufferSegment, and the list is terminated if \"next\" is NULL"] + pub unsafe fn vaMapBuffer( + &self, + dpy: VADisplay, + buf_id: VABufferID, + pbuf: *mut *mut ::std::os::raw::c_void, + ) -> VAStatus { + (self.vaMapBuffer.as_ref().expect("Expected function, got error."))(dpy, buf_id, pbuf) + } + pub unsafe fn vaMapBuffer2( + &self, + dpy: VADisplay, + buf_id: VABufferID, + pbuf: *mut *mut ::std::os::raw::c_void, + flags: u32, + ) -> VAStatus { + (self.vaMapBuffer2.as_ref().expect("Expected function, got error."))(dpy, buf_id, pbuf, flags) + } + #[doc = " After client making changes to a mapped data store, it needs to\n \"Unmap\" it to let the server know that the data is ready to be\n consumed by the server"] + pub unsafe fn vaUnmapBuffer(&self, dpy: VADisplay, buf_id: VABufferID) -> VAStatus { + (self.vaUnmapBuffer.as_ref().expect("Expected function, got error."))(dpy, buf_id) + } + #[doc = " After this call, the buffer is deleted and this buffer_id is no longer valid\n\n A buffer can be re-used and sent to the server by another Begin/Render/End\n sequence if vaDestroyBuffer() is not called with this buffer.\n\n Note re-using a shared buffer (e.g. a slice data buffer) between the host and the\n hardware accelerator can result in performance dropping."] + pub unsafe fn vaDestroyBuffer(&self, dpy: VADisplay, buffer_id: VABufferID) -> VAStatus { + (self.vaDestroyBuffer.as_ref().expect("Expected function, got error."))(dpy, buffer_id) + } + #[doc = " \\brief Acquires buffer handle for external API usage\n\n Locks the VA buffer object \\ref buf_id for external API usage like\n EGL or OpenCL (OCL). This function is a synchronization point. This\n means that any pending operation is guaranteed to be completed\n prior to returning from the function.\n\n If the referenced VA buffer object is the backing store of a VA\n surface, then this function acts as if vaSyncSurface() on the\n parent surface was called first.\n\n The \\ref VABufferInfo argument shall be zero'ed on input. On\n successful output, the data structure is filled in with all the\n necessary buffer level implementation details like handle, type,\n memory type and memory size.\n\n Note: the external API implementation, or the application, can\n express the memory types it is interested in by filling in the \\ref\n mem_type field accordingly. On successful output, the memory type\n that fits best the request and that was used is updated in the \\ref\n VABufferInfo data structure. If none of the supplied memory types\n is supported, then a \\ref VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE\n error is returned.\n\n The \\ref VABufferInfo data is valid until vaReleaseBufferHandle()\n is called. Besides, no additional operation is allowed on any of\n the buffer parent object until vaReleaseBufferHandle() is called.\n e.g. decoding into a VA surface backed with the supplied VA buffer\n object \\ref buf_id would fail with a \\ref VA_STATUS_ERROR_SURFACE_BUSY\n error.\n\n Possible errors:\n - \\ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation\n does not support this interface\n - \\ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied\n - \\ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied\n - \\ref VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: the implementation\n does not support exporting buffers of the specified type\n - \\ref VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: none of the requested\n memory types in \\ref VABufferInfo.mem_type was supported\n\n @param[in] dpy the VA display\n @param[in] buf_id the VA buffer\n @param[in,out] buf_info the associated VA buffer information\n @return VA_STATUS_SUCCESS if successful"] + pub unsafe fn vaAcquireBufferHandle( + &self, + dpy: VADisplay, + buf_id: VABufferID, + buf_info: *mut VABufferInfo, + ) -> VAStatus { + (self + .vaAcquireBufferHandle + .as_ref() + .expect("Expected function, got error."))(dpy, buf_id, buf_info) + } + #[doc = " \\brief Releases buffer after usage from external API\n\n Unlocks the VA buffer object \\ref buf_id from external API usage like\n EGL or OpenCL (OCL). This function is a synchronization point. This\n means that any pending operation is guaranteed to be completed\n prior to returning from the function.\n\n The \\ref VABufferInfo argument shall point to the original data\n structure that was obtained from vaAcquireBufferHandle(), unaltered.\n This is necessary so that the VA driver implementation could\n deallocate any resources that were needed.\n\n In any case, returning from this function invalidates any contents\n in \\ref VABufferInfo. i.e. the underlyng buffer handle is no longer\n valid. Therefore, VA driver implementations are free to reset this\n data structure to safe defaults.\n\n Possible errors:\n - \\ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation\n does not support this interface\n - \\ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied\n - \\ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied\n - \\ref VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE: the implementation\n does not support exporting buffers of the specified type\n\n @param[in] dpy the VA display\n @param[in] buf_id the VA buffer\n @return VA_STATUS_SUCCESS if successful"] + pub unsafe fn vaReleaseBufferHandle(&self, dpy: VADisplay, buf_id: VABufferID) -> VAStatus { + (self + .vaReleaseBufferHandle + .as_ref() + .expect("Expected function, got error."))(dpy, buf_id) + } + #[doc = " \\brief Export a handle to a surface for use with an external API\n\n The exported handles are owned by the caller, and the caller is\n responsible for freeing them when no longer needed (e.g. by closing\n DRM PRIME file descriptors).\n\n This does not perform any synchronisation. If the contents of the\n surface will be read, vaSyncSurface() must be called before doing so.\n If the contents of the surface are written, then all operations must\n be completed externally before using the surface again by via VA-API\n functions.\n\n @param[in] dpy VA display.\n @param[in] surface_id Surface to export.\n @param[in] mem_type Memory type to export to.\n @param[in] flags Combination of flags to apply\n (VA_EXPORT_SURFACE_*).\n @param[out] descriptor Pointer to the descriptor structure to fill\n with the handle details. The type of this structure depends on\n the value of mem_type.\n\n @return Status code:\n - VA_STATUS_SUCCESS: Success.\n - VA_STATUS_ERROR_INVALID_DISPLAY: The display is not valid.\n - VA_STATUS_ERROR_UNIMPLEMENTED: The driver does not implement\n this interface.\n - VA_STATUS_ERROR_INVALID_SURFACE: The surface is not valid, or\n the surface is not exportable in the specified way.\n - VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: The driver does not\n support exporting surfaces to the specified memory type."] + pub unsafe fn vaExportSurfaceHandle( + &self, + dpy: VADisplay, + surface_id: VASurfaceID, + mem_type: u32, + flags: u32, + descriptor: *mut ::std::os::raw::c_void, + ) -> VAStatus { + (self + .vaExportSurfaceHandle + .as_ref() + .expect("Expected function, got error."))(dpy, surface_id, mem_type, flags, descriptor) + } + #[doc = " Get ready for a video pipeline\n - decode a picture to a target surface\n - encode a picture from a target surface\n - process a picture to a target surface"] + pub unsafe fn vaBeginPicture(&self, dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus { + (self.vaBeginPicture.as_ref().expect("Expected function, got error."))(dpy, context, render_target) + } + #[doc = " Send video decode, encode or processing buffers to the server."] + pub unsafe fn vaRenderPicture( + &self, + dpy: VADisplay, + context: VAContextID, + buffers: *mut VABufferID, + num_buffers: ::std::os::raw::c_int, + ) -> VAStatus { + (self.vaRenderPicture.as_ref().expect("Expected function, got error."))(dpy, context, buffers, num_buffers) + } + #[doc = " Make the end of rendering for a picture.\n The server should start processing all pending operations for this\n surface. This call is non-blocking. The client can start another\n Begin/Render/End sequence on a different render target.\n if VAContextID used in this function previously successfully passed\n vaMFAddContext call, real processing will be started during vaMFSubmit"] + pub unsafe fn vaEndPicture(&self, dpy: VADisplay, context: VAContextID) -> VAStatus { + (self.vaEndPicture.as_ref().expect("Expected function, got error."))(dpy, context) + } + #[doc = " Make the end of rendering for a pictures in contexts passed with submission.\n The server should start processing all pending operations for contexts.\n All contexts passed should be associated through vaMFAddContext\n and call sequence Begin/Render/End performed.\n This call is non-blocking. The client can start another\n Begin/Render/End/vaMFSubmit sequence on a different render targets.\n Return values:\n VA_STATUS_SUCCESS - operation successful, context was removed.\n VA_STATUS_ERROR_INVALID_CONTEXT - mf_context or one of contexts are invalid\n due to mf_context not created or one of contexts not assotiated with mf_context\n through vaAddContext.\n VA_STATUS_ERROR_INVALID_PARAMETER - one of context has not submitted it's frame\n through vaBeginPicture vaRenderPicture vaEndPicture call sequence.\n dpy: display\n mf_context: Multi-Frame context\n contexts: list of contexts submitting their tasks for multi-frame operation.\n num_contexts: number of passed contexts."] + pub unsafe fn vaMFSubmit( + &self, + dpy: VADisplay, + mf_context: VAMFContextID, + contexts: *mut VAContextID, + num_contexts: ::std::os::raw::c_int, + ) -> VAStatus { + (self.vaMFSubmit.as_ref().expect("Expected function, got error."))(dpy, mf_context, contexts, num_contexts) + } + #[doc = " This function blocks until all pending operations on the render target\n have been completed. Upon return it is safe to use the render target for a\n different picture."] + pub unsafe fn vaSyncSurface(&self, dpy: VADisplay, render_target: VASurfaceID) -> VAStatus { + (self.vaSyncSurface.as_ref().expect("Expected function, got error."))(dpy, render_target) + } + #[doc = " \\brief Synchronizes pending operations associated with the supplied surface.\n\n This function blocks during specified timeout (in nanoseconds) until\n all pending operations on the render target have been completed.\n If timeout is zero, the function returns immediately.\n\n Possible errors:\n - \\ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation\n does not support this interface\n - \\ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied\n - \\ref VA_STATUS_ERROR_INVALID_SURFACE: an invalid surface was supplied\n - \\ref VA_STATUS_ERROR_TIMEDOUT: synchronization is still in progress,\n client should call the function again to complete synchronization\n\n @param[in] dpy the VA display\n @param[in] surface the surface for which synchronization is performed\n @param[in] timeout_ns the timeout in nanoseconds\n"] + pub unsafe fn vaSyncSurface2(&self, dpy: VADisplay, surface: VASurfaceID, timeout_ns: u64) -> VAStatus { + (self.vaSyncSurface2.as_ref().expect("Expected function, got error."))(dpy, surface, timeout_ns) + } + #[doc = " Find out any pending ops on the render target"] + pub unsafe fn vaQuerySurfaceStatus( + &self, + dpy: VADisplay, + render_target: VASurfaceID, + status: *mut VASurfaceStatus::Type, + ) -> VAStatus { + (self + .vaQuerySurfaceStatus + .as_ref() + .expect("Expected function, got error."))(dpy, render_target, status) + } + #[doc = " After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(),\n it can call vaQuerySurfaceError to find out further details on the particular error.\n VA_STATUS_ERROR_DECODING_ERROR should be passed in as \"error_status\".\n\n After the applications get VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL from vaSyncSurface(),\n it still can call vaQuerySurfaceError to find out further details to know if has real hw reset\n happened on this surface since umd and kmd could recover the context from reset with success in sometimes.\n VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL also could be passed in as \"error_status\".\n\n Upon the return, error_info will point to an array of _VASurfaceDecodeMBErrors structure,\n which is allocated and filled by libVA with detailed information on the VADecodeErrorType.\n The array is terminated if \"status==-1\" is detected."] + pub unsafe fn vaQuerySurfaceError( + &self, + dpy: VADisplay, + surface: VASurfaceID, + error_status: VAStatus, + error_info: *mut *mut ::std::os::raw::c_void, + ) -> VAStatus { + (self + .vaQuerySurfaceError + .as_ref() + .expect("Expected function, got error."))(dpy, surface, error_status, error_info) + } + #[doc = " \\brief Synchronizes pending operations associated with the supplied buffer.\n\n This function blocks during specified timeout (in nanoseconds) until\n all pending operations on the supplied buffer have been completed.\n If timeout is zero, the function returns immediately.\n\n Possible errors:\n - \\ref VA_STATUS_ERROR_UNIMPLEMENTED: the VA driver implementation\n does not support this interface\n - \\ref VA_STATUS_ERROR_INVALID_DISPLAY: an invalid display was supplied\n - \\ref VA_STATUS_ERROR_INVALID_BUFFER: an invalid buffer was supplied\n - \\ref VA_STATUS_ERROR_TIMEDOUT: synchronization is still in progress,\n client should call the function again to complete synchronization\n\n @param[in] dpy the VA display\n @param[in] buf_id the buffer for which synchronization is performed\n @param[in] timeout_ns the timeout in nanoseconds\n"] + pub unsafe fn vaSyncBuffer(&self, dpy: VADisplay, buf_id: VABufferID, timeout_ns: u64) -> VAStatus { + (self.vaSyncBuffer.as_ref().expect("Expected function, got error."))(dpy, buf_id, timeout_ns) + } + #[doc = " Get maximum number of image formats supported by the implementation"] + pub unsafe fn vaMaxNumImageFormats(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self + .vaMaxNumImageFormats + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Query supported image formats\n The caller must provide a \"format_list\" array that can hold at\n least vaMaxNumImageFormats() entries. The actual number of formats\n returned in \"format_list\" is returned in \"num_formats\"."] + pub unsafe fn vaQueryImageFormats( + &self, + dpy: VADisplay, + format_list: *mut VAImageFormat, + num_formats: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaQueryImageFormats + .as_ref() + .expect("Expected function, got error."))(dpy, format_list, num_formats) + } + #[doc = " Create a VAImage structure\n The width and height fields returned in the VAImage structure may get\n enlarged for some YUV formats. Upon return from this function,\n image->buf has been created and proper storage allocated by the library.\n The client can access the image through the Map/Unmap calls."] + pub unsafe fn vaCreateImage( + &self, + dpy: VADisplay, + format: *mut VAImageFormat, + width: ::std::os::raw::c_int, + height: ::std::os::raw::c_int, + image: *mut VAImage, + ) -> VAStatus { + (self.vaCreateImage.as_ref().expect("Expected function, got error."))(dpy, format, width, height, image) + } + #[doc = " Should call DestroyImage before destroying the surface it is bound to"] + pub unsafe fn vaDestroyImage(&self, dpy: VADisplay, image: VAImageID) -> VAStatus { + (self.vaDestroyImage.as_ref().expect("Expected function, got error."))(dpy, image) + } + pub unsafe fn vaSetImagePalette( + &self, + dpy: VADisplay, + image: VAImageID, + palette: *mut ::std::os::raw::c_uchar, + ) -> VAStatus { + (self.vaSetImagePalette.as_ref().expect("Expected function, got error."))(dpy, image, palette) + } + #[doc = " Retrive surface data into a VAImage\n Image must be in a format supported by the implementation"] + pub unsafe fn vaGetImage( + &self, + dpy: VADisplay, + surface: VASurfaceID, + x: ::std::os::raw::c_int, + y: ::std::os::raw::c_int, + width: ::std::os::raw::c_uint, + height: ::std::os::raw::c_uint, + image: VAImageID, + ) -> VAStatus { + (self.vaGetImage.as_ref().expect("Expected function, got error."))(dpy, surface, x, y, width, height, image) + } + #[doc = " Copy data from a VAImage to a surface\n Image must be in a format supported by the implementation\n Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface\n shouldn't be rendered into when this is called"] + pub unsafe fn vaPutImage( + &self, + dpy: VADisplay, + surface: VASurfaceID, + image: VAImageID, + src_x: ::std::os::raw::c_int, + src_y: ::std::os::raw::c_int, + src_width: ::std::os::raw::c_uint, + src_height: ::std::os::raw::c_uint, + dest_x: ::std::os::raw::c_int, + dest_y: ::std::os::raw::c_int, + dest_width: ::std::os::raw::c_uint, + dest_height: ::std::os::raw::c_uint, + ) -> VAStatus { + (self.vaPutImage.as_ref().expect("Expected function, got error."))( + dpy, + surface, + image, + src_x, + src_y, + src_width, + src_height, + dest_x, + dest_y, + dest_width, + dest_height, + ) + } + #[doc = " Derive an VAImage from an existing surface.\n This interface will derive a VAImage and corresponding image buffer from\n an existing VA Surface. The image buffer can then be mapped/unmapped for\n direct CPU access. This operation is only possible on implementations with\n direct rendering capabilities and internal surface formats that can be\n represented with a VAImage. When the operation is not possible this interface\n will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back\n to using vaCreateImage + vaPutImage to accomplish the same task in an\n indirect manner.\n\n Implementations should only return success when the resulting image buffer\n would be useable with vaMap/Unmap.\n\n When directly accessing a surface special care must be taken to insure\n proper synchronization with the graphics hardware. Clients should call\n vaQuerySurfaceStatus to insure that a surface is not the target of concurrent\n rendering or currently being displayed by an overlay.\n\n Additionally nothing about the contents of a surface should be assumed\n following a vaPutSurface. Implementations are free to modify the surface for\n scaling or subpicture blending within a call to vaPutImage.\n\n Calls to vaPutImage or vaGetImage using the same surface from which the image\n has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or\n vaGetImage with other surfaces is supported.\n\n An image created with vaDeriveImage should be freed with vaDestroyImage. The\n image and image buffer structures will be destroyed; however, the underlying\n surface will remain unchanged until freed with vaDestroySurfaces."] + pub unsafe fn vaDeriveImage(&self, dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus { + (self.vaDeriveImage.as_ref().expect("Expected function, got error."))(dpy, surface, image) + } + #[doc = " Get maximum number of subpicture formats supported by the implementation"] + pub unsafe fn vaMaxNumSubpictureFormats(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self + .vaMaxNumSubpictureFormats + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Query supported subpicture formats\n The caller must provide a \"format_list\" array that can hold at\n least vaMaxNumSubpictureFormats() entries. The flags arrary holds the flag\n for each format to indicate additional capabilities for that format. The actual\n number of formats returned in \"format_list\" is returned in \"num_formats\".\n flags: returned value to indicate addtional capabilities\n VA_SUBPICTURE_CHROMA_KEYING - supports chroma-keying\n VA_SUBPICTURE_GLOBAL_ALPHA - supports global alpha\n VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD - supports unscaled screen relative subpictures for On Screen Display"] + pub unsafe fn vaQuerySubpictureFormats( + &self, + dpy: VADisplay, + format_list: *mut VAImageFormat, + flags: *mut ::std::os::raw::c_uint, + num_formats: *mut ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaQuerySubpictureFormats + .as_ref() + .expect("Expected function, got error."))(dpy, format_list, flags, num_formats) + } + #[doc = " Subpictures are created with an image associated."] + pub unsafe fn vaCreateSubpicture( + &self, + dpy: VADisplay, + image: VAImageID, + subpicture: *mut VASubpictureID, + ) -> VAStatus { + (self.vaCreateSubpicture.as_ref().expect("Expected function, got error."))(dpy, image, subpicture) + } + #[doc = " Destroy the subpicture before destroying the image it is assocated to"] + pub unsafe fn vaDestroySubpicture(&self, dpy: VADisplay, subpicture: VASubpictureID) -> VAStatus { + (self + .vaDestroySubpicture + .as_ref() + .expect("Expected function, got error."))(dpy, subpicture) + } + #[doc = " Bind an image to the subpicture. This image will now be associated with\n the subpicture instead of the one at creation."] + pub unsafe fn vaSetSubpictureImage( + &self, + dpy: VADisplay, + subpicture: VASubpictureID, + image: VAImageID, + ) -> VAStatus { + (self + .vaSetSubpictureImage + .as_ref() + .expect("Expected function, got error."))(dpy, subpicture, image) + } + #[doc = " If chromakey is enabled, then the area where the source value falls within\n the chromakey [min, max] range is transparent\n The chromakey component format is the following:\n For RGB: [0:7] Red [8:15] Blue [16:23] Green\n For YUV: [0:7] V [8:15] U [16:23] Y\n The chromakey mask can be used to mask out certain components for chromakey\n comparision"] + pub unsafe fn vaSetSubpictureChromakey( + &self, + dpy: VADisplay, + subpicture: VASubpictureID, + chromakey_min: ::std::os::raw::c_uint, + chromakey_max: ::std::os::raw::c_uint, + chromakey_mask: ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaSetSubpictureChromakey + .as_ref() + .expect("Expected function, got error."))(dpy, subpicture, chromakey_min, chromakey_max, chromakey_mask) + } + #[doc = " Global alpha value is between 0 and 1. A value of 1 means fully opaque and\n a value of 0 means fully transparent. If per-pixel alpha is also specified then\n the overall alpha is per-pixel alpha multiplied by the global alpha"] + pub unsafe fn vaSetSubpictureGlobalAlpha( + &self, + dpy: VADisplay, + subpicture: VASubpictureID, + global_alpha: f32, + ) -> VAStatus { + (self + .vaSetSubpictureGlobalAlpha + .as_ref() + .expect("Expected function, got error."))(dpy, subpicture, global_alpha) + } + #[doc = " vaAssociateSubpicture associates the subpicture with target_surfaces.\n It defines the region mapping between the subpicture and the target\n surfaces through source and destination rectangles (with the same width and height).\n Both will be displayed at the next call to vaPutSurface. Additional\n associations before the call to vaPutSurface simply overrides the association."] + pub unsafe fn vaAssociateSubpicture( + &self, + dpy: VADisplay, + subpicture: VASubpictureID, + target_surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + src_x: i16, + src_y: i16, + src_width: u16, + src_height: u16, + dest_x: i16, + dest_y: i16, + dest_width: u16, + dest_height: u16, + flags: u32, + ) -> VAStatus { + (self + .vaAssociateSubpicture + .as_ref() + .expect("Expected function, got error."))( + dpy, + subpicture, + target_surfaces, + num_surfaces, + src_x, + src_y, + src_width, + src_height, + dest_x, + dest_y, + dest_width, + dest_height, + flags, + ) + } + #[doc = " vaDeassociateSubpicture removes the association of the subpicture with target_surfaces."] + pub unsafe fn vaDeassociateSubpicture( + &self, + dpy: VADisplay, + subpicture: VASubpictureID, + target_surfaces: *mut VASurfaceID, + num_surfaces: ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaDeassociateSubpicture + .as_ref() + .expect("Expected function, got error."))(dpy, subpicture, target_surfaces, num_surfaces) + } + #[doc = " Get maximum number of display attributs supported by the implementation"] + pub unsafe fn vaMaxNumDisplayAttributes(&self, dpy: VADisplay) -> ::std::os::raw::c_int { + (self + .vaMaxNumDisplayAttributes + .as_ref() + .expect("Expected function, got error."))(dpy) + } + #[doc = " Query display attributes\n The caller must provide a \"attr_list\" array that can hold at\n least vaMaxNumDisplayAttributes() entries. The actual number of attributes\n returned in \"attr_list\" is returned in \"num_attributes\"."] + pub unsafe fn vaQueryDisplayAttributes( + &self, + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: *mut ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaQueryDisplayAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, attr_list, num_attributes) + } + #[doc = " Get display attributes\n This function returns the current attribute values in \"attr_list\".\n Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the \"flags\" field\n from vaQueryDisplayAttributes() can have their values retrieved."] + pub unsafe fn vaGetDisplayAttributes( + &self, + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaGetDisplayAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, attr_list, num_attributes) + } + #[doc = " Set display attributes\n Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the \"flags\" field\n from vaQueryDisplayAttributes() can be set. If the attribute is not settable or\n the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED"] + pub unsafe fn vaSetDisplayAttributes( + &self, + dpy: VADisplay, + attr_list: *mut VADisplayAttribute, + num_attributes: ::std::os::raw::c_int, + ) -> VAStatus { + (self + .vaSetDisplayAttributes + .as_ref() + .expect("Expected function, got error."))(dpy, attr_list, num_attributes) + } + #[doc = " \\brief Copies an object.\n\n Copies specified object (surface or buffer). If non-blocking copy\n is requested (VA_COPY_NONBLOCK), then need vaSyncBuffer or vaSyncSurface/vaSyncSurface2\n to sync the destination object.\n\n @param[in] dpy the VA display\n @param[in] dst Destination object to copy to\n @param[in] src Source object to copy from\n @param[in] option VA copy option\n @return VA_STATUS_SUCCESS if successful"] + pub unsafe fn vaCopy( + &self, + dpy: VADisplay, + dst: *mut VACopyObject, + src: *mut VACopyObject, + option: VACopyOption, + ) -> VAStatus { + (self.vaCopy.as_ref().expect("Expected function, got error."))(dpy, dst, src, option) + } + #[doc = " \\brief Queries video processing filters.\n\n This function returns the list of video processing filters supported\n by the driver. The \\c filters array is allocated by the user and\n \\c num_filters shall be initialized to the number of allocated\n elements in that array. Upon successful return, the actual number\n of filters will be overwritten into \\c num_filters. Otherwise,\n \\c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \\c num_filters\n is adjusted to the number of elements that would be returned if enough\n space was available.\n\n The list of video processing filters supported by the driver shall\n be ordered in the way they can be iteratively applied. This is needed\n for both correctness, i.e. some filters would not mean anything if\n applied at the beginning of the pipeline; but also for performance\n since some filters can be applied in a single pass (e.g. noise\n reduction + deinterlacing).\n\n @param[in] dpy the VA display\n @param[in] context the video processing context\n @param[out] filters the output array of #VAProcFilterType elements\n @param[in,out] num_filters the number of elements allocated on input,\n the number of elements actually filled in on output"] + pub unsafe fn vaQueryVideoProcFilters( + &self, + dpy: VADisplay, + context: VAContextID, + filters: *mut VAProcFilterType, + num_filters: *mut ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaQueryVideoProcFilters + .as_ref() + .expect("Expected function, got error."))(dpy, context, filters, num_filters) + } + #[doc = " \\brief Queries video filter capabilities.\n\n This function returns the list of capabilities supported by the driver\n for a specific video filter. The \\c filter_caps array is allocated by\n the user and \\c num_filter_caps shall be initialized to the number\n of allocated elements in that array. Upon successful return, the\n actual number of filters will be overwritten into \\c num_filter_caps.\n Otherwise, \\c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and\n \\c num_filter_caps is adjusted to the number of elements that would be\n returned if enough space was available.\n\n @param[in] dpy the VA display\n @param[in] context the video processing context\n @param[in] type the video filter type\n @param[out] filter_caps the output array of #VAProcFilterCap elements\n @param[in,out] num_filter_caps the number of elements allocated on input,\n the number of elements actually filled in output"] + pub unsafe fn vaQueryVideoProcFilterCaps( + &self, + dpy: VADisplay, + context: VAContextID, + type_: VAProcFilterType, + filter_caps: *mut ::std::os::raw::c_void, + num_filter_caps: *mut ::std::os::raw::c_uint, + ) -> VAStatus { + (self + .vaQueryVideoProcFilterCaps + .as_ref() + .expect("Expected function, got error."))(dpy, context, type_, filter_caps, num_filter_caps) + } + #[doc = " \\brief Queries video processing pipeline capabilities.\n\n This function returns the video processing pipeline capabilities. The\n \\c filters array defines the video processing pipeline and is an array\n of buffers holding filter parameters.\n\n Note: the #VAProcPipelineCaps structure contains user-provided arrays.\n If non-NULL, the corresponding \\c num_* fields shall be filled in on\n input with the number of elements allocated. Upon successful return,\n the actual number of elements will be overwritten into the \\c num_*\n fields. Otherwise, \\c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned\n and \\c num_* fields are adjusted to the number of elements that would\n be returned if enough space was available.\n\n @param[in] dpy the VA display\n @param[in] context the video processing context\n @param[in] filters the array of VA buffers defining the video\n processing pipeline\n @param[in] num_filters the number of elements in filters\n @param[in,out] pipeline_caps the video processing pipeline capabilities"] + pub unsafe fn vaQueryVideoProcPipelineCaps( + &self, + dpy: VADisplay, + context: VAContextID, + filters: *mut VABufferID, + num_filters: ::std::os::raw::c_uint, + pipeline_caps: *mut VAProcPipelineCaps, + ) -> VAStatus { + (self + .vaQueryVideoProcPipelineCaps + .as_ref() + .expect("Expected function, got error."))(dpy, context, filters, num_filters, pipeline_caps) + } + #[doc = " \\brief Create a protected session\n\n Create a protected session\n\n @param[in] dpy the VA display\n @param[in] config_id configuration for the protected session\n @param[out] protected_session created protected session id upon return"] + pub unsafe fn vaCreateProtectedSession( + &self, + dpy: VADisplay, + config_id: VAConfigID, + protected_session: *mut VAProtectedSessionID, + ) -> VAStatus { + (self + .vaCreateProtectedSession + .as_ref() + .expect("Expected function, got error."))(dpy, config_id, protected_session) + } + #[doc = " \\brief Destroy a protected session\n\n Destroy a protected session\n\n @param[in] dpy the VA display\n @param[in] protected_session protected session to be destroyed"] + pub unsafe fn vaDestroyProtectedSession( + &self, + dpy: VADisplay, + protected_session: VAProtectedSessionID, + ) -> VAStatus { + (self + .vaDestroyProtectedSession + .as_ref() + .expect("Expected function, got error."))(dpy, protected_session) + } + #[doc = " \\brief Attach a protected content session to VA context\n\n Attach a protected content session to the context to enable\n decryption/protection\n\n @param[in] dpy the VA display\n @param[in] id the VA decode/encode/vp context\n @param[in] protected_session the protected session to attach"] + pub unsafe fn vaAttachProtectedSession( + &self, + dpy: VADisplay, + id: VAGenericID, + protected_session: VAProtectedSessionID, + ) -> VAStatus { + (self + .vaAttachProtectedSession + .as_ref() + .expect("Expected function, got error."))(dpy, id, protected_session) + } + #[doc = " \\brief Detach the protected content session from the VA context\n\n Detach protected content session of the context to disable\n decryption/protection\n\n @param[in] dpy the VA display\n @param[in] id TEE client id to be detached"] + pub unsafe fn vaDetachProtectedSession(&self, dpy: VADisplay, id: VAGenericID) -> VAStatus { + (self + .vaDetachProtectedSession + .as_ref() + .expect("Expected function, got error."))(dpy, id) + } + #[doc = " \\brief Execute provides a general mechanism for TEE client tasks execution.\n\n vaProtectedSessionExecute provides a mechanism for TEE clients to execute\n specific tasks. The implementation may differ between IHVs.\n This is a synchronous API.\n\n @param[in] dpy the VA display\n @param[in] protected_session the protected session\n @param[in,out] buf_id the VA buffer"] + pub unsafe fn vaProtectedSessionExecute( + &self, + dpy: VADisplay, + protected_session: VAProtectedSessionID, + buf_id: VABufferID, + ) -> VAStatus { + (self + .vaProtectedSessionExecute + .as_ref() + .expect("Expected function, got error."))(dpy, protected_session, buf_id) + } + #[doc = " \\brief Returns a VA display derived from the specified DRM connection.\n\n This function returns a (possibly cached) VA display from the\n specified DRM connection @fd.\n\n @param[in] fd the DRM connection descriptor\n @return the VA display"] + pub unsafe fn vaGetDisplayDRM(&self, fd: ::std::os::raw::c_int) -> VADisplay { + (self.vaGetDisplayDRM.as_ref().expect("Expected function, got error."))(fd) + } +} diff --git a/src/buffer.rs b/src/buffer.rs index c147fa1..5e83f2a 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -4,7 +4,6 @@ //! Wrappers and helpers around `VABuffer`s. -#[cfg(libva_1_14_or_higher)] mod av1; mod enc_jpeg; mod enc_misc; @@ -16,7 +15,6 @@ mod proc_pipeline; mod vp8; mod vp9; -#[cfg(libva_1_14_or_higher)] pub use av1::*; pub use enc_jpeg::*; pub use enc_misc::*; @@ -52,7 +50,6 @@ impl Buffer { /* we send all slices parameters as a single array in H264, AV1 */ let nb_elements = match type_ { BufferType::SliceParameter(SliceParameter::H264(ref mut params)) => params.inner_mut().len(), - #[cfg(libva_1_14_or_higher)] BufferType::SliceParameter(SliceParameter::AV1(ref mut params)) => params.inner_mut().len(), _ => 1, }; @@ -87,7 +84,6 @@ impl Buffer { wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), ), - #[cfg(libva_1_14_or_higher)] PictureParameter::AV1(ref mut wrapper) => ( wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), @@ -127,7 +123,6 @@ impl Buffer { wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), ), - #[cfg(libva_1_14_or_higher)] SliceParameter::AV1(ref mut wrapper) => ( wrapper.inner_mut().as_mut_ptr() as *mut std::ffi::c_void, std::mem::size_of::(), @@ -196,7 +191,6 @@ impl Buffer { wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), ), - #[cfg(libva_1_14_or_higher)] EncSequenceParameter::AV1(ref mut wrapper) => ( wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), @@ -220,7 +214,6 @@ impl Buffer { wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), ), - #[cfg(libva_1_14_or_higher)] EncPictureParameter::AV1(ref mut wrapper) => ( wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), @@ -236,7 +229,6 @@ impl Buffer { wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), ), - #[cfg(libva_1_14_or_higher)] EncSliceParameter::AV1(ref mut wrapper) => ( wrapper.inner_mut() as *mut _ as *mut std::ffi::c_void, std::mem::size_of_val(wrapper.inner_mut()), @@ -427,7 +419,6 @@ pub enum PictureParameter { HEVCRext(hevc::PictureParameterBufferHEVCRext), /// Wrapper over VAPictureParameterBufferHEVCScc HEVCScc(hevc::PictureParameterBufferHEVCScc), - #[cfg(libva_1_14_or_higher)] /// Wrapper over VADecPictureParameterBufferAV1 AV1(av1::PictureParameterBufferAV1), /// Wrapper over VAPictureParameterBufferJPEGBaseline @@ -450,7 +441,6 @@ pub enum SliceParameter { HEVC(hevc::SliceParameterBufferHEVC), /// Wrapper over VASliceParameterBufferHEVCRext HEVCRext(hevc::SliceParameterBufferHEVCRext), - #[cfg(libva_1_14_or_higher)] /// Wrapper over VASliceParameterBufferAV1 AV1(av1::SliceParameterBufferAV1), /// Wrapper over VASliceParameterBufferJPEGBaseline @@ -495,7 +485,6 @@ pub enum EncSequenceParameter { VP8(vp8::EncSequenceParameterBufferVP8), /// Abstraction over `VAEncSequenceParameterBufferVP9` VP9(vp9::EncSequenceParameterBufferVP9), - #[cfg(libva_1_14_or_higher)] /// Abstraction over `VAEncSequenceParameterBufferAV1` AV1(av1::EncSequenceParameterBufferAV1), } @@ -510,7 +499,6 @@ pub enum EncPictureParameter { VP8(vp8::EncPictureParameterBufferVP8), /// Abstraction over `VAEncPictureParameterBufferVP9` VP9(vp9::EncPictureParameterBufferVP9), - #[cfg(libva_1_14_or_higher)] /// Abstraction over `VAEncPictureParameterBufferAV1` AV1(av1::EncPictureParameterBufferAV1), } @@ -521,7 +509,6 @@ pub enum EncSliceParameter { H264(h264::EncSliceParameterBufferH264), /// Abstraction over `VAEncSliceParameterBufferHEVC` HEVC(hevc::EncSliceParameterBufferHEVC), - #[cfg(libva_1_14_or_higher)] /// Abstraction over `VAEncTileGroupBufferAV1` AV1(av1::EncTileGroupBufferAV1), } diff --git a/src/buffer/av1.rs b/src/buffer/av1.rs index 2c5e8fe..53eaf39 100644 --- a/src/buffer/av1.rs +++ b/src/buffer/av1.rs @@ -600,13 +600,9 @@ impl AV1EncSeqFields { enable_superres, enable_cdef, enable_restoration, - #[cfg(libva_1_15_or_higher)] bit_depth_minus8, - #[cfg(libva_1_15_or_higher)] subsampling_x, - #[cfg(libva_1_15_or_higher)] subsampling_y, - #[cfg(libva_1_19_or_higher)] mono_chrome, Default::default(), ); @@ -641,7 +637,6 @@ impl EncSequenceParameterBufferAV1 { seq_profile, seq_level_idx, seq_tier, - #[cfg(libva_1_16_or_higher)] hierarchical_flag, intra_period, ip_period, @@ -723,9 +718,7 @@ impl AV1EncPictureFlags { let disable_frame_recon = disable_frame_recon as u32; let allow_intrabc = allow_intrabc as u32; let palette_mode_enable = palette_mode_enable as u32; - #[cfg(libva_1_21_or_higher)] let allow_screen_content_tools = allow_screen_content_tools as u32; - #[cfg(libva_1_21_or_higher)] let force_integer_mv = force_integer_mv as u32; let _bitfield_1 = { @@ -743,9 +736,7 @@ impl AV1EncPictureFlags { disable_frame_recon, allow_intrabc, palette_mode_enable, - #[cfg(libva_1_21_or_higher)] allow_screen_content_tools, - #[cfg(libva_1_21_or_higher)] force_integer_mv, Default::default(), ) @@ -1042,11 +1033,9 @@ impl EncPictureParameterBufferAV1 { coded_buf, reference_frames, ref_frame_idx, - #[cfg(libva_1_19_or_higher)] hierarchical_level_plus1, primary_ref_frame, order_hint, - #[cfg(libva_1_15_or_higher)] refresh_frame_flags, ref_frame_ctrl_l0, ref_frame_ctrl_l1, diff --git a/src/buffer/enc_misc.rs b/src/buffer/enc_misc.rs index c18d9d4..f05ebf8 100644 --- a/src/buffer/enc_misc.rs +++ b/src/buffer/enc_misc.rs @@ -133,7 +133,6 @@ impl EncMiscParameterRateControl { ICQ_quality_factor: icq_quality_factor, max_qp, quality_factor, - #[cfg(libva_1_10_or_higher)] target_frame_size, ..Default::default() }, diff --git a/src/buffer/hevc.rs b/src/buffer/hevc.rs index 7e7b887..eb77f5c 100644 --- a/src/buffer/hevc.rs +++ b/src/buffer/hevc.rs @@ -1130,9 +1130,7 @@ impl EncSliceParameterBufferHEVC { slice_beta_offset_div2, slice_tc_offset_div2, slice_fields, - #[cfg(libva_1_10_or_higher)] pred_weight_table_bit_offset, - #[cfg(libva_1_10_or_higher)] pred_weight_table_bit_length, va_reserved: Default::default(), })) diff --git a/src/buffer/jpeg_baseline.rs b/src/buffer/jpeg_baseline.rs index 1f29e0b..eb297c0 100644 --- a/src/buffer/jpeg_baseline.rs +++ b/src/buffer/jpeg_baseline.rs @@ -48,7 +48,6 @@ impl PictureParameterBufferJPEGBaseline { num_components, color_space, rotation, - #[cfg(libva_1_20_or_higher)] crop_rectangle, va_reserved: Default::default(), })) diff --git a/src/lib.rs b/src/lib.rs index 5d33ab2..14ee82f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ // Most of this crate is derived from discord/cros-libva + discord/cros-codecs // (BSD-3-Clause). Don't subject upstream code to this workspace's strict lints; -// the build script also emits custom `libva_*_or_higher` cfgs. +// the vendored synthesizer also keeps cros-codecs's `feature = "vaapi"` gates. #![allow(dead_code, unused_imports, unexpected_cfgs, mismatched_lifetime_syntaxes)] #![allow(clippy::all)] diff --git a/src/surface.rs b/src/surface.rs index 5dca700..b9d6bc2 100644 --- a/src/surface.rs +++ b/src/surface.rs @@ -97,7 +97,6 @@ where pub enum DecodeErrorType { SliceMissing = bindings::VADecodeErrorType::VADecodeSliceMissing, MBError = bindings::VADecodeErrorType::VADecodeMBError, - #[cfg(libva_1_20_or_higher)] Reset = bindings::VADecodeErrorType::VADecodeReset, } @@ -302,7 +301,6 @@ impl Surface { let type_ = match error.decode_error_type { bindings::VADecodeErrorType::VADecodeSliceMissing => DecodeErrorType::SliceMissing, bindings::VADecodeErrorType::VADecodeMBError => DecodeErrorType::MBError, - #[cfg(libva_1_20_or_higher)] bindings::VADecodeErrorType::VADecodeReset => DecodeErrorType::Reset, _ => { log::warn!("Unrecognized `decode_error_type` value ({})", error.decode_error_type);