From b7bfa1e7c9c60f37fff8b1b5e39438de30ab71fe Mon Sep 17 00:00:00 2001 From: Kyle Mayes Date: Mon, 16 Oct 2023 22:43:36 -0400 Subject: [PATCH] Add Vulkan video extensions --- .github/workflows/ci.yml | 26 +- .github/workflows/update.yml | 24 + CHANGELOG.md | 3 +- .../kotlin/com/kylemayes/generator/Input.kt | 6 +- .../kotlin/com/kylemayes/generator/Main.kt | 13 +- .../kylemayes/generator/generate/Generate.kt | 15 +- .../generator/generate/file/Headers.kt | 43 + .../kylemayes/generator/registry/Extract.kt | 9 +- .../kylemayes/generator/registry/Filter.kt | 16 +- .../com/kylemayes/generator/registry/Index.kt | 2 +- .../kylemayes/generator/support/Command.kt | 3 + vulkanalia-sys/src/bitmasks.rs | 370 + vulkanalia-sys/src/commands.rs | 115 + vulkanalia-sys/src/enums.rs | 257 + vulkanalia-sys/src/extensions.rs | 136 + vulkanalia-sys/src/handles.rs | 88 + vulkanalia-sys/src/lib.rs | 3 + vulkanalia-sys/src/structs.rs | 1836 +++++ vulkanalia-sys/src/video.rs | 4551 ++++++++++++ vulkanalia/src/vk/builders.rs | 6206 ++++++++++++++++- vulkanalia/src/vk/chains.rs | 1115 +++ vulkanalia/src/vk/commands.rs | 268 + vulkanalia/src/vk/enums.rs | 21 + vulkanalia/src/vk/extensions.rs | 410 ++ 24 files changed, 15417 insertions(+), 119 deletions(-) create mode 100644 generator/src/main/kotlin/com/kylemayes/generator/generate/file/Headers.kt create mode 100644 vulkanalia-sys/src/video.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 677e2ab9..86bb79e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,15 +123,39 @@ jobs: check-bindings: name: Check - Bindings runs-on: ubuntu-latest + env: + RUST_LOG: info + RUST_VERSION: 1.72.0 + BINDGEN_VERSION: 0.68.1 steps: # Checkout - name: Checkout Repository uses: actions/checkout@v2 # Dependencies + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: 16 - name: Install Java uses: actions/setup-java@v1 with: java-version: 14 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + - name: Cache bindgen + id: cache-bindgen + uses: actions/cache@v2 + with: + path: ~/.cargo/bin/bindgen + key: ${{ runner.os }}-${{ env.RUST_VERSION }}-${{ env.BINDGEN_VERSION }} + - name: Install bindgen + uses: actions-rs/cargo@v1 + if: steps.cache-bindgen.outputs.cache-hit != 'true' + with: + command: install + args: bindgen-cli --version ${{ env.BINDGEN_VERSION }} # Check - name: Check Bindings working-directory: ./generator @@ -139,4 +163,4 @@ jobs: # Debug - name: Debug uses: mxschmitt/action-tmate@v3 - if: ${{ (failure() && inputs.error_debug) || inputs.force_debug }} + if: ${{ failure() }} diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 52d86b11..78071c15 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -19,15 +19,39 @@ jobs: update-bindings: name: Update - Bindings runs-on: ubuntu-latest + env: + RUST_LOG: info + RUST_VERSION: 1.72.0 + BINDGEN_VERSION: 0.68.1 steps: # Checkout - name: Checkout Repository uses: actions/checkout@v2 # Dependencies + - name: Install LLVM and Clang + uses: KyleMayes/install-llvm-action@v1 + with: + version: 16 - name: Install Java uses: actions/setup-java@v1 with: java-version: 14 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.RUST_VERSION }} + - name: Cache bindgen + id: cache-bindgen + uses: actions/cache@v2 + with: + path: ~/.cargo/bin/bindgen + key: ${{ runner.os }}-${{ env.RUST_VERSION }}-${{ env.BINDGEN_VERSION }} + - name: Install bindgen + uses: actions-rs/cargo@v1 + if: steps.cache-bindgen.outputs.cache-hit != 'true' + with: + command: install + args: bindgen-cli --version ${{ env.BINDGEN_VERSION }} # Update - name: Update Bindings working-directory: ./generator diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c05ff1b..47286c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Make all extendable output structs parameters in command wrappers (see [#213](https://github.com/KyleMayes/vulkanalia/issues/213) for details) ### Added +- Added support for Vulkan video extensions - Added `vulkanalia::prelude::v1_3` module (a prelude module for Vulkan 1.3+) ### Bindings Updates @@ -222,7 +223,7 @@ - Fixed composite bitflag values (e.g., `CullModeFlags::FRONT_AND_BACK`) ### Changed -- Bumped MSRV to 1.51 +- Bumped MSRV to 1.64 - Added `Send` and `Sync` requirement to `Loader` error type - Changed type of stored layer names to `vk::ExtensionName` instead of `CString` - Added constants, constructor, and additional conversions to `Version` diff --git a/generator/src/main/kotlin/com/kylemayes/generator/Input.kt b/generator/src/main/kotlin/com/kylemayes/generator/Input.kt index 8486183e..2be83fb4 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/Input.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/Input.kt @@ -6,13 +6,16 @@ import org.kohsuke.github.GHCommit import java.nio.file.Files private val registryPath = RepositoryPath("KhronosGroup/Vulkan-Docs", "main", "xml/vk.xml") +private val videoPath = RepositoryPath("KhronosGroup/Vulkan-Headers", "main", "include/vk_video") /** The generator inputs pulled from GitHub repositories. */ data class RepositoryInputs( /** The Vulkan API registry. */ val registry: RepositoryInput, + /** The Vulkan video headers. */ + val video: RepositoryInput>, ) { - val list = listOf(registry) + val list = listOf(registry, video) /** Updates the locally tracked commits to match the latest commits. */ fun updateLocal(context: GeneratorContext) { @@ -25,6 +28,7 @@ fun getRepositoryInputs(context: GeneratorContext): RepositoryInputs { val locals = getLocalCommitHashes(context) return RepositoryInputs( registry = getRepositoryInput(context, locals, registryPath, ::getFile), + video = getRepositoryInput(context, locals, videoPath, ::getDirectory), ) } diff --git a/generator/src/main/kotlin/com/kylemayes/generator/Main.kt b/generator/src/main/kotlin/com/kylemayes/generator/Main.kt index 80211f14..5101dec7 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/Main.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/Main.kt @@ -75,9 +75,13 @@ class Check : CliktCommand(help = "Checks generated Vulkan bindings") { val xml = log.time("Fetch Registry") { inputs.registry.local.lazy.value } val registry = log.time("Parse Registry") { parseRegistry(xml) } + // Headers (video) + + val video = log.time("Fetch Video Headers") { inputs.video.local.lazy.value } + // Generate - val files = log.time("Generate Files") { generateRustFiles(registry) } + val files = log.time("Generate Files") { generateRustFiles(registry, video) } // Check @@ -142,9 +146,14 @@ class Update : CliktCommand(help = "Updates generated Vulkan bindings") { val xml = log.time("Fetch Registry") { xmlVersion.lazy.value } val registry = log.time("Parse Registry") { parseRegistry(xml) } + // Headers (video) + + val videoVersion = if (skipUpgrade) { inputs.video.local } else { inputs.video.latest } + val video = log.time("Fetch Video Headers") { videoVersion.lazy.value } + // Generate - val files = log.time("Generate Files") { generateRustFiles(registry) } + val files = log.time("Generate Files") { generateRustFiles(registry, video) } // Check diff --git a/generator/src/main/kotlin/com/kylemayes/generator/generate/Generate.kt b/generator/src/main/kotlin/com/kylemayes/generator/generate/Generate.kt index 2c13238f..7c3adceb 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/generate/Generate.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/generate/Generate.kt @@ -13,6 +13,7 @@ import com.kylemayes.generator.generate.file.generateExtensionTraits import com.kylemayes.generator.generate.file.generateExtensions import com.kylemayes.generator.generate.file.generateFunctions import com.kylemayes.generator.generate.file.generateHandles +import com.kylemayes.generator.generate.file.generateHeaders import com.kylemayes.generator.generate.file.generateMacros import com.kylemayes.generator.generate.file.generateResultEnums import com.kylemayes.generator.generate.file.generateStructs @@ -27,8 +28,17 @@ import java.nio.file.Path private val log = KotlinLogging.logger { /* */ } -/** Generates Rust files for a Vulkan API registry. */ -fun generateRustFiles(registry: Registry) = listOf( +/** The additional `bindgen` options for the Vulkan video headers. */ +private val videoOptions = listOf( + "--allowlist-item", "StdVideo.*", + "--allowlist-item", "STD_VIDEO_.*", + "--no-prepend-enum-name", + "--default-enum-style", "newtype_global", + "--with-derive-custom-enum", ".*=Default", +) + +/** Generates Rust files for a Vulkan API registry and Vulkan video headers. */ +fun generateRustFiles(registry: Registry, video: Map) = listOf( generateRustFile("vulkanalia-sys", "bitmasks.rs", registry.generateBitmasks()), generateRustFile("vulkanalia-sys", "commands.rs", registry.generateCommands()), generateRustFile("vulkanalia-sys", "constants.rs", registry.generateConstants()), @@ -40,6 +50,7 @@ fun generateRustFiles(registry: Registry) = listOf( generateRustFile("vulkanalia-sys", "structs.rs", registry.generateStructs()), generateRustFile("vulkanalia-sys", "typedefs.rs", registry.generateTypedefs()), generateRustFile("vulkanalia-sys", "unions.rs", registry.generateUnions()), + generateRustFile("vulkanalia-sys", "video.rs", generateHeaders("video", video, videoOptions)), generateRustFile("vulkanalia", "vk/builders.rs", registry.generateBuilders()), generateRustFile("vulkanalia", "vk/chains.rs", registry.generateChains()), generateRustFile("vulkanalia", "vk/commands.rs", registry.generateCommandStructs()), diff --git a/generator/src/main/kotlin/com/kylemayes/generator/generate/file/Headers.kt b/generator/src/main/kotlin/com/kylemayes/generator/generate/file/Headers.kt new file mode 100644 index 00000000..9b1cd6d0 --- /dev/null +++ b/generator/src/main/kotlin/com/kylemayes/generator/generate/file/Headers.kt @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: Apache-2.0 + +package com.kylemayes.generator.generate.file + +import com.kylemayes.generator.support.bindgen +import com.kylemayes.generator.support.time +import mu.KotlinLogging +import kotlin.io.path.ExperimentalPathApi +import kotlin.io.path.createTempDirectory +import kotlin.io.path.deleteRecursively +import kotlin.io.path.writeText + +private val log = KotlinLogging.logger { /* */ } + +/** Generates a Rust module using `bindgen` for a collection of C/C++ headers. */ +@OptIn(ExperimentalPathApi::class) +fun generateHeaders(name: String, headers: Map, options: List = emptyList()): String { + if (headers.isEmpty()) { + return "" + } + + val tmp = createTempDirectory("vk-headers") + headers.forEach { tmp.resolve(it.key).writeText(it.value) } + + val input = tmp.resolve("__input.h") + input.writeText(headers.keys.joinToString("\n") { "#include \"$it\"" }) + + val bindings = log.time("Generate Headers ($name)") { + bindgen( + "--verbose", + "--rust-target=1.64", + "--use-core", + "--no-layout-tests", + *options.toTypedArray(), + input.toString(), + ) + } + + tmp.deleteRecursively() + + // Hack to ensure consistent enum types on Windows and non-Windows. + return bindings.replace("(pub ::core::ffi::c_uint);", "(pub ::core::ffi::c_int);") +} diff --git a/generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt b/generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt index 1a752e3a..56f122c2 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt @@ -607,7 +607,14 @@ fun Type.isStringArray() = getElement()?.getIdentifier()?.original == "char" /** A C/C++ identifier type. */ data class IdentifierType(val identifier: Identifier) : Type { - override fun generate() = primitives.getOrDefault(identifier.value, identifier.value) + override fun generate() = if (identifier.value.startsWith("StdVideo")) { + // Types from the Vulkan video headers are prefixed with `StdVideo` + // and are in a separate `video` module from the registry types. + "video::${identifier.value}" + } else { + primitives.getOrDefault(identifier.value, identifier.value) + } + override fun generateDefault() = "${generate()}::default()" } diff --git a/generator/src/main/kotlin/com/kylemayes/generator/registry/Filter.kt b/generator/src/main/kotlin/com/kylemayes/generator/registry/Filter.kt index 1431630f..eb8f5477 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/registry/Filter.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/registry/Filter.kt @@ -28,21 +28,7 @@ fun Registry.filterEntities(): Registry { // =============================================== /** Vulkan extensions that are specifically not supported by `vulkanalia`. */ -private val unsupportedExtensions = setOf( - // Video extensions depend on a bunch of types not defined in the Vulkan - // API registry but instead live in some additional Vulkan headers. Maybe - // support could be added using `bindgen` to generate Rust types from these - // additional Vulkan headers? - "VK_EXT_video_decode_h264", - "VK_EXT_video_decode_h265", - "VK_EXT_video_encode_h264", - "VK_EXT_video_encode_h265", - "VK_KHR_video_decode_h264", - "VK_KHR_video_decode_h265", - "VK_KHR_video_decode_queue", - "VK_KHR_video_encode_queue", - "VK_KHR_video_queue", -) +private val unsupportedExtensions = emptySet() /** Gets whether a Vulkan extension is supported by `vulkanalia`. */ private fun Extension.isSupported() = diff --git a/generator/src/main/kotlin/com/kylemayes/generator/registry/Index.kt b/generator/src/main/kotlin/com/kylemayes/generator/registry/Index.kt index d793afe9..28c35ca9 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/registry/Index.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/registry/Index.kt @@ -21,7 +21,7 @@ import com.kylemayes.generator.support.toPascalCase * `%VERSION%` which should be replaced with the crate version in use. */ fun Registry.indexEntities(): String { - generateRustFiles(this) + generateRustFiles(this, emptyMap()) val entities = manualUrls.toMutableList() entities.addEntity("vk::make_version", "/vk/fn.make_version.html") diff --git a/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt b/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt index 4ac448c9..26394f76 100644 --- a/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt +++ b/generator/src/main/kotlin/com/kylemayes/generator/support/Command.kt @@ -11,6 +11,9 @@ import kotlin.time.Duration.Companion.seconds private val log = KotlinLogging.logger { /* */ } +/** Executes the `bindgen` command and returns the output. */ +fun bindgen(vararg args: String): String = execute("bindgen", arrayOf(*args)) + /** Executes the `git` command and prints the output. */ fun git(vararg args: String) { println("> git ${args.joinToString(" ")}") diff --git a/vulkanalia-sys/src/bitmasks.rs b/vulkanalia-sys/src/bitmasks.rs index eb2e6d82..c3e90819 100644 --- a/vulkanalia-sys/src/bitmasks.rs +++ b/vulkanalia-sys/src/bitmasks.rs @@ -120,6 +120,10 @@ bitflags! { const SHADER_SAMPLED_READ = 1 << 32; const SHADER_STORAGE_READ = 1 << 33; const SHADER_STORAGE_WRITE = 1 << 34; + const VIDEO_DECODE_READ_KHR = 1 << 35; + const VIDEO_DECODE_WRITE_KHR = 1 << 36; + const VIDEO_ENCODE_READ_KHR = 1 << 37; + const VIDEO_ENCODE_WRITE_KHR = 1 << 38; const INVOCATION_MASK_READ_HUAWEI = 1 << 39; const SHADER_BINDING_TABLE_READ_KHR = 1 << 40; const DESCRIPTOR_BUFFER_READ_EXT = 1 << 41; @@ -185,6 +189,10 @@ bitflags! { const SHADER_BINDING_TABLE_KHR = 1 << 10; const TRANSFORM_FEEDBACK_BUFFER_EXT = 1 << 11; const TRANSFORM_FEEDBACK_COUNTER_BUFFER_EXT = 1 << 12; + const VIDEO_DECODE_SRC_KHR = 1 << 13; + const VIDEO_DECODE_DST_KHR = 1 << 14; + const VIDEO_ENCODE_DST_KHR = 1 << 15; + const VIDEO_ENCODE_SRC_KHR = 1 << 16; const SHADER_DEVICE_ADDRESS = 1 << 17; const ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_KHR = 1 << 19; const ACCELERATION_STRUCTURE_STORAGE_KHR = 1 << 20; @@ -749,6 +757,10 @@ bitflags! { const DISJOINT = 1 << 22; const COSITED_CHROMA_SAMPLES = 1 << 23; const FRAGMENT_DENSITY_MAP_EXT = 1 << 24; + const VIDEO_DECODE_OUTPUT_KHR = 1 << 25; + const VIDEO_DECODE_DPB_KHR = 1 << 26; + const VIDEO_ENCODE_INPUT_KHR = 1 << 27; + const VIDEO_ENCODE_DPB_KHR = 1 << 28; const ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR = 1 << 29; const FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 1 << 30; } @@ -784,6 +796,10 @@ bitflags! { const DISJOINT = 1 << 22; const COSITED_CHROMA_SAMPLES = 1 << 23; const FRAGMENT_DENSITY_MAP_EXT = 1 << 24; + const VIDEO_DECODE_OUTPUT_KHR = 1 << 25; + const VIDEO_DECODE_DPB_KHR = 1 << 26; + const VIDEO_ENCODE_INPUT_KHR = 1 << 27; + const VIDEO_ENCODE_DPB_KHR = 1 << 28; const ACCELERATION_STRUCTURE_VERTEX_BUFFER_KHR = 1 << 29; const FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 1 << 30; const STORAGE_READ_WITHOUT_FORMAT = 1 << 31; @@ -1011,6 +1027,12 @@ bitflags! { const INPUT_ATTACHMENT = 1 << 7; const FRAGMENT_SHADING_RATE_ATTACHMENT_KHR = 1 << 8; const FRAGMENT_DENSITY_MAP_EXT = 1 << 9; + const VIDEO_DECODE_DST_KHR = 1 << 10; + const VIDEO_DECODE_SRC_KHR = 1 << 11; + const VIDEO_DECODE_DPB_KHR = 1 << 12; + const VIDEO_ENCODE_DST_KHR = 1 << 13; + const VIDEO_ENCODE_SRC_KHR = 1 << 14; + const VIDEO_ENCODE_DPB_KHR = 1 << 15; const INVOCATION_MASK_HUAWEI = 1 << 18; const ATTACHMENT_FEEDBACK_LOOP_EXT = 1 << 19; const SAMPLE_WEIGHT_QCOM = 1 << 20; @@ -1500,6 +1522,8 @@ bitflags! { const FRAGMENT_DENSITY_PROCESS_EXT = 1 << 23; const TRANSFORM_FEEDBACK_EXT = 1 << 24; const ACCELERATION_STRUCTURE_BUILD_KHR = 1 << 25; + const VIDEO_DECODE_KHR = 1 << 26; + const VIDEO_ENCODE_KHR = 1 << 27; const ACCELERATION_STRUCTURE_COPY_KHR = 1 << 28; const OPTICAL_FLOW_NV = 1 << 29; const MICROMAP_BUILD_EXT = 1 << 30; @@ -1620,6 +1644,7 @@ bitflags! { const WAIT = 1 << 1; const WITH_AVAILABILITY = 1 << 2; const PARTIAL = 1 << 3; + const WITH_STATUS_KHR = 1 << 4; } } @@ -1633,6 +1658,8 @@ bitflags! { const TRANSFER = 1 << 2; const SPARSE_BINDING = 1 << 3; const PROTECTED = 1 << 4; + const VIDEO_DECODE_KHR = 1 << 5; + const VIDEO_ENCODE_KHR = 1 << 6; const OPTICAL_FLOW_NV = 1 << 8; } } @@ -1942,6 +1969,349 @@ bitflags! { pub struct ViSurfaceCreateFlagsNN: Flags { } } +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoBeginCodingFlagsKHR: Flags { } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoCapabilityFlagsKHR: Flags { + const PROTECTED_CONTENT = 1; + const SEPARATE_REFERENCE_IMAGES = 1 << 1; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoChromaSubsamplingFlagsKHR: Flags { + const INVALID = 0; + const MONOCHROME = 1; + const _420 = 1 << 1; + const _422 = 1 << 2; + const _444 = 1 << 3; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoCodecOperationFlagsKHR: Flags { + const NONE = 0; + const DECODE_H264 = 1; + const DECODE_H265 = 1 << 1; + const ENCODE_H264_EXT = 1 << 16; + const ENCODE_H265_EXT = 1 << 17; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoCodingControlFlagsKHR: Flags { + const RESET = 1; + const ENCODE_RATE_CONTROL = 1 << 1; + const ENCODE_QUALITY_LEVEL = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoComponentBitDepthFlagsKHR: Flags { + const INVALID = 0; + const _8 = 1; + const _10 = 1 << 2; + const _12 = 1 << 4; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoDecodeCapabilityFlagsKHR: Flags { + const DPB_AND_OUTPUT_COINCIDE = 1; + const DPB_AND_OUTPUT_DISTINCT = 1 << 1; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoDecodeFlagsKHR: Flags { } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoDecodeH264PictureLayoutFlagsKHR: Flags { + const PROGRESSIVE = 0; + const INTERLACED_INTERLEAVED_LINES = 1; + const INTERLACED_SEPARATE_PLANES = 1 << 1; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoDecodeUsageFlagsKHR: Flags { + const DEFAULT = 0; + const TRANSCODING = 1; + const OFFLINE = 1 << 1; + const STREAMING = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeCapabilityFlagsKHR: Flags { + const PRECEDING_EXTERNALLY_ENCODED_BYTES = 1; + const INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION = 1 << 1; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeContentFlagsKHR: Flags { + const DEFAULT = 0; + const CAMERA = 1; + const DESKTOP = 1 << 1; + const RENDERED = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeFeedbackFlagsKHR: Flags { + const BITSTREAM_BUFFER_OFFSET = 1; + const BITSTREAM_BYTES_WRITTEN = 1 << 1; + const BITSTREAM_HAS_OVERRIDES = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeFlagsKHR: Flags { } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH264CapabilityFlagsEXT: Flags { + const HRD_COMPLIANCE = 1; + const PREDICTION_WEIGHT_TABLE_GENERATED = 1 << 1; + const ROW_UNALIGNED_SLICE = 1 << 2; + const DIFFERENT_SLICE_TYPE = 1 << 3; + const B_FRAME_IN_L0_LIST = 1 << 4; + const B_FRAME_IN_L1_LIST = 1 << 5; + const PER_PICTURE_TYPE_MIN_MAX_QP = 1 << 6; + const PER_SLICE_CONSTANT_QP = 1 << 7; + const GENERATE_PREFIX_NALU = 1 << 8; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH264RateControlFlagsEXT: Flags { + const ATTEMPT_HRD_COMPLIANCE = 1; + const REGULAR_GOP = 1 << 1; + const REFERENCE_PATTERN_FLAT = 1 << 2; + const REFERENCE_PATTERN_DYADIC = 1 << 3; + const TEMPORAL_LAYER_PATTERN_DYADIC = 1 << 4; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH264StdFlagsEXT: Flags { + const SEPARATE_COLOR_PLANE_FLAG_SET = 1; + const QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET = 1 << 1; + const SCALING_MATRIX_PRESENT_FLAG_SET = 1 << 2; + const CHROMA_QP_INDEX_OFFSET = 1 << 3; + const SECOND_CHROMA_QP_INDEX_OFFSET = 1 << 4; + const PIC_INIT_QP_MINUS26 = 1 << 5; + const WEIGHTED_PRED_FLAG_SET = 1 << 6; + const WEIGHTED_BIPRED_IDC_EXPLICIT = 1 << 7; + const WEIGHTED_BIPRED_IDC_IMPLICIT = 1 << 8; + const TRANSFORM_8X8_MODE_FLAG_SET = 1 << 9; + const DIRECT_SPATIAL_MV_PRED_FLAG_UNSET = 1 << 10; + const ENTROPY_CODING_MODE_FLAG_UNSET = 1 << 11; + const ENTROPY_CODING_MODE_FLAG_SET = 1 << 12; + const DIRECT_8X8_INFERENCE_FLAG_UNSET = 1 << 13; + const CONSTRAINED_INTRA_PRED_FLAG_SET = 1 << 14; + const DEBLOCKING_FILTER_DISABLED = 1 << 15; + const DEBLOCKING_FILTER_ENABLED = 1 << 16; + const DEBLOCKING_FILTER_PARTIAL = 1 << 17; + const SLICE_QP_DELTA = 1 << 19; + const DIFFERENT_SLICE_QP_DELTA = 1 << 20; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH265CapabilityFlagsEXT: Flags { + const HRD_COMPLIANCE = 1; + const PREDICTION_WEIGHT_TABLE_GENERATED = 1 << 1; + const ROW_UNALIGNED_SLICE_SEGMENT = 1 << 2; + const DIFFERENT_SLICE_SEGMENT_TYPE = 1 << 3; + const B_FRAME_IN_L0_LIST = 1 << 4; + const B_FRAME_IN_L1_LIST = 1 << 5; + const PER_PICTURE_TYPE_MIN_MAX_QP = 1 << 6; + const PER_SLICE_SEGMENT_CONSTANT_QP = 1 << 7; + const MULTIPLE_TILES_PER_SLICE_SEGMENT = 1 << 8; + const MULTIPLE_SLICE_SEGMENTS_PER_TILE = 1 << 9; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH265CtbSizeFlagsEXT: Flags { + const _16 = 1; + const _32 = 1 << 1; + const _64 = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH265RateControlFlagsEXT: Flags { + const ATTEMPT_HRD_COMPLIANCE = 1; + const REGULAR_GOP = 1 << 1; + const REFERENCE_PATTERN_FLAT = 1 << 2; + const REFERENCE_PATTERN_DYADIC = 1 << 3; + const TEMPORAL_SUB_LAYER_PATTERN_DYADIC = 1 << 4; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH265StdFlagsEXT: Flags { + const SEPARATE_COLOR_PLANE_FLAG_SET = 1; + const SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET = 1 << 1; + const SCALING_LIST_DATA_PRESENT_FLAG_SET = 1 << 2; + const PCM_ENABLED_FLAG_SET = 1 << 3; + const SPS_TEMPORAL_MVP_ENABLED_FLAG_SET = 1 << 4; + const INIT_QP_MINUS26 = 1 << 5; + const WEIGHTED_PRED_FLAG_SET = 1 << 6; + const WEIGHTED_BIPRED_FLAG_SET = 1 << 7; + const LOG2_PARALLEL_MERGE_LEVEL_MINUS2 = 1 << 8; + const SIGN_DATA_HIDING_ENABLED_FLAG_SET = 1 << 9; + const TRANSFORM_SKIP_ENABLED_FLAG_SET = 1 << 10; + const TRANSFORM_SKIP_ENABLED_FLAG_UNSET = 1 << 11; + const PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET = 1 << 12; + const TRANSQUANT_BYPASS_ENABLED_FLAG_SET = 1 << 13; + const CONSTRAINED_INTRA_PRED_FLAG_SET = 1 << 14; + const ENTROPY_CODING_SYNC_ENABLED_FLAG_SET = 1 << 15; + const DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET = 1 << 16; + const DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET = 1 << 17; + const DEPENDENT_SLICE_SEGMENT_FLAG_SET = 1 << 18; + const SLICE_QP_DELTA = 1 << 19; + const DIFFERENT_SLICE_QP_DELTA = 1 << 20; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeH265TransformBlockSizeFlagsEXT: Flags { + const _4 = 1; + const _8 = 1 << 1; + const _16 = 1 << 2; + const _32 = 1 << 3; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeRateControlFlagsKHR: Flags { } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeRateControlModeFlagsKHR: Flags { + const DEFAULT = 0; + const DISABLED = 1; + const CBR = 1 << 1; + const VBR = 1 << 2; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEncodeUsageFlagsKHR: Flags { + const DEFAULT = 0; + const TRANSCODING = 1; + const STREAMING = 1 << 1; + const RECORDING = 1 << 2; + const CONFERENCING = 1 << 3; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoEndCodingFlagsKHR: Flags { } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoSessionCreateFlagsKHR: Flags { + const PROTECTED_CONTENT = 1; + const ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS = 1 << 1; + } +} + +bitflags! { + /// + #[repr(transparent)] + #[derive(Default)] + pub struct VideoSessionParametersCreateFlagsKHR: Flags { } +} + bitflags! { /// #[repr(transparent)] diff --git a/vulkanalia-sys/src/commands.rs b/vulkanalia-sys/src/commands.rs index 6a366e5e..582042ef 100644 --- a/vulkanalia-sys/src/commands.rs +++ b/vulkanalia-sys/src/commands.rs @@ -152,6 +152,14 @@ pub type PFN_vkBindOpticalFlowSessionImageNV = unsafe extern "system" fn( _layout: ImageLayout, ) -> Result; +/// +pub type PFN_vkBindVideoSessionMemoryKHR = unsafe extern "system" fn( + _device: Device, + _video_session: VideoSessionKHR, + _bind_session_memory_info_count: u32, + _bind_session_memory_infos: *const BindVideoSessionMemoryInfoKHR, +) -> Result; + /// pub type PFN_vkBuildAccelerationStructuresKHR = unsafe extern "system" fn( _device: Device, @@ -233,6 +241,12 @@ pub type PFN_vkCmdBeginTransformFeedbackEXT = unsafe extern "system" fn( _counter_buffer_offsets: *const DeviceSize, ); +/// +pub type PFN_vkCmdBeginVideoCodingKHR = unsafe extern "system" fn( + _command_buffer: CommandBuffer, + _begin_info: *const VideoBeginCodingInfoKHR, +); + /// pub type PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT = unsafe extern "system" fn( _command_buffer: CommandBuffer, @@ -435,6 +449,12 @@ pub type PFN_vkCmdClearDepthStencilImage = unsafe extern "system" fn( _ranges: *const ImageSubresourceRange, ); +/// +pub type PFN_vkCmdControlVideoCodingKHR = unsafe extern "system" fn( + _command_buffer: CommandBuffer, + _coding_control_info: *const VideoCodingControlInfoKHR, +); + /// pub type PFN_vkCmdCopyAccelerationStructureKHR = unsafe extern "system" fn( _command_buffer: CommandBuffer, @@ -603,6 +623,12 @@ pub type PFN_vkCmdDebugMarkerInsertEXT = unsafe extern "system" fn( _marker_info: *const DebugMarkerMarkerInfoEXT, ); +/// +pub type PFN_vkCmdDecodeVideoKHR = unsafe extern "system" fn( + _command_buffer: CommandBuffer, + _decode_info: *const VideoDecodeInfoKHR, +); + /// pub type PFN_vkCmdDecompressMemoryIndirectCountNV = unsafe extern "system" fn( _command_buffer: CommandBuffer, @@ -832,6 +858,12 @@ pub type PFN_vkCmdDrawMultiIndexedEXT = unsafe extern "system" fn( _vertex_offset: *const i32, ); +/// +pub type PFN_vkCmdEncodeVideoKHR = unsafe extern "system" fn( + _command_buffer: CommandBuffer, + _encode_info: *const VideoEncodeInfoKHR, +); + /// pub type PFN_vkCmdEndConditionalRenderingEXT = unsafe extern "system" fn(_command_buffer: CommandBuffer); @@ -878,6 +910,12 @@ pub type PFN_vkCmdEndTransformFeedbackEXT = unsafe extern "system" fn( _counter_buffer_offsets: *const DeviceSize, ); +/// +pub type PFN_vkCmdEndVideoCodingKHR = unsafe extern "system" fn( + _command_buffer: CommandBuffer, + _end_coding_info: *const VideoEndCodingInfoKHR, +); + /// pub type PFN_vkCmdExecuteCommands = unsafe extern "system" fn( _command_buffer: CommandBuffer, @@ -2258,6 +2296,22 @@ pub type PFN_vkCreateViSurfaceNN = unsafe extern "system" fn( _surface: *mut SurfaceKHR, ) -> Result; +/// +pub type PFN_vkCreateVideoSessionKHR = unsafe extern "system" fn( + _device: Device, + _create_info: *const VideoSessionCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _video_session: *mut VideoSessionKHR, +) -> Result; + +/// +pub type PFN_vkCreateVideoSessionParametersKHR = unsafe extern "system" fn( + _device: Device, + _create_info: *const VideoSessionParametersCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _video_session_parameters: *mut VideoSessionParametersKHR, +) -> Result; + /// pub type PFN_vkCreateWaylandSurfaceKHR = unsafe extern "system" fn( _instance: Instance, @@ -2594,6 +2648,20 @@ pub type PFN_vkDestroyValidationCacheEXT = unsafe extern "system" fn( _allocator: *const AllocationCallbacks, ); +/// +pub type PFN_vkDestroyVideoSessionKHR = unsafe extern "system" fn( + _device: Device, + _video_session: VideoSessionKHR, + _allocator: *const AllocationCallbacks, +); + +/// +pub type PFN_vkDestroyVideoSessionParametersKHR = unsafe extern "system" fn( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _allocator: *const AllocationCallbacks, +); + /// pub type PFN_vkDeviceWaitIdle = unsafe extern "system" fn(_device: Device) -> Result; @@ -3049,6 +3117,15 @@ pub type PFN_vkGetDynamicRenderingTilePropertiesQCOM = unsafe extern "system" fn _properties: *mut TilePropertiesQCOM, ) -> Result; +/// +pub type PFN_vkGetEncodedVideoSessionParametersKHR = unsafe extern "system" fn( + _device: Device, + _video_session_parameters_info: *const VideoEncodeSessionParametersGetInfoKHR, + _feedback_info: *mut VideoEncodeSessionParametersFeedbackInfoKHR, + _data_size: *mut usize, + _data: *mut c_void, +) -> Result; + /// pub type PFN_vkGetEventStatus = unsafe extern "system" fn(_device: Device, _event: Event) -> Result; @@ -3701,6 +3778,29 @@ pub type PFN_vkGetPhysicalDeviceToolProperties = unsafe extern "system" fn( /// pub type PFN_vkGetPhysicalDeviceToolPropertiesEXT = PFN_vkGetPhysicalDeviceToolProperties; +/// +pub type PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR = unsafe extern "system" fn( + _physical_device: PhysicalDevice, + _video_profile: *const VideoProfileInfoKHR, + _capabilities: *mut VideoCapabilitiesKHR, +) -> Result; + +/// +pub type PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR = + unsafe extern "system" fn( + _physical_device: PhysicalDevice, + _quality_level_info: *const PhysicalDeviceVideoEncodeQualityLevelInfoKHR, + _quality_level_properties: *mut VideoEncodeQualityLevelPropertiesKHR, + ) -> Result; + +/// +pub type PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR = unsafe extern "system" fn( + _physical_device: PhysicalDevice, + _video_format_info: *const PhysicalDeviceVideoFormatInfoKHR, + _video_format_property_count: *mut u32, + _video_format_properties: *mut VideoFormatPropertiesKHR, +) -> Result; + /// pub type PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = unsafe extern "system" fn( _physical_device: PhysicalDevice, @@ -3990,6 +4090,14 @@ pub type PFN_vkGetValidationCacheDataEXT = unsafe extern "system" fn( _data: *mut c_void, ) -> Result; +/// +pub type PFN_vkGetVideoSessionMemoryRequirementsKHR = unsafe extern "system" fn( + _device: Device, + _video_session: VideoSessionKHR, + _memory_requirements_count: *mut u32, + _memory_requirements: *mut VideoSessionMemoryRequirementsKHR, +) -> Result; + /// pub type PFN_vkGetWinrtDisplayNV = unsafe extern "system" fn( _physical_device: PhysicalDevice, @@ -4369,6 +4477,13 @@ pub type PFN_vkUpdateDescriptorSets = unsafe extern "system" fn( _descriptor_copies: *const CopyDescriptorSet, ); +/// +pub type PFN_vkUpdateVideoSessionParametersKHR = unsafe extern "system" fn( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _update_info: *const VideoSessionParametersUpdateInfoKHR, +) -> Result; + /// pub type PFN_vkWaitForFences = unsafe extern "system" fn( _device: Device, diff --git a/vulkanalia-sys/src/enums.rs b/vulkanalia-sys/src/enums.rs index 1afe87b1..63f05086 100644 --- a/vulkanalia-sys/src/enums.rs +++ b/vulkanalia-sys/src/enums.rs @@ -2767,9 +2767,15 @@ impl ImageLayout { pub const READ_ONLY_OPTIMAL: Self = Self(1000314000); pub const ATTACHMENT_OPTIMAL: Self = Self(1000314001); pub const PRESENT_SRC_KHR: Self = Self(1000001002); + pub const VIDEO_DECODE_DST_KHR: Self = Self(1000024000); + pub const VIDEO_DECODE_SRC_KHR: Self = Self(1000024001); + pub const VIDEO_DECODE_DPB_KHR: Self = Self(1000024002); pub const SHARED_PRESENT_KHR: Self = Self(1000111000); pub const FRAGMENT_DENSITY_MAP_OPTIMAL_EXT: Self = Self(1000218000); pub const FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR: Self = Self(1000164003); + pub const VIDEO_ENCODE_DST_KHR: Self = Self(1000299000); + pub const VIDEO_ENCODE_SRC_KHR: Self = Self(1000299001); + pub const VIDEO_ENCODE_DPB_KHR: Self = Self(1000299002); pub const ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT: Self = Self(1000339000); /// Constructs an instance of this enum with the supplied underlying value. @@ -2806,9 +2812,15 @@ impl fmt::Debug for ImageLayout { 1000314000 => write!(f, "READ_ONLY_OPTIMAL"), 1000314001 => write!(f, "ATTACHMENT_OPTIMAL"), 1000001002 => write!(f, "PRESENT_SRC_KHR"), + 1000024000 => write!(f, "VIDEO_DECODE_DST_KHR"), + 1000024001 => write!(f, "VIDEO_DECODE_SRC_KHR"), + 1000024002 => write!(f, "VIDEO_DECODE_DPB_KHR"), 1000111000 => write!(f, "SHARED_PRESENT_KHR"), 1000218000 => write!(f, "FRAGMENT_DENSITY_MAP_OPTIMAL_EXT"), 1000164003 => write!(f, "FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR"), + 1000299000 => write!(f, "VIDEO_ENCODE_DST_KHR"), + 1000299001 => write!(f, "VIDEO_ENCODE_SRC_KHR"), + 1000299002 => write!(f, "VIDEO_ENCODE_DPB_KHR"), 1000339000 => write!(f, "ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT"), _ => self.0.fmt(f), } @@ -3327,6 +3339,8 @@ impl ObjectType { pub const DISPLAY_KHR: Self = Self(1000002000); pub const DISPLAY_MODE_KHR: Self = Self(1000002001); pub const DEBUG_REPORT_CALLBACK_EXT: Self = Self(1000011000); + pub const VIDEO_SESSION_KHR: Self = Self(1000023000); + pub const VIDEO_SESSION_PARAMETERS_KHR: Self = Self(1000023001); pub const CU_MODULE_NVX: Self = Self(1000029000); pub const CU_FUNCTION_NVX: Self = Self(1000029001); pub const DEBUG_UTILS_MESSENGER_EXT: Self = Self(1000128000); @@ -3392,6 +3406,8 @@ impl fmt::Debug for ObjectType { 1000002000 => write!(f, "DISPLAY_KHR"), 1000002001 => write!(f, "DISPLAY_MODE_KHR"), 1000011000 => write!(f, "DEBUG_REPORT_CALLBACK_EXT"), + 1000023000 => write!(f, "VIDEO_SESSION_KHR"), + 1000023001 => write!(f, "VIDEO_SESSION_PARAMETERS_KHR"), 1000029000 => write!(f, "CU_MODULE_NVX"), 1000029001 => write!(f, "CU_FUNCTION_NVX"), 1000128000 => write!(f, "DEBUG_UTILS_MESSENGER_EXT"), @@ -4283,6 +4299,42 @@ impl fmt::Debug for QueryPoolSamplingModeINTEL { } } +/// +#[repr(transparent)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +pub struct QueryResultStatusKHR(i32); + +impl QueryResultStatusKHR { + pub const ERROR: Self = Self(-1); + pub const NOT_READY: Self = Self(0); + pub const COMPLETE: Self = Self(1); + pub const INSUFFICIENT_BITSTREAM_BUFFER_RANGE: Self = Self(-1000299000); + + /// Constructs an instance of this enum with the supplied underlying value. + #[inline] + pub const fn from_raw(value: i32) -> Self { + Self(value) + } + + /// Gets the underlying value for this enum instance. + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} + +impl fmt::Debug for QueryResultStatusKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self.0 { + -1 => write!(f, "ERROR"), + 0 => write!(f, "NOT_READY"), + 1 => write!(f, "COMPLETE"), + -1000299000 => write!(f, "INSUFFICIENT_BITSTREAM_BUFFER_RANGE"), + _ => self.0.fmt(f), + } + } +} + /// #[repr(transparent)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -4292,12 +4344,14 @@ impl QueryType { pub const OCCLUSION: Self = Self(0); pub const PIPELINE_STATISTICS: Self = Self(1); pub const TIMESTAMP: Self = Self(2); + pub const RESULT_STATUS_ONLY_KHR: Self = Self(1000023000); pub const TRANSFORM_FEEDBACK_STREAM_EXT: Self = Self(1000028004); pub const PERFORMANCE_QUERY_KHR: Self = Self(1000116000); pub const ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR: Self = Self(1000150000); pub const ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR: Self = Self(1000150001); pub const ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV: Self = Self(1000165000); pub const PERFORMANCE_QUERY_INTEL: Self = Self(1000210000); + pub const VIDEO_ENCODE_FEEDBACK_KHR: Self = Self(1000299000); pub const MESH_PRIMITIVES_GENERATED_EXT: Self = Self(1000328000); pub const PRIMITIVES_GENERATED_EXT: Self = Self(1000382000); pub const ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR: Self = @@ -4325,12 +4379,14 @@ impl fmt::Debug for QueryType { 0 => write!(f, "OCCLUSION"), 1 => write!(f, "PIPELINE_STATISTICS"), 2 => write!(f, "TIMESTAMP"), + 1000023000 => write!(f, "RESULT_STATUS_ONLY_KHR"), 1000028004 => write!(f, "TRANSFORM_FEEDBACK_STREAM_EXT"), 1000116000 => write!(f, "PERFORMANCE_QUERY_KHR"), 1000150000 => write!(f, "ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR"), 1000150001 => write!(f, "ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR"), 1000165000 => write!(f, "ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV"), 1000210000 => write!(f, "PERFORMANCE_QUERY_INTEL"), + 1000299000 => write!(f, "VIDEO_ENCODE_FEEDBACK_KHR"), 1000328000 => write!(f, "MESH_PRIMITIVES_GENERATED_EXT"), 1000382000 => write!(f, "PRIMITIVES_GENERATED_EXT"), 1000386000 => write!( @@ -4516,6 +4572,12 @@ impl Result { pub const ERROR_INCOMPATIBLE_DISPLAY_KHR: Self = Self(-1000003001); pub const ERROR_VALIDATION_FAILED_EXT: Self = Self(-1000011001); pub const ERROR_INVALID_SHADER_NV: Self = Self(-1000012000); + pub const ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR: Self = Self(-1000023000); + pub const ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR: Self = Self(-1000023001); + pub const ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR: Self = Self(-1000023002); + pub const ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR: Self = Self(-1000023003); + pub const ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR: Self = Self(-1000023004); + pub const ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR: Self = Self(-1000023005); pub const ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: Self = Self(-1000158000); pub const ERROR_NOT_PERMITTED_KHR: Self = Self(-1000174001); pub const ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: Self = Self(-1000255000); @@ -4523,6 +4585,7 @@ impl Result { pub const THREAD_DONE_KHR: Self = Self(1000268001); pub const OPERATION_DEFERRED_KHR: Self = Self(1000268002); pub const OPERATION_NOT_DEFERRED_KHR: Self = Self(1000268003); + pub const ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR: Self = Self(-1000299000); pub const ERROR_COMPRESSION_EXHAUSTED_EXT: Self = Self(-1000338000); pub const ERROR_INCOMPATIBLE_SHADER_BINARY_EXT: Self = Self(1000482000); @@ -4573,6 +4636,12 @@ impl fmt::Debug for Result { -1000003001 => write!(f, "ERROR_INCOMPATIBLE_DISPLAY_KHR"), -1000011001 => write!(f, "ERROR_VALIDATION_FAILED_EXT"), -1000012000 => write!(f, "ERROR_INVALID_SHADER_NV"), + -1000023000 => write!(f, "ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR"), + -1000023001 => write!(f, "ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR"), + -1000023002 => write!(f, "ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR"), + -1000023003 => write!(f, "ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR"), + -1000023004 => write!(f, "ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR"), + -1000023005 => write!(f, "ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR"), -1000158000 => write!(f, "ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"), -1000174001 => write!(f, "ERROR_NOT_PERMITTED_KHR"), -1000255000 => write!(f, "ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"), @@ -4580,6 +4649,7 @@ impl fmt::Debug for Result { 1000268001 => write!(f, "THREAD_DONE_KHR"), 1000268002 => write!(f, "OPERATION_DEFERRED_KHR"), 1000268003 => write!(f, "OPERATION_NOT_DEFERRED_KHR"), + -1000299000 => write!(f, "ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "ERROR_COMPRESSION_EXHAUSTED_EXT"), 1000482000 => write!(f, "ERROR_INCOMPATIBLE_SHADER_BINARY_EXT"), _ => self.0.fmt(f), @@ -4621,6 +4691,12 @@ impl fmt::Display for Result { -1000003001 => write!(f, "The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image."), -1000011001 => write!(f, "ERROR_VALIDATION_FAILED_EXT"), -1000012000 => write!(f, "One or more shaders failed to compile or link. More details are reported back to the application via VK_EXT_debug_report if enabled."), + -1000023000 => write!(f, "ERROR_IMAGE_USAGE_NOT_SUPPORTED_KHR"), + -1000023001 => write!(f, "ERROR_VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR"), + -1000023002 => write!(f, "ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR"), + -1000023003 => write!(f, "ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR"), + -1000023004 => write!(f, "ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR"), + -1000023005 => write!(f, "ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR"), -1000158000 => write!(f, "ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"), -1000174001 => write!(f, "ERROR_NOT_PERMITTED_KHR"), -1000255000 => write!(f, "An operation on a swapchain created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT failed as it did not have exclusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application's control."), @@ -4628,6 +4704,7 @@ impl fmt::Display for Result { 1000268001 => write!(f, "A deferred operation is not complete but there is no work remaining to assign to additional threads."), 1000268002 => write!(f, "A deferred operation was requested and at least some of the work was deferred."), 1000268003 => write!(f, "A deferred operation was requested and no operations were deferred."), + -1000299000 => write!(f, "ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "ERROR_COMPRESSION_EXHAUSTED_EXT"), 1000482000 => write!(f, "ERROR_INCOMPATIBLE_SHADER_BINARY_EXT"), _ => write!(f, "unknown Vulkan result (code = {})", self.0), @@ -5455,6 +5532,26 @@ impl StructureType { pub const DEBUG_MARKER_OBJECT_NAME_INFO_EXT: Self = Self(1000022000); pub const DEBUG_MARKER_OBJECT_TAG_INFO_EXT: Self = Self(1000022001); pub const DEBUG_MARKER_MARKER_INFO_EXT: Self = Self(1000022002); + pub const VIDEO_PROFILE_INFO_KHR: Self = Self(1000023000); + pub const VIDEO_CAPABILITIES_KHR: Self = Self(1000023001); + pub const VIDEO_PICTURE_RESOURCE_INFO_KHR: Self = Self(1000023002); + pub const VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR: Self = Self(1000023003); + pub const BIND_VIDEO_SESSION_MEMORY_INFO_KHR: Self = Self(1000023004); + pub const VIDEO_SESSION_CREATE_INFO_KHR: Self = Self(1000023005); + pub const VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR: Self = Self(1000023006); + pub const VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR: Self = Self(1000023007); + pub const VIDEO_BEGIN_CODING_INFO_KHR: Self = Self(1000023008); + pub const VIDEO_END_CODING_INFO_KHR: Self = Self(1000023009); + pub const VIDEO_CODING_CONTROL_INFO_KHR: Self = Self(1000023010); + pub const VIDEO_REFERENCE_SLOT_INFO_KHR: Self = Self(1000023011); + pub const QUEUE_FAMILY_VIDEO_PROPERTIES_KHR: Self = Self(1000023012); + pub const VIDEO_PROFILE_LIST_INFO_KHR: Self = Self(1000023013); + pub const PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR: Self = Self(1000023014); + pub const VIDEO_FORMAT_PROPERTIES_KHR: Self = Self(1000023015); + pub const QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR: Self = Self(1000023016); + pub const VIDEO_DECODE_INFO_KHR: Self = Self(1000024000); + pub const VIDEO_DECODE_CAPABILITIES_KHR: Self = Self(1000024001); + pub const VIDEO_DECODE_USAGE_INFO_KHR: Self = Self(1000024002); pub const DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: Self = Self(1000026000); pub const DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: Self = Self(1000026001); pub const DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: Self = Self(1000026002); @@ -5466,6 +5563,40 @@ impl StructureType { pub const CU_LAUNCH_INFO_NVX: Self = Self(1000029002); pub const IMAGE_VIEW_HANDLE_INFO_NVX: Self = Self(1000030000); pub const IMAGE_VIEW_ADDRESS_PROPERTIES_NVX: Self = Self(1000030001); + pub const VIDEO_ENCODE_H264_CAPABILITIES_EXT: Self = Self(1000038000); + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT: Self = Self(1000038001); + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT: Self = Self(1000038002); + pub const VIDEO_ENCODE_H264_PICTURE_INFO_EXT: Self = Self(1000038003); + pub const VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT: Self = Self(1000038004); + pub const VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT: Self = Self(1000038005); + pub const VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_EXT: Self = Self(1000038006); + pub const VIDEO_ENCODE_H264_PROFILE_INFO_EXT: Self = Self(1000038007); + pub const VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT: Self = Self(1000038008); + pub const VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT: Self = Self(1000038009); + pub const VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT: Self = Self(1000038010); + pub const VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_EXT: Self = Self(1000038011); + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_EXT: Self = Self(1000038012); + pub const VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_EXT: Self = Self(1000038013); + pub const VIDEO_ENCODE_H265_CAPABILITIES_EXT: Self = Self(1000039000); + pub const VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT: Self = Self(1000039001); + pub const VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT: Self = Self(1000039002); + pub const VIDEO_ENCODE_H265_PICTURE_INFO_EXT: Self = Self(1000039003); + pub const VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT: Self = Self(1000039004); + pub const VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT: Self = Self(1000039005); + pub const VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_EXT: Self = Self(1000039006); + pub const VIDEO_ENCODE_H265_PROFILE_INFO_EXT: Self = Self(1000039007); + pub const VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT: Self = Self(1000039009); + pub const VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT: Self = Self(1000039010); + pub const VIDEO_ENCODE_H265_SESSION_CREATE_INFO_EXT: Self = Self(1000039011); + pub const VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_EXT: Self = Self(1000039012); + pub const VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_EXT: Self = Self(1000039013); + pub const VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_EXT: Self = Self(1000039014); + pub const VIDEO_DECODE_H264_CAPABILITIES_KHR: Self = Self(1000040000); + pub const VIDEO_DECODE_H264_PICTURE_INFO_KHR: Self = Self(1000040001); + pub const VIDEO_DECODE_H264_PROFILE_INFO_KHR: Self = Self(1000040003); + pub const VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR: Self = Self(1000040004); + pub const VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR: Self = Self(1000040005); + pub const VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR: Self = Self(1000040006); pub const TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: Self = Self(1000041000); pub const RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: Self = Self(1000044006); pub const RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: Self = Self(1000044007); @@ -5631,6 +5762,12 @@ impl StructureType { pub const PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD: Self = Self(1000183000); pub const CALIBRATED_TIMESTAMP_INFO_EXT: Self = Self(1000184000); pub const PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: Self = Self(1000185000); + pub const VIDEO_DECODE_H265_CAPABILITIES_KHR: Self = Self(1000187000); + pub const VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR: Self = Self(1000187001); + pub const VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR: Self = Self(1000187002); + pub const VIDEO_DECODE_H265_PROFILE_INFO_KHR: Self = Self(1000187003); + pub const VIDEO_DECODE_H265_PICTURE_INFO_KHR: Self = Self(1000187004); + pub const VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR: Self = Self(1000187005); pub const DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR: Self = Self(1000174000); pub const PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR: Self = Self(1000388000); pub const QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR: Self = Self(1000388001); @@ -5760,6 +5897,17 @@ impl StructureType { pub const SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV: Self = Self(1000292002); pub const PRESENT_ID_KHR: Self = Self(1000294000); pub const PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR: Self = Self(1000294001); + pub const VIDEO_ENCODE_INFO_KHR: Self = Self(1000299000); + pub const VIDEO_ENCODE_RATE_CONTROL_INFO_KHR: Self = Self(1000299001); + pub const VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR: Self = Self(1000299002); + pub const VIDEO_ENCODE_CAPABILITIES_KHR: Self = Self(1000299003); + pub const VIDEO_ENCODE_USAGE_INFO_KHR: Self = Self(1000299004); + pub const QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR: Self = Self(1000299005); + pub const PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR: Self = Self(1000299006); + pub const VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR: Self = Self(1000299007); + pub const VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR: Self = Self(1000299008); + pub const VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR: Self = Self(1000299009); + pub const VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR: Self = Self(1000299010); pub const PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV: Self = Self(1000300000); pub const DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV: Self = Self(1000300001); pub const REFRESH_OBJECT_LIST_KHR: Self = Self(1000308000); @@ -6292,6 +6440,26 @@ impl fmt::Debug for StructureType { 1000022000 => write!(f, "DEBUG_MARKER_OBJECT_NAME_INFO_EXT"), 1000022001 => write!(f, "DEBUG_MARKER_OBJECT_TAG_INFO_EXT"), 1000022002 => write!(f, "DEBUG_MARKER_MARKER_INFO_EXT"), + 1000023000 => write!(f, "VIDEO_PROFILE_INFO_KHR"), + 1000023001 => write!(f, "VIDEO_CAPABILITIES_KHR"), + 1000023002 => write!(f, "VIDEO_PICTURE_RESOURCE_INFO_KHR"), + 1000023003 => write!(f, "VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR"), + 1000023004 => write!(f, "BIND_VIDEO_SESSION_MEMORY_INFO_KHR"), + 1000023005 => write!(f, "VIDEO_SESSION_CREATE_INFO_KHR"), + 1000023006 => write!(f, "VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR"), + 1000023007 => write!(f, "VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR"), + 1000023008 => write!(f, "VIDEO_BEGIN_CODING_INFO_KHR"), + 1000023009 => write!(f, "VIDEO_END_CODING_INFO_KHR"), + 1000023010 => write!(f, "VIDEO_CODING_CONTROL_INFO_KHR"), + 1000023011 => write!(f, "VIDEO_REFERENCE_SLOT_INFO_KHR"), + 1000023012 => write!(f, "QUEUE_FAMILY_VIDEO_PROPERTIES_KHR"), + 1000023013 => write!(f, "VIDEO_PROFILE_LIST_INFO_KHR"), + 1000023014 => write!(f, "PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR"), + 1000023015 => write!(f, "VIDEO_FORMAT_PROPERTIES_KHR"), + 1000023016 => write!(f, "QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR"), + 1000024000 => write!(f, "VIDEO_DECODE_INFO_KHR"), + 1000024001 => write!(f, "VIDEO_DECODE_CAPABILITIES_KHR"), + 1000024002 => write!(f, "VIDEO_DECODE_USAGE_INFO_KHR"), 1000026000 => write!(f, "DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV"), 1000026001 => write!(f, "DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV"), 1000026002 => write!(f, "DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV"), @@ -6303,6 +6471,40 @@ impl fmt::Debug for StructureType { 1000029002 => write!(f, "CU_LAUNCH_INFO_NVX"), 1000030000 => write!(f, "IMAGE_VIEW_HANDLE_INFO_NVX"), 1000030001 => write!(f, "IMAGE_VIEW_ADDRESS_PROPERTIES_NVX"), + 1000038000 => write!(f, "VIDEO_ENCODE_H264_CAPABILITIES_EXT"), + 1000038001 => write!(f, "VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT"), + 1000038002 => write!(f, "VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT"), + 1000038003 => write!(f, "VIDEO_ENCODE_H264_PICTURE_INFO_EXT"), + 1000038004 => write!(f, "VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT"), + 1000038005 => write!(f, "VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT"), + 1000038006 => write!(f, "VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_EXT"), + 1000038007 => write!(f, "VIDEO_ENCODE_H264_PROFILE_INFO_EXT"), + 1000038008 => write!(f, "VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT"), + 1000038009 => write!(f, "VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT"), + 1000038010 => write!(f, "VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT"), + 1000038011 => write!(f, "VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_EXT"), + 1000038012 => write!(f, "VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_EXT"), + 1000038013 => write!(f, "VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_EXT"), + 1000039000 => write!(f, "VIDEO_ENCODE_H265_CAPABILITIES_EXT"), + 1000039001 => write!(f, "VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT"), + 1000039002 => write!(f, "VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT"), + 1000039003 => write!(f, "VIDEO_ENCODE_H265_PICTURE_INFO_EXT"), + 1000039004 => write!(f, "VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT"), + 1000039005 => write!(f, "VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT"), + 1000039006 => write!(f, "VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_EXT"), + 1000039007 => write!(f, "VIDEO_ENCODE_H265_PROFILE_INFO_EXT"), + 1000039009 => write!(f, "VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT"), + 1000039010 => write!(f, "VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT"), + 1000039011 => write!(f, "VIDEO_ENCODE_H265_SESSION_CREATE_INFO_EXT"), + 1000039012 => write!(f, "VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_EXT"), + 1000039013 => write!(f, "VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_EXT"), + 1000039014 => write!(f, "VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_EXT"), + 1000040000 => write!(f, "VIDEO_DECODE_H264_CAPABILITIES_KHR"), + 1000040001 => write!(f, "VIDEO_DECODE_H264_PICTURE_INFO_KHR"), + 1000040003 => write!(f, "VIDEO_DECODE_H264_PROFILE_INFO_KHR"), + 1000040004 => write!(f, "VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR"), + 1000040005 => write!(f, "VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR"), + 1000040006 => write!(f, "VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR"), 1000041000 => write!(f, "TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD"), 1000044006 => write!(f, "RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR"), 1000044007 => write!(f, "RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT"), @@ -6492,6 +6694,12 @@ impl fmt::Debug for StructureType { 1000183000 => write!(f, "PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD"), 1000184000 => write!(f, "CALIBRATED_TIMESTAMP_INFO_EXT"), 1000185000 => write!(f, "PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD"), + 1000187000 => write!(f, "VIDEO_DECODE_H265_CAPABILITIES_KHR"), + 1000187001 => write!(f, "VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR"), + 1000187002 => write!(f, "VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR"), + 1000187003 => write!(f, "VIDEO_DECODE_H265_PROFILE_INFO_KHR"), + 1000187004 => write!(f, "VIDEO_DECODE_H265_PICTURE_INFO_KHR"), + 1000187005 => write!(f, "VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR"), 1000174000 => write!(f, "DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR"), 1000388000 => write!(f, "PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR"), 1000388001 => write!(f, "QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR"), @@ -6637,6 +6845,17 @@ impl fmt::Debug for StructureType { 1000292002 => write!(f, "SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV"), 1000294000 => write!(f, "PRESENT_ID_KHR"), 1000294001 => write!(f, "PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR"), + 1000299000 => write!(f, "VIDEO_ENCODE_INFO_KHR"), + 1000299001 => write!(f, "VIDEO_ENCODE_RATE_CONTROL_INFO_KHR"), + 1000299002 => write!(f, "VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR"), + 1000299003 => write!(f, "VIDEO_ENCODE_CAPABILITIES_KHR"), + 1000299004 => write!(f, "VIDEO_ENCODE_USAGE_INFO_KHR"), + 1000299005 => write!(f, "QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR"), + 1000299006 => write!(f, "PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR"), + 1000299007 => write!(f, "VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR"), + 1000299008 => write!(f, "VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR"), + 1000299009 => write!(f, "VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR"), + 1000299010 => write!(f, "VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR"), 1000300000 => write!(f, "PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV"), 1000300001 => write!(f, "DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV"), 1000308000 => write!(f, "REFRESH_OBJECT_LIST_KHR"), @@ -7429,6 +7648,44 @@ impl fmt::Debug for VertexInputRate { } } +/// +#[repr(transparent)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +pub struct VideoEncodeTuningModeKHR(i32); + +impl VideoEncodeTuningModeKHR { + pub const DEFAULT: Self = Self(0); + pub const HIGH_QUALITY: Self = Self(1); + pub const LOW_LATENCY: Self = Self(2); + pub const ULTRA_LOW_LATENCY: Self = Self(3); + pub const LOSSLESS: Self = Self(4); + + /// Constructs an instance of this enum with the supplied underlying value. + #[inline] + pub const fn from_raw(value: i32) -> Self { + Self(value) + } + + /// Gets the underlying value for this enum instance. + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } +} + +impl fmt::Debug for VideoEncodeTuningModeKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self.0 { + 0 => write!(f, "DEFAULT"), + 1 => write!(f, "HIGH_QUALITY"), + 2 => write!(f, "LOW_LATENCY"), + 3 => write!(f, "ULTRA_LOW_LATENCY"), + 4 => write!(f, "LOSSLESS"), + _ => self.0.fmt(f), + } + } +} + /// #[repr(transparent)] #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] diff --git a/vulkanalia-sys/src/extensions.rs b/vulkanalia-sys/src/extensions.rs index 82eb5c5f..791ceee9 100644 --- a/vulkanalia-sys/src/extensions.rs +++ b/vulkanalia-sys/src/extensions.rs @@ -2486,6 +2486,54 @@ pub const EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION: Extension = Extension { promoted_to: None, }; +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +#[allow(deprecated)] +pub const EXT_VIDEO_ENCODE_H264_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_EXT_video_encode_h264"), + number: 39, + type_: "device", + author: "KHR", + contact: "Ahmed Abdelkhalek @aabdelkh", + platform: Some("provisional"), + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +#[allow(deprecated)] +pub const EXT_VIDEO_ENCODE_H265_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_EXT_video_encode_h265"), + number: 40, + type_: "device", + author: "KHR", + contact: "Ahmed Abdelkhalek @aabdelkh", + platform: Some("provisional"), + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + /// #[allow(deprecated)] pub const EXT_YCBCR_2PLANE_444_FORMATS_EXTENSION: Extension = Extension { @@ -4223,6 +4271,94 @@ pub const KHR_VARIABLE_POINTERS_EXTENSION: Extension = Extension { promoted_to: Some("VK_VERSION_1_1"), }; +/// +#[allow(deprecated)] +pub const KHR_VIDEO_DECODE_H264_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_video_decode_h264"), + number: 41, + type_: "device", + author: "KHR", + contact: "peter.fang@amd.com", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + +/// +#[allow(deprecated)] +pub const KHR_VIDEO_DECODE_H265_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_video_decode_h265"), + number: 188, + type_: "device", + author: "KHR", + contact: "peter.fang@amd.com", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + +/// +#[allow(deprecated)] +pub const KHR_VIDEO_DECODE_QUEUE_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_video_decode_queue"), + number: 25, + type_: "device", + author: "KHR", + contact: "jake.beju@amd.com", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +#[allow(deprecated)] +pub const KHR_VIDEO_ENCODE_QUEUE_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_video_encode_queue"), + number: 300, + type_: "device", + author: "KHR", + contact: "Ahmed Abdelkhalek @aabdelkh", + platform: Some("provisional"), + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + +/// +#[allow(deprecated)] +pub const KHR_VIDEO_QUEUE_EXTENSION: Extension = Extension { + name: ExtensionName::from_bytes(b"VK_KHR_video_queue"), + number: 24, + type_: "device", + author: "KHR", + contact: "Tony Zlatinski @tzlatinski", + platform: None, + required_extensions: None, + required_version: None, + deprecated_by: None, + obsoleted_by: None, + promoted_to: None, +}; + /// #[allow(deprecated)] pub const KHR_VULKAN_MEMORY_MODEL_EXTENSION: Extension = Extension { diff --git a/vulkanalia-sys/src/handles.rs b/vulkanalia-sys/src/handles.rs index db718f57..9b6edf75 100644 --- a/vulkanalia-sys/src/handles.rs +++ b/vulkanalia-sys/src/handles.rs @@ -2116,6 +2116,94 @@ impl fmt::Debug for ValidationCacheEXT { } } +/// +#[repr(transparent)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] +pub struct VideoSessionKHR(u64); + +impl Handle for VideoSessionKHR { + type Repr = u64; + + const TYPE: ObjectType = ObjectType::VIDEO_SESSION_KHR; + + #[inline] + fn null() -> Self { + Self(0) + } + + #[inline] + fn from_raw(value: Self::Repr) -> Self { + Self(value) + } + + #[inline] + fn as_raw(self) -> Self::Repr { + self.0 + } + + #[inline] + fn is_null(self) -> bool { + self.0 == 0 + } +} + +impl Default for VideoSessionKHR { + #[inline] + fn default() -> Self { + Self::null() + } +} + +impl fmt::Debug for VideoSessionKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "VideoSessionKHR({:p})", self.0 as *const u8) + } +} + +/// +#[repr(transparent)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] +pub struct VideoSessionParametersKHR(u64); + +impl Handle for VideoSessionParametersKHR { + type Repr = u64; + + const TYPE: ObjectType = ObjectType::VIDEO_SESSION_PARAMETERS_KHR; + + #[inline] + fn null() -> Self { + Self(0) + } + + #[inline] + fn from_raw(value: Self::Repr) -> Self { + Self(value) + } + + #[inline] + fn as_raw(self) -> Self::Repr { + self.0 + } + + #[inline] + fn is_null(self) -> bool { + self.0 == 0 + } +} + +impl Default for VideoSessionParametersKHR { + #[inline] + fn default() -> Self { + Self::null() + } +} + +impl fmt::Debug for VideoSessionParametersKHR { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "VideoSessionParametersKHR({:p})", self.0 as *const u8) + } +} + /// pub type DescriptorUpdateTemplateKHR = DescriptorUpdateTemplate; /// diff --git a/vulkanalia-sys/src/lib.rs b/vulkanalia-sys/src/lib.rs index 625142c4..076f1e4c 100644 --- a/vulkanalia-sys/src/lib.rs +++ b/vulkanalia-sys/src/lib.rs @@ -33,6 +33,9 @@ mod typedefs; #[rustfmt::skip] mod unions; +#[rustfmt::skip] +pub mod video; + pub use self::arrays::*; pub use self::bitfields::*; pub use self::bitmasks::*; diff --git a/vulkanalia-sys/src/structs.rs b/vulkanalia-sys/src/structs.rs index 12636ce0..5b4c6c56 100644 --- a/vulkanalia-sys/src/structs.rs +++ b/vulkanalia-sys/src/structs.rs @@ -1289,6 +1289,32 @@ pub struct BindVertexBufferIndirectCommandNV { pub stride: u32, } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct BindVideoSessionMemoryInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub memory_bind_index: u32, + pub memory: DeviceMemory, + pub memory_offset: DeviceSize, + pub memory_size: DeviceSize, +} + +impl Default for BindVideoSessionMemoryInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::BIND_VIDEO_SESSION_MEMORY_INFO_KHR, + next: ptr::null(), + memory_bind_index: u32::default(), + memory: DeviceMemory::default(), + memory_offset: DeviceSize::default(), + memory_size: DeviceSize::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -15653,6 +15679,48 @@ impl Default for PhysicalDeviceVertexInputDynamicStateFeaturesEXT { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub video_profile: *const VideoProfileInfoKHR, + pub quality_level: u32, +} + +impl Default for PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR, + next: ptr::null(), + video_profile: ptr::null(), + quality_level: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct PhysicalDeviceVideoFormatInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub image_usage: ImageUsageFlags, +} + +impl Default for PhysicalDeviceVideoFormatInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR, + next: ptr::null(), + image_usage: ImageUsageFlags::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -17792,6 +17860,26 @@ impl Default for QueryPoolPerformanceQueryCreateInfoINTEL { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct QueryPoolVideoEncodeFeedbackCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, +} + +impl Default for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR, + next: ptr::null(), + encode_feedback_flags: VideoEncodeFeedbackFlagsKHR::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -17884,6 +17972,46 @@ impl Default for QueueFamilyProperties2 { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct QueueFamilyQueryResultStatusPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub query_result_status_support: Bool32, +} + +impl Default for QueueFamilyQueryResultStatusPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR, + next: ptr::null_mut(), + query_result_status_support: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct QueueFamilyVideoPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub video_codec_operations: VideoCodecOperationFlagsKHR, +} + +impl Default for QueueFamilyVideoPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::QUEUE_FAMILY_VIDEO_PROPERTIES_KHR, + next: ptr::null_mut(), + video_codec_operations: VideoCodecOperationFlagsKHR::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] @@ -20863,6 +20991,1714 @@ impl Default for ViSurfaceCreateInfoNN { } } +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoBeginCodingInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoBeginCodingFlagsKHR, + pub video_session: VideoSessionKHR, + pub video_session_parameters: VideoSessionParametersKHR, + pub reference_slot_count: u32, + pub reference_slots: *const VideoReferenceSlotInfoKHR, +} + +impl Default for VideoBeginCodingInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_BEGIN_CODING_INFO_KHR, + next: ptr::null(), + flags: VideoBeginCodingFlagsKHR::default(), + video_session: VideoSessionKHR::default(), + video_session_parameters: VideoSessionParametersKHR::default(), + reference_slot_count: u32::default(), + reference_slots: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoCapabilitiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub flags: VideoCapabilityFlagsKHR, + pub min_bitstream_buffer_offset_alignment: DeviceSize, + pub min_bitstream_buffer_size_alignment: DeviceSize, + pub picture_access_granularity: Extent2D, + pub min_coded_extent: Extent2D, + pub max_coded_extent: Extent2D, + pub max_dpb_slots: u32, + pub max_active_reference_pictures: u32, + pub std_header_version: ExtensionProperties, +} + +impl Default for VideoCapabilitiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_CAPABILITIES_KHR, + next: ptr::null_mut(), + flags: VideoCapabilityFlagsKHR::default(), + min_bitstream_buffer_offset_alignment: DeviceSize::default(), + min_bitstream_buffer_size_alignment: DeviceSize::default(), + picture_access_granularity: Extent2D::default(), + min_coded_extent: Extent2D::default(), + max_coded_extent: Extent2D::default(), + max_dpb_slots: u32::default(), + max_active_reference_pictures: u32::default(), + std_header_version: ExtensionProperties::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoCodingControlInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoCodingControlFlagsKHR, +} + +impl Default for VideoCodingControlInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_CODING_CONTROL_INFO_KHR, + next: ptr::null(), + flags: VideoCodingControlFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeCapabilitiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub flags: VideoDecodeCapabilityFlagsKHR, +} + +impl Default for VideoDecodeCapabilitiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_CAPABILITIES_KHR, + next: ptr::null_mut(), + flags: VideoDecodeCapabilityFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264CapabilitiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub max_level_idc: video::StdVideoH264LevelIdc, + pub field_offset_granularity: Offset2D, +} + +impl Default for VideoDecodeH264CapabilitiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_CAPABILITIES_KHR, + next: ptr::null_mut(), + max_level_idc: video::StdVideoH264LevelIdc::default(), + field_offset_granularity: Offset2D::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264DpbSlotInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_reference_info: *const video::StdVideoDecodeH264ReferenceInfo, +} + +impl Default for VideoDecodeH264DpbSlotInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR, + next: ptr::null(), + std_reference_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264PictureInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_picture_info: *const video::StdVideoDecodeH264PictureInfo, + pub slice_count: u32, + pub slice_offsets: *const u32, +} + +impl Default for VideoDecodeH264PictureInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_PICTURE_INFO_KHR, + next: ptr::null(), + std_picture_info: ptr::null(), + slice_count: u32::default(), + slice_offsets: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264ProfileInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_profile_idc: video::StdVideoH264ProfileIdc, + pub picture_layout: VideoDecodeH264PictureLayoutFlagsKHR, +} + +impl Default for VideoDecodeH264ProfileInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_PROFILE_INFO_KHR, + next: ptr::null(), + std_profile_idc: video::StdVideoH264ProfileIdc::default(), + picture_layout: VideoDecodeH264PictureLayoutFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264SessionParametersAddInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_sps_count: u32, + pub std_sp_ss: *const video::StdVideoH264SequenceParameterSet, + pub std_pps_count: u32, + pub std_pp_ss: *const video::StdVideoH264PictureParameterSet, +} + +impl Default for VideoDecodeH264SessionParametersAddInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR, + next: ptr::null(), + std_sps_count: u32::default(), + std_sp_ss: ptr::null(), + std_pps_count: u32::default(), + std_pp_ss: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH264SessionParametersCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub max_std_sps_count: u32, + pub max_std_pps_count: u32, + pub parameters_add_info: *const VideoDecodeH264SessionParametersAddInfoKHR, +} + +impl Default for VideoDecodeH264SessionParametersCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR, + next: ptr::null(), + max_std_sps_count: u32::default(), + max_std_pps_count: u32::default(), + parameters_add_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265CapabilitiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub max_level_idc: video::StdVideoH265LevelIdc, +} + +impl Default for VideoDecodeH265CapabilitiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_CAPABILITIES_KHR, + next: ptr::null_mut(), + max_level_idc: video::StdVideoH265LevelIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265DpbSlotInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_reference_info: *const video::StdVideoDecodeH265ReferenceInfo, +} + +impl Default for VideoDecodeH265DpbSlotInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR, + next: ptr::null(), + std_reference_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265PictureInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_picture_info: *const video::StdVideoDecodeH265PictureInfo, + pub slice_segment_count: u32, + pub slice_segment_offsets: *const u32, +} + +impl Default for VideoDecodeH265PictureInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_PICTURE_INFO_KHR, + next: ptr::null(), + std_picture_info: ptr::null(), + slice_segment_count: u32::default(), + slice_segment_offsets: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265ProfileInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_profile_idc: video::StdVideoH265ProfileIdc, +} + +impl Default for VideoDecodeH265ProfileInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_PROFILE_INFO_KHR, + next: ptr::null(), + std_profile_idc: video::StdVideoH265ProfileIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265SessionParametersAddInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub std_vps_count: u32, + pub std_vp_ss: *const video::StdVideoH265VideoParameterSet, + pub std_sps_count: u32, + pub std_sp_ss: *const video::StdVideoH265SequenceParameterSet, + pub std_pps_count: u32, + pub std_pp_ss: *const video::StdVideoH265PictureParameterSet, +} + +impl Default for VideoDecodeH265SessionParametersAddInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR, + next: ptr::null(), + std_vps_count: u32::default(), + std_vp_ss: ptr::null(), + std_sps_count: u32::default(), + std_sp_ss: ptr::null(), + std_pps_count: u32::default(), + std_pp_ss: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeH265SessionParametersCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub max_std_vps_count: u32, + pub max_std_sps_count: u32, + pub max_std_pps_count: u32, + pub parameters_add_info: *const VideoDecodeH265SessionParametersAddInfoKHR, +} + +impl Default for VideoDecodeH265SessionParametersCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR, + next: ptr::null(), + max_std_vps_count: u32::default(), + max_std_sps_count: u32::default(), + max_std_pps_count: u32::default(), + parameters_add_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoDecodeFlagsKHR, + pub src_buffer: Buffer, + pub src_buffer_offset: DeviceSize, + pub src_buffer_range: DeviceSize, + pub dst_picture_resource: VideoPictureResourceInfoKHR, + pub setup_reference_slot: *const VideoReferenceSlotInfoKHR, + pub reference_slot_count: u32, + pub reference_slots: *const VideoReferenceSlotInfoKHR, +} + +impl Default for VideoDecodeInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_INFO_KHR, + next: ptr::null(), + flags: VideoDecodeFlagsKHR::default(), + src_buffer: Buffer::default(), + src_buffer_offset: DeviceSize::default(), + src_buffer_range: DeviceSize::default(), + dst_picture_resource: VideoPictureResourceInfoKHR::default(), + setup_reference_slot: ptr::null(), + reference_slot_count: u32::default(), + reference_slots: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoDecodeUsageInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub video_usage_hints: VideoDecodeUsageFlagsKHR, +} + +impl Default for VideoDecodeUsageInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_DECODE_USAGE_INFO_KHR, + next: ptr::null(), + video_usage_hints: VideoDecodeUsageFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeCapabilitiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub flags: VideoEncodeCapabilityFlagsKHR, + pub rate_control_modes: VideoEncodeRateControlModeFlagsKHR, + pub max_rate_control_layers: u32, + pub max_bitrate: u64, + pub max_quality_levels: u32, + pub encode_input_picture_granularity: Extent2D, + pub supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, +} + +impl Default for VideoEncodeCapabilitiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_CAPABILITIES_KHR, + next: ptr::null_mut(), + flags: VideoEncodeCapabilityFlagsKHR::default(), + rate_control_modes: VideoEncodeRateControlModeFlagsKHR::default(), + max_rate_control_layers: u32::default(), + max_bitrate: u64::default(), + max_quality_levels: u32::default(), + encode_input_picture_granularity: Extent2D::default(), + supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264CapabilitiesEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub flags: VideoEncodeH264CapabilityFlagsEXT, + pub max_level_idc: video::StdVideoH264LevelIdc, + pub max_slice_count: u32, + pub max_p_picture_l0_reference_count: u32, + pub max_b_picture_l0_reference_count: u32, + pub max_l1_reference_count: u32, + pub max_temporal_layer_count: u32, + pub expect_dyadic_temporal_layer_pattern: Bool32, + pub min_qp: i32, + pub max_qp: i32, + pub prefers_gop_remaining_frames: Bool32, + pub requires_gop_remaining_frames: Bool32, + pub std_syntax_flags: VideoEncodeH264StdFlagsEXT, +} + +impl Default for VideoEncodeH264CapabilitiesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_CAPABILITIES_EXT, + next: ptr::null_mut(), + flags: VideoEncodeH264CapabilityFlagsEXT::default(), + max_level_idc: video::StdVideoH264LevelIdc::default(), + max_slice_count: u32::default(), + max_p_picture_l0_reference_count: u32::default(), + max_b_picture_l0_reference_count: u32::default(), + max_l1_reference_count: u32::default(), + max_temporal_layer_count: u32::default(), + expect_dyadic_temporal_layer_pattern: Bool32::default(), + min_qp: i32::default(), + max_qp: i32::default(), + prefers_gop_remaining_frames: Bool32::default(), + requires_gop_remaining_frames: Bool32::default(), + std_syntax_flags: VideoEncodeH264StdFlagsEXT::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264DpbSlotInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_reference_info: *const video::StdVideoEncodeH264ReferenceInfo, +} + +impl Default for VideoEncodeH264DpbSlotInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT, + next: ptr::null(), + std_reference_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264FrameSizeEXT { + pub frame_i_size: u32, + pub frame_p_size: u32, + pub frame_b_size: u32, +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264GopRemainingFrameInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_gop_remaining_frames: Bool32, + pub gop_remaining_i: u32, + pub gop_remaining_p: u32, + pub gop_remaining_b: u32, +} + +impl Default for VideoEncodeH264GopRemainingFrameInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_EXT, + next: ptr::null(), + use_gop_remaining_frames: Bool32::default(), + gop_remaining_i: u32::default(), + gop_remaining_p: u32::default(), + gop_remaining_b: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264NaluSliceInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub constant_qp: i32, + pub std_slice_header: *const video::StdVideoEncodeH264SliceHeader, +} + +impl Default for VideoEncodeH264NaluSliceInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT, + next: ptr::null(), + constant_qp: i32::default(), + std_slice_header: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264PictureInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub nalu_slice_entry_count: u32, + pub nalu_slice_entries: *const VideoEncodeH264NaluSliceInfoEXT, + pub std_picture_info: *const video::StdVideoEncodeH264PictureInfo, + pub generate_prefix_nalu: Bool32, +} + +impl Default for VideoEncodeH264PictureInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_PICTURE_INFO_EXT, + next: ptr::null(), + nalu_slice_entry_count: u32::default(), + nalu_slice_entries: ptr::null(), + std_picture_info: ptr::null(), + generate_prefix_nalu: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264ProfileInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_profile_idc: video::StdVideoH264ProfileIdc, +} + +impl Default for VideoEncodeH264ProfileInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_PROFILE_INFO_EXT, + next: ptr::null(), + std_profile_idc: video::StdVideoH264ProfileIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264QpEXT { + pub qp_i: i32, + pub qp_p: i32, + pub qp_b: i32, +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264QualityLevelPropertiesEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub preferred_rate_control_flags: VideoEncodeH264RateControlFlagsEXT, + pub preferred_gop_frame_count: u32, + pub preferred_idr_period: u32, + pub preferred_consecutive_b_frame_count: u32, + pub preferred_temporal_layer_count: u32, + pub preferred_constant_qp: VideoEncodeH264QpEXT, + pub preferred_max_l0_reference_count: u32, + pub preferred_max_l1_reference_count: u32, + pub preferred_std_entropy_coding_mode_flag: Bool32, +} + +impl Default for VideoEncodeH264QualityLevelPropertiesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_EXT, + next: ptr::null_mut(), + preferred_rate_control_flags: VideoEncodeH264RateControlFlagsEXT::default(), + preferred_gop_frame_count: u32::default(), + preferred_idr_period: u32::default(), + preferred_consecutive_b_frame_count: u32::default(), + preferred_temporal_layer_count: u32::default(), + preferred_constant_qp: VideoEncodeH264QpEXT::default(), + preferred_max_l0_reference_count: u32::default(), + preferred_max_l1_reference_count: u32::default(), + preferred_std_entropy_coding_mode_flag: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264RateControlInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoEncodeH264RateControlFlagsEXT, + pub gop_frame_count: u32, + pub idr_period: u32, + pub consecutive_b_frame_count: u32, + pub temporal_layer_count: u32, +} + +impl Default for VideoEncodeH264RateControlInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT, + next: ptr::null(), + flags: VideoEncodeH264RateControlFlagsEXT::default(), + gop_frame_count: u32::default(), + idr_period: u32::default(), + consecutive_b_frame_count: u32::default(), + temporal_layer_count: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264RateControlLayerInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_min_qp: Bool32, + pub min_qp: VideoEncodeH264QpEXT, + pub use_max_qp: Bool32, + pub max_qp: VideoEncodeH264QpEXT, + pub use_max_frame_size: Bool32, + pub max_frame_size: VideoEncodeH264FrameSizeEXT, +} + +impl Default for VideoEncodeH264RateControlLayerInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT, + next: ptr::null(), + use_min_qp: Bool32::default(), + min_qp: VideoEncodeH264QpEXT::default(), + use_max_qp: Bool32::default(), + max_qp: VideoEncodeH264QpEXT::default(), + use_max_frame_size: Bool32::default(), + max_frame_size: VideoEncodeH264FrameSizeEXT::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264SessionCreateInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_max_level_idc: Bool32, + pub max_level_idc: video::StdVideoH264LevelIdc, +} + +impl Default for VideoEncodeH264SessionCreateInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT, + next: ptr::null(), + use_max_level_idc: Bool32::default(), + max_level_idc: video::StdVideoH264LevelIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264SessionParametersAddInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_sps_count: u32, + pub std_sp_ss: *const video::StdVideoH264SequenceParameterSet, + pub std_pps_count: u32, + pub std_pp_ss: *const video::StdVideoH264PictureParameterSet, +} + +impl Default for VideoEncodeH264SessionParametersAddInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT, + next: ptr::null(), + std_sps_count: u32::default(), + std_sp_ss: ptr::null(), + std_pps_count: u32::default(), + std_pp_ss: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264SessionParametersCreateInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub max_std_sps_count: u32, + pub max_std_pps_count: u32, + pub parameters_add_info: *const VideoEncodeH264SessionParametersAddInfoEXT, +} + +impl Default for VideoEncodeH264SessionParametersCreateInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT, + next: ptr::null(), + max_std_sps_count: u32::default(), + max_std_pps_count: u32::default(), + parameters_add_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264SessionParametersFeedbackInfoEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub has_std_sps_overrides: Bool32, + pub has_std_pps_overrides: Bool32, +} + +impl Default for VideoEncodeH264SessionParametersFeedbackInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_EXT, + next: ptr::null_mut(), + has_std_sps_overrides: Bool32::default(), + has_std_pps_overrides: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH264SessionParametersGetInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub write_std_sps: Bool32, + pub write_std_pps: Bool32, + pub std_sps_id: u32, + pub std_pps_id: u32, +} + +impl Default for VideoEncodeH264SessionParametersGetInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_EXT, + next: ptr::null(), + write_std_sps: Bool32::default(), + write_std_pps: Bool32::default(), + std_sps_id: u32::default(), + std_pps_id: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265CapabilitiesEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub flags: VideoEncodeH265CapabilityFlagsEXT, + pub max_level_idc: video::StdVideoH265LevelIdc, + pub max_slice_segment_count: u32, + pub max_tiles: Extent2D, + pub ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT, + pub transform_block_sizes: VideoEncodeH265TransformBlockSizeFlagsEXT, + pub max_p_picture_l0_reference_count: u32, + pub max_b_picture_l0_reference_count: u32, + pub max_l1_reference_count: u32, + pub max_sub_layer_count: u32, + pub expect_dyadic_temporal_sub_layer_pattern: Bool32, + pub min_qp: i32, + pub max_qp: i32, + pub prefers_gop_remaining_frames: Bool32, + pub requires_gop_remaining_frames: Bool32, + pub std_syntax_flags: VideoEncodeH265StdFlagsEXT, +} + +impl Default for VideoEncodeH265CapabilitiesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_CAPABILITIES_EXT, + next: ptr::null_mut(), + flags: VideoEncodeH265CapabilityFlagsEXT::default(), + max_level_idc: video::StdVideoH265LevelIdc::default(), + max_slice_segment_count: u32::default(), + max_tiles: Extent2D::default(), + ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT::default(), + transform_block_sizes: VideoEncodeH265TransformBlockSizeFlagsEXT::default(), + max_p_picture_l0_reference_count: u32::default(), + max_b_picture_l0_reference_count: u32::default(), + max_l1_reference_count: u32::default(), + max_sub_layer_count: u32::default(), + expect_dyadic_temporal_sub_layer_pattern: Bool32::default(), + min_qp: i32::default(), + max_qp: i32::default(), + prefers_gop_remaining_frames: Bool32::default(), + requires_gop_remaining_frames: Bool32::default(), + std_syntax_flags: VideoEncodeH265StdFlagsEXT::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265DpbSlotInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_reference_info: *const video::StdVideoEncodeH265ReferenceInfo, +} + +impl Default for VideoEncodeH265DpbSlotInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT, + next: ptr::null(), + std_reference_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265FrameSizeEXT { + pub frame_i_size: u32, + pub frame_p_size: u32, + pub frame_b_size: u32, +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265GopRemainingFrameInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_gop_remaining_frames: Bool32, + pub gop_remaining_i: u32, + pub gop_remaining_p: u32, + pub gop_remaining_b: u32, +} + +impl Default for VideoEncodeH265GopRemainingFrameInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_EXT, + next: ptr::null(), + use_gop_remaining_frames: Bool32::default(), + gop_remaining_i: u32::default(), + gop_remaining_p: u32::default(), + gop_remaining_b: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265NaluSliceSegmentInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub constant_qp: i32, + pub std_slice_segment_header: *const video::StdVideoEncodeH265SliceSegmentHeader, +} + +impl Default for VideoEncodeH265NaluSliceSegmentInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT, + next: ptr::null(), + constant_qp: i32::default(), + std_slice_segment_header: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265PictureInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub nalu_slice_segment_entry_count: u32, + pub nalu_slice_segment_entries: *const VideoEncodeH265NaluSliceSegmentInfoEXT, + pub std_picture_info: *const video::StdVideoEncodeH265PictureInfo, +} + +impl Default for VideoEncodeH265PictureInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_PICTURE_INFO_EXT, + next: ptr::null(), + nalu_slice_segment_entry_count: u32::default(), + nalu_slice_segment_entries: ptr::null(), + std_picture_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265ProfileInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_profile_idc: video::StdVideoH265ProfileIdc, +} + +impl Default for VideoEncodeH265ProfileInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_PROFILE_INFO_EXT, + next: ptr::null(), + std_profile_idc: video::StdVideoH265ProfileIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Default, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265QpEXT { + pub qp_i: i32, + pub qp_p: i32, + pub qp_b: i32, +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265QualityLevelPropertiesEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub preferred_rate_control_flags: VideoEncodeH265RateControlFlagsEXT, + pub preferred_gop_frame_count: u32, + pub preferred_idr_period: u32, + pub preferred_consecutive_b_frame_count: u32, + pub preferred_sub_layer_count: u32, + pub preferred_constant_qp: VideoEncodeH265QpEXT, + pub preferred_max_l0_reference_count: u32, + pub preferred_max_l1_reference_count: u32, +} + +impl Default for VideoEncodeH265QualityLevelPropertiesEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_EXT, + next: ptr::null_mut(), + preferred_rate_control_flags: VideoEncodeH265RateControlFlagsEXT::default(), + preferred_gop_frame_count: u32::default(), + preferred_idr_period: u32::default(), + preferred_consecutive_b_frame_count: u32::default(), + preferred_sub_layer_count: u32::default(), + preferred_constant_qp: VideoEncodeH265QpEXT::default(), + preferred_max_l0_reference_count: u32::default(), + preferred_max_l1_reference_count: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265RateControlInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoEncodeH265RateControlFlagsEXT, + pub gop_frame_count: u32, + pub idr_period: u32, + pub consecutive_b_frame_count: u32, + pub sub_layer_count: u32, +} + +impl Default for VideoEncodeH265RateControlInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT, + next: ptr::null(), + flags: VideoEncodeH265RateControlFlagsEXT::default(), + gop_frame_count: u32::default(), + idr_period: u32::default(), + consecutive_b_frame_count: u32::default(), + sub_layer_count: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265RateControlLayerInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_min_qp: Bool32, + pub min_qp: VideoEncodeH265QpEXT, + pub use_max_qp: Bool32, + pub max_qp: VideoEncodeH265QpEXT, + pub use_max_frame_size: Bool32, + pub max_frame_size: VideoEncodeH265FrameSizeEXT, +} + +impl Default for VideoEncodeH265RateControlLayerInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT, + next: ptr::null(), + use_min_qp: Bool32::default(), + min_qp: VideoEncodeH265QpEXT::default(), + use_max_qp: Bool32::default(), + max_qp: VideoEncodeH265QpEXT::default(), + use_max_frame_size: Bool32::default(), + max_frame_size: VideoEncodeH265FrameSizeEXT::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265SessionCreateInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub use_max_level_idc: Bool32, + pub max_level_idc: video::StdVideoH265LevelIdc, +} + +impl Default for VideoEncodeH265SessionCreateInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_SESSION_CREATE_INFO_EXT, + next: ptr::null(), + use_max_level_idc: Bool32::default(), + max_level_idc: video::StdVideoH265LevelIdc::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265SessionParametersAddInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub std_vps_count: u32, + pub std_vp_ss: *const video::StdVideoH265VideoParameterSet, + pub std_sps_count: u32, + pub std_sp_ss: *const video::StdVideoH265SequenceParameterSet, + pub std_pps_count: u32, + pub std_pp_ss: *const video::StdVideoH265PictureParameterSet, +} + +impl Default for VideoEncodeH265SessionParametersAddInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT, + next: ptr::null(), + std_vps_count: u32::default(), + std_vp_ss: ptr::null(), + std_sps_count: u32::default(), + std_sp_ss: ptr::null(), + std_pps_count: u32::default(), + std_pp_ss: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265SessionParametersCreateInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub max_std_vps_count: u32, + pub max_std_sps_count: u32, + pub max_std_pps_count: u32, + pub parameters_add_info: *const VideoEncodeH265SessionParametersAddInfoEXT, +} + +impl Default for VideoEncodeH265SessionParametersCreateInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT, + next: ptr::null(), + max_std_vps_count: u32::default(), + max_std_sps_count: u32::default(), + max_std_pps_count: u32::default(), + parameters_add_info: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265SessionParametersFeedbackInfoEXT { + pub s_type: StructureType, + pub next: *mut c_void, + pub has_std_vps_overrides: Bool32, + pub has_std_sps_overrides: Bool32, + pub has_std_pps_overrides: Bool32, +} + +impl Default for VideoEncodeH265SessionParametersFeedbackInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_EXT, + next: ptr::null_mut(), + has_std_vps_overrides: Bool32::default(), + has_std_sps_overrides: Bool32::default(), + has_std_pps_overrides: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeH265SessionParametersGetInfoEXT { + pub s_type: StructureType, + pub next: *const c_void, + pub write_std_vps: Bool32, + pub write_std_sps: Bool32, + pub write_std_pps: Bool32, + pub std_vps_id: u32, + pub std_sps_id: u32, + pub std_pps_id: u32, +} + +impl Default for VideoEncodeH265SessionParametersGetInfoEXT { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_EXT, + next: ptr::null(), + write_std_vps: Bool32::default(), + write_std_sps: Bool32::default(), + write_std_pps: Bool32::default(), + std_vps_id: u32::default(), + std_sps_id: u32::default(), + std_pps_id: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoEncodeFlagsKHR, + pub dst_buffer: Buffer, + pub dst_buffer_offset: DeviceSize, + pub dst_buffer_range: DeviceSize, + pub src_picture_resource: VideoPictureResourceInfoKHR, + pub setup_reference_slot: *const VideoReferenceSlotInfoKHR, + pub reference_slot_count: u32, + pub reference_slots: *const VideoReferenceSlotInfoKHR, + pub preceding_externally_encoded_bytes: u32, +} + +impl Default for VideoEncodeInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_INFO_KHR, + next: ptr::null(), + flags: VideoEncodeFlagsKHR::default(), + dst_buffer: Buffer::default(), + dst_buffer_offset: DeviceSize::default(), + dst_buffer_range: DeviceSize::default(), + src_picture_resource: VideoPictureResourceInfoKHR::default(), + setup_reference_slot: ptr::null(), + reference_slot_count: u32::default(), + reference_slots: ptr::null(), + preceding_externally_encoded_bytes: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeQualityLevelInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub quality_level: u32, +} + +impl Default for VideoEncodeQualityLevelInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR, + next: ptr::null(), + quality_level: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeQualityLevelPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub preferred_rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + pub preferred_rate_control_layer_count: u32, +} + +impl Default for VideoEncodeQualityLevelPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR, + next: ptr::null_mut(), + preferred_rate_control_mode: VideoEncodeRateControlModeFlagsKHR::default(), + preferred_rate_control_layer_count: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeRateControlInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoEncodeRateControlFlagsKHR, + pub rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + pub layer_count: u32, + pub layers: *const VideoEncodeRateControlLayerInfoKHR, + pub virtual_buffer_size_in_ms: u32, + pub initial_virtual_buffer_size_in_ms: u32, +} + +impl Default for VideoEncodeRateControlInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_RATE_CONTROL_INFO_KHR, + next: ptr::null(), + flags: VideoEncodeRateControlFlagsKHR::default(), + rate_control_mode: VideoEncodeRateControlModeFlagsKHR::default(), + layer_count: u32::default(), + layers: ptr::null(), + virtual_buffer_size_in_ms: u32::default(), + initial_virtual_buffer_size_in_ms: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeRateControlLayerInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub average_bitrate: u64, + pub max_bitrate: u64, + pub frame_rate_numerator: u32, + pub frame_rate_denominator: u32, +} + +impl Default for VideoEncodeRateControlLayerInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR, + next: ptr::null(), + average_bitrate: u64::default(), + max_bitrate: u64::default(), + frame_rate_numerator: u32::default(), + frame_rate_denominator: u32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeSessionParametersFeedbackInfoKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub has_overrides: Bool32, +} + +impl Default for VideoEncodeSessionParametersFeedbackInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR, + next: ptr::null_mut(), + has_overrides: Bool32::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeSessionParametersGetInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub video_session_parameters: VideoSessionParametersKHR, +} + +impl Default for VideoEncodeSessionParametersGetInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR, + next: ptr::null(), + video_session_parameters: VideoSessionParametersKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEncodeUsageInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub video_usage_hints: VideoEncodeUsageFlagsKHR, + pub video_content_hints: VideoEncodeContentFlagsKHR, + pub tuning_mode: VideoEncodeTuningModeKHR, +} + +impl Default for VideoEncodeUsageInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_ENCODE_USAGE_INFO_KHR, + next: ptr::null(), + video_usage_hints: VideoEncodeUsageFlagsKHR::default(), + video_content_hints: VideoEncodeContentFlagsKHR::default(), + tuning_mode: VideoEncodeTuningModeKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoEndCodingInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoEndCodingFlagsKHR, +} + +impl Default for VideoEndCodingInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_END_CODING_INFO_KHR, + next: ptr::null(), + flags: VideoEndCodingFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoFormatPropertiesKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub format: Format, + pub component_mapping: ComponentMapping, + pub image_create_flags: ImageCreateFlags, + pub image_type: ImageType, + pub image_tiling: ImageTiling, + pub image_usage_flags: ImageUsageFlags, +} + +impl Default for VideoFormatPropertiesKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_FORMAT_PROPERTIES_KHR, + next: ptr::null_mut(), + format: Format::default(), + component_mapping: ComponentMapping::default(), + image_create_flags: ImageCreateFlags::default(), + image_type: ImageType::default(), + image_tiling: ImageTiling::default(), + image_usage_flags: ImageUsageFlags::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoPictureResourceInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub coded_offset: Offset2D, + pub coded_extent: Extent2D, + pub base_array_layer: u32, + pub image_view_binding: ImageView, +} + +impl Default for VideoPictureResourceInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_PICTURE_RESOURCE_INFO_KHR, + next: ptr::null(), + coded_offset: Offset2D::default(), + coded_extent: Extent2D::default(), + base_array_layer: u32::default(), + image_view_binding: ImageView::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoProfileInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub video_codec_operation: VideoCodecOperationFlagsKHR, + pub chroma_subsampling: VideoChromaSubsamplingFlagsKHR, + pub luma_bit_depth: VideoComponentBitDepthFlagsKHR, + pub chroma_bit_depth: VideoComponentBitDepthFlagsKHR, +} + +impl Default for VideoProfileInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_PROFILE_INFO_KHR, + next: ptr::null(), + video_codec_operation: VideoCodecOperationFlagsKHR::default(), + chroma_subsampling: VideoChromaSubsamplingFlagsKHR::default(), + luma_bit_depth: VideoComponentBitDepthFlagsKHR::default(), + chroma_bit_depth: VideoComponentBitDepthFlagsKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoProfileListInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub profile_count: u32, + pub profiles: *const VideoProfileInfoKHR, +} + +impl Default for VideoProfileListInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_PROFILE_LIST_INFO_KHR, + next: ptr::null(), + profile_count: u32::default(), + profiles: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoReferenceSlotInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub slot_index: i32, + pub picture_resource: *const VideoPictureResourceInfoKHR, +} + +impl Default for VideoReferenceSlotInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_REFERENCE_SLOT_INFO_KHR, + next: ptr::null(), + slot_index: i32::default(), + picture_resource: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoSessionCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub queue_family_index: u32, + pub flags: VideoSessionCreateFlagsKHR, + pub video_profile: *const VideoProfileInfoKHR, + pub picture_format: Format, + pub max_coded_extent: Extent2D, + pub reference_picture_format: Format, + pub max_dpb_slots: u32, + pub max_active_reference_pictures: u32, + pub std_header_version: *const ExtensionProperties, +} + +impl Default for VideoSessionCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_SESSION_CREATE_INFO_KHR, + next: ptr::null(), + queue_family_index: u32::default(), + flags: VideoSessionCreateFlagsKHR::default(), + video_profile: ptr::null(), + picture_format: Format::default(), + max_coded_extent: Extent2D::default(), + reference_picture_format: Format::default(), + max_dpb_slots: u32::default(), + max_active_reference_pictures: u32::default(), + std_header_version: ptr::null(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoSessionMemoryRequirementsKHR { + pub s_type: StructureType, + pub next: *mut c_void, + pub memory_bind_index: u32, + pub memory_requirements: MemoryRequirements, +} + +impl Default for VideoSessionMemoryRequirementsKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR, + next: ptr::null_mut(), + memory_bind_index: u32::default(), + memory_requirements: MemoryRequirements::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoSessionParametersCreateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub flags: VideoSessionParametersCreateFlagsKHR, + pub video_session_parameters_template: VideoSessionParametersKHR, + pub video_session: VideoSessionKHR, +} + +impl Default for VideoSessionParametersCreateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR, + next: ptr::null(), + flags: VideoSessionParametersCreateFlagsKHR::default(), + video_session_parameters_template: VideoSessionParametersKHR::default(), + video_session: VideoSessionKHR::default(), + } + } +} + +/// +#[repr(C)] +#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)] +pub struct VideoSessionParametersUpdateInfoKHR { + pub s_type: StructureType, + pub next: *const c_void, + pub update_sequence_count: u32, +} + +impl Default for VideoSessionParametersUpdateInfoKHR { + #[inline] + fn default() -> Self { + Self { + s_type: StructureType::VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR, + next: ptr::null(), + update_sequence_count: u32::default(), + } + } +} + /// #[repr(C)] #[derive(Copy, Clone, Default, Debug, PartialEq)] diff --git a/vulkanalia-sys/src/video.rs b/vulkanalia-sys/src/video.rs new file mode 100644 index 00000000..a63dc746 --- /dev/null +++ b/vulkanalia-sys/src/video.rs @@ -0,0 +1,4551 @@ +// SPDX-License-Identifier: Apache-2.0 + +// DO NOT EDIT. +// +// This file has been generated by the Kotlin project in the `generator` +// directory from a Vulkan API registry. + +#![allow( + non_camel_case_types, + non_snake_case, + clippy::bad_bit_mask, + clippy::let_unit_value, + clippy::missing_safety_doc, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_cast, + clippy::upper_case_acronyms, + clippy::useless_transmute +)] + +/* automatically generated by rust-bindgen 0.68.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] + 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]; + 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 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]; + 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 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 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); + } + } +} +pub const STD_VIDEO_H264_CPB_CNT_LIST_SIZE: u32 = 32; +pub const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_LISTS: u32 = 6; +pub const STD_VIDEO_H264_SCALING_LIST_4X4_NUM_ELEMENTS: u32 = 16; +pub const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_LISTS: u32 = 6; +pub const STD_VIDEO_H264_SCALING_LIST_8X8_NUM_ELEMENTS: u32 = 64; +pub const STD_VIDEO_H264_MAX_NUM_LIST_REF: u32 = 32; +pub const STD_VIDEO_H264_MAX_CHROMA_PLANES: u32 = 2; +pub const STD_VIDEO_H264_NO_REFERENCE_PICTURE: u32 = 255; +pub const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_LIST_SIZE: u32 = 2; +pub const STD_VIDEO_H265_CPB_CNT_LIST_SIZE: u32 = 32; +pub const STD_VIDEO_H265_SUBLAYERS_LIST_SIZE: u32 = 7; +pub const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_LISTS: u32 = 6; +pub const STD_VIDEO_H265_SCALING_LIST_4X4_NUM_ELEMENTS: u32 = 16; +pub const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_LISTS: u32 = 6; +pub const STD_VIDEO_H265_SCALING_LIST_8X8_NUM_ELEMENTS: u32 = 64; +pub const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_LISTS: u32 = 6; +pub const STD_VIDEO_H265_SCALING_LIST_16X16_NUM_ELEMENTS: u32 = 64; +pub const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_LISTS: u32 = 2; +pub const STD_VIDEO_H265_SCALING_LIST_32X32_NUM_ELEMENTS: u32 = 64; +pub const STD_VIDEO_H265_CHROMA_QP_OFFSET_LIST_SIZE: u32 = 6; +pub const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_COLS_LIST_SIZE: u32 = 19; +pub const STD_VIDEO_H265_CHROMA_QP_OFFSET_TILE_ROWS_LIST_SIZE: u32 = 21; +pub const STD_VIDEO_H265_PREDICTOR_PALETTE_COMPONENTS_LIST_SIZE: u32 = 3; +pub const STD_VIDEO_H265_PREDICTOR_PALETTE_COMP_ENTRIES_LIST_SIZE: u32 = 128; +pub const STD_VIDEO_H265_MAX_NUM_LIST_REF: u32 = 15; +pub const STD_VIDEO_H265_MAX_CHROMA_PLANES: u32 = 2; +pub const STD_VIDEO_H265_MAX_SHORT_TERM_REF_PIC_SETS: u32 = 64; +pub const STD_VIDEO_H265_MAX_DPB_SIZE: u32 = 16; +pub const STD_VIDEO_H265_MAX_LONG_TERM_REF_PICS_SPS: u32 = 32; +pub const STD_VIDEO_H265_MAX_LONG_TERM_PICS: u32 = 16; +pub const STD_VIDEO_H265_MAX_DELTA_POC: u32 = 48; +pub const STD_VIDEO_H265_NO_REFERENCE_PICTURE: u32 = 255; +pub const STD_VIDEO_DECODE_H265_REF_PIC_SET_LIST_SIZE: u32 = 8; +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_MONOCHROME: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(0); +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_420: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(1); +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_422: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(2); +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_444: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(3); +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_INVALID: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(2147483647); +pub const STD_VIDEO_H264_CHROMA_FORMAT_IDC_MAX_ENUM: StdVideoH264ChromaFormatIdc = + StdVideoH264ChromaFormatIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264ChromaFormatIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_PROFILE_IDC_BASELINE: StdVideoH264ProfileIdc = StdVideoH264ProfileIdc(66); +pub const STD_VIDEO_H264_PROFILE_IDC_MAIN: StdVideoH264ProfileIdc = StdVideoH264ProfileIdc(77); +pub const STD_VIDEO_H264_PROFILE_IDC_HIGH: StdVideoH264ProfileIdc = StdVideoH264ProfileIdc(100); +pub const STD_VIDEO_H264_PROFILE_IDC_HIGH_444_PREDICTIVE: StdVideoH264ProfileIdc = + StdVideoH264ProfileIdc(244); +pub const STD_VIDEO_H264_PROFILE_IDC_INVALID: StdVideoH264ProfileIdc = + StdVideoH264ProfileIdc(2147483647); +pub const STD_VIDEO_H264_PROFILE_IDC_MAX_ENUM: StdVideoH264ProfileIdc = + StdVideoH264ProfileIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264ProfileIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_LEVEL_IDC_1_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(0); +pub const STD_VIDEO_H264_LEVEL_IDC_1_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(1); +pub const STD_VIDEO_H264_LEVEL_IDC_1_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(2); +pub const STD_VIDEO_H264_LEVEL_IDC_1_3: StdVideoH264LevelIdc = StdVideoH264LevelIdc(3); +pub const STD_VIDEO_H264_LEVEL_IDC_2_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(4); +pub const STD_VIDEO_H264_LEVEL_IDC_2_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(5); +pub const STD_VIDEO_H264_LEVEL_IDC_2_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(6); +pub const STD_VIDEO_H264_LEVEL_IDC_3_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(7); +pub const STD_VIDEO_H264_LEVEL_IDC_3_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(8); +pub const STD_VIDEO_H264_LEVEL_IDC_3_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(9); +pub const STD_VIDEO_H264_LEVEL_IDC_4_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(10); +pub const STD_VIDEO_H264_LEVEL_IDC_4_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(11); +pub const STD_VIDEO_H264_LEVEL_IDC_4_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(12); +pub const STD_VIDEO_H264_LEVEL_IDC_5_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(13); +pub const STD_VIDEO_H264_LEVEL_IDC_5_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(14); +pub const STD_VIDEO_H264_LEVEL_IDC_5_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(15); +pub const STD_VIDEO_H264_LEVEL_IDC_6_0: StdVideoH264LevelIdc = StdVideoH264LevelIdc(16); +pub const STD_VIDEO_H264_LEVEL_IDC_6_1: StdVideoH264LevelIdc = StdVideoH264LevelIdc(17); +pub const STD_VIDEO_H264_LEVEL_IDC_6_2: StdVideoH264LevelIdc = StdVideoH264LevelIdc(18); +pub const STD_VIDEO_H264_LEVEL_IDC_INVALID: StdVideoH264LevelIdc = StdVideoH264LevelIdc(2147483647); +pub const STD_VIDEO_H264_LEVEL_IDC_MAX_ENUM: StdVideoH264LevelIdc = + StdVideoH264LevelIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264LevelIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_POC_TYPE_0: StdVideoH264PocType = StdVideoH264PocType(0); +pub const STD_VIDEO_H264_POC_TYPE_1: StdVideoH264PocType = StdVideoH264PocType(1); +pub const STD_VIDEO_H264_POC_TYPE_2: StdVideoH264PocType = StdVideoH264PocType(2); +pub const STD_VIDEO_H264_POC_TYPE_INVALID: StdVideoH264PocType = StdVideoH264PocType(2147483647); +pub const STD_VIDEO_H264_POC_TYPE_MAX_ENUM: StdVideoH264PocType = StdVideoH264PocType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264PocType(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_UNSPECIFIED: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(0); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_SQUARE: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(1); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_12_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(2); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_10_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(3); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_16_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(4); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_40_33: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(5); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_24_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(6); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_20_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(7); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_32_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(8); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_80_33: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(9); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_18_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(10); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_15_11: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(11); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_64_33: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(12); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_160_99: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(13); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_4_3: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(14); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_3_2: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(15); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_2_1: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(16); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_EXTENDED_SAR: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(255); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_INVALID: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(2147483647); +pub const STD_VIDEO_H264_ASPECT_RATIO_IDC_MAX_ENUM: StdVideoH264AspectRatioIdc = + StdVideoH264AspectRatioIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264AspectRatioIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_DEFAULT: StdVideoH264WeightedBipredIdc = + StdVideoH264WeightedBipredIdc(0); +pub const STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT: StdVideoH264WeightedBipredIdc = + StdVideoH264WeightedBipredIdc(1); +pub const STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_IMPLICIT: StdVideoH264WeightedBipredIdc = + StdVideoH264WeightedBipredIdc(2); +pub const STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_INVALID: StdVideoH264WeightedBipredIdc = + StdVideoH264WeightedBipredIdc(2147483647); +pub const STD_VIDEO_H264_WEIGHTED_BIPRED_IDC_MAX_ENUM: StdVideoH264WeightedBipredIdc = + StdVideoH264WeightedBipredIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264WeightedBipredIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_SUBTRACT: + StdVideoH264ModificationOfPicNumsIdc = StdVideoH264ModificationOfPicNumsIdc(0); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_SHORT_TERM_ADD: + StdVideoH264ModificationOfPicNumsIdc = StdVideoH264ModificationOfPicNumsIdc(1); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_LONG_TERM: + StdVideoH264ModificationOfPicNumsIdc = StdVideoH264ModificationOfPicNumsIdc(2); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_END: StdVideoH264ModificationOfPicNumsIdc = + StdVideoH264ModificationOfPicNumsIdc(3); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_INVALID: + StdVideoH264ModificationOfPicNumsIdc = StdVideoH264ModificationOfPicNumsIdc(2147483647); +pub const STD_VIDEO_H264_MODIFICATION_OF_PIC_NUMS_IDC_MAX_ENUM: + StdVideoH264ModificationOfPicNumsIdc = StdVideoH264ModificationOfPicNumsIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264ModificationOfPicNumsIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_END: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(0); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_SHORT_TERM: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(1); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_LONG_TERM: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(2); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_LONG_TERM: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(3); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_SET_MAX_LONG_TERM_INDEX: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(4); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_UNMARK_ALL: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(5); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MARK_CURRENT_AS_LONG_TERM: + StdVideoH264MemMgmtControlOp = StdVideoH264MemMgmtControlOp(6); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_INVALID: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(2147483647); +pub const STD_VIDEO_H264_MEM_MGMT_CONTROL_OP_MAX_ENUM: StdVideoH264MemMgmtControlOp = + StdVideoH264MemMgmtControlOp(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264MemMgmtControlOp(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_CABAC_INIT_IDC_0: StdVideoH264CabacInitIdc = StdVideoH264CabacInitIdc(0); +pub const STD_VIDEO_H264_CABAC_INIT_IDC_1: StdVideoH264CabacInitIdc = StdVideoH264CabacInitIdc(1); +pub const STD_VIDEO_H264_CABAC_INIT_IDC_2: StdVideoH264CabacInitIdc = StdVideoH264CabacInitIdc(2); +pub const STD_VIDEO_H264_CABAC_INIT_IDC_INVALID: StdVideoH264CabacInitIdc = + StdVideoH264CabacInitIdc(2147483647); +pub const STD_VIDEO_H264_CABAC_INIT_IDC_MAX_ENUM: StdVideoH264CabacInitIdc = + StdVideoH264CabacInitIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264CabacInitIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_DISABLED: + StdVideoH264DisableDeblockingFilterIdc = StdVideoH264DisableDeblockingFilterIdc(0); +pub const STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_ENABLED: + StdVideoH264DisableDeblockingFilterIdc = StdVideoH264DisableDeblockingFilterIdc(1); +pub const STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_PARTIAL: + StdVideoH264DisableDeblockingFilterIdc = StdVideoH264DisableDeblockingFilterIdc(2); +pub const STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_INVALID: + StdVideoH264DisableDeblockingFilterIdc = StdVideoH264DisableDeblockingFilterIdc(2147483647); +pub const STD_VIDEO_H264_DISABLE_DEBLOCKING_FILTER_IDC_MAX_ENUM: + StdVideoH264DisableDeblockingFilterIdc = StdVideoH264DisableDeblockingFilterIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264DisableDeblockingFilterIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_SLICE_TYPE_P: StdVideoH264SliceType = StdVideoH264SliceType(0); +pub const STD_VIDEO_H264_SLICE_TYPE_B: StdVideoH264SliceType = StdVideoH264SliceType(1); +pub const STD_VIDEO_H264_SLICE_TYPE_I: StdVideoH264SliceType = StdVideoH264SliceType(2); +pub const STD_VIDEO_H264_SLICE_TYPE_INVALID: StdVideoH264SliceType = + StdVideoH264SliceType(2147483647); +pub const STD_VIDEO_H264_SLICE_TYPE_MAX_ENUM: StdVideoH264SliceType = + StdVideoH264SliceType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264SliceType(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_PICTURE_TYPE_P: StdVideoH264PictureType = StdVideoH264PictureType(0); +pub const STD_VIDEO_H264_PICTURE_TYPE_B: StdVideoH264PictureType = StdVideoH264PictureType(1); +pub const STD_VIDEO_H264_PICTURE_TYPE_I: StdVideoH264PictureType = StdVideoH264PictureType(2); +pub const STD_VIDEO_H264_PICTURE_TYPE_IDR: StdVideoH264PictureType = StdVideoH264PictureType(5); +pub const STD_VIDEO_H264_PICTURE_TYPE_INVALID: StdVideoH264PictureType = + StdVideoH264PictureType(2147483647); +pub const STD_VIDEO_H264_PICTURE_TYPE_MAX_ENUM: StdVideoH264PictureType = + StdVideoH264PictureType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264PictureType(pub ::core::ffi::c_int); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_SPS: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(0); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_PPS: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(1); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_AUD: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(2); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_PREFIX: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(3); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_SEQUENCE: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(4); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_END_OF_STREAM: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(5); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_PRECODED: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(6); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_INVALID: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(2147483647); +pub const STD_VIDEO_H264_NON_VCL_NALU_TYPE_MAX_ENUM: StdVideoH264NonVclNaluType = + StdVideoH264NonVclNaluType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH264NonVclNaluType(pub ::core::ffi::c_int); +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SpsVuiFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl StdVideoH264SpsVuiFlags { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_appropriate_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_appropriate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_signal_type_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_signal_type_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_full_range_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_full_range_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn color_description_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_color_description_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_loc_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_loc_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn timing_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn fixed_frame_rate_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_fixed_frame_rate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn nal_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_nal_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn vcl_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_vcl_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + overscan_info_present_flag: u32, + overscan_appropriate_flag: u32, + video_signal_type_present_flag: u32, + video_full_range_flag: u32, + color_description_present_flag: u32, + chroma_loc_info_present_flag: u32, + timing_info_present_flag: u32, + fixed_frame_rate_flag: u32, + bitstream_restriction_flag: u32, + nal_hrd_parameters_present_flag: u32, + vcl_hrd_parameters_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let aspect_ratio_info_present_flag: u32 = + unsafe { ::core::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let overscan_info_present_flag: u32 = + unsafe { ::core::mem::transmute(overscan_info_present_flag) }; + overscan_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let overscan_appropriate_flag: u32 = + unsafe { ::core::mem::transmute(overscan_appropriate_flag) }; + overscan_appropriate_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let video_signal_type_present_flag: u32 = + unsafe { ::core::mem::transmute(video_signal_type_present_flag) }; + video_signal_type_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let video_full_range_flag: u32 = + unsafe { ::core::mem::transmute(video_full_range_flag) }; + video_full_range_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let color_description_present_flag: u32 = + unsafe { ::core::mem::transmute(color_description_present_flag) }; + color_description_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let chroma_loc_info_present_flag: u32 = + unsafe { ::core::mem::transmute(chroma_loc_info_present_flag) }; + chroma_loc_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let timing_info_present_flag: u32 = + unsafe { ::core::mem::transmute(timing_info_present_flag) }; + timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let fixed_frame_rate_flag: u32 = + unsafe { ::core::mem::transmute(fixed_frame_rate_flag) }; + fixed_frame_rate_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let bitstream_restriction_flag: u32 = + unsafe { ::core::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let nal_hrd_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(nal_hrd_parameters_present_flag) }; + nal_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let vcl_hrd_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(vcl_hrd_parameters_present_flag) }; + vcl_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264HrdParameters { + pub cpb_cnt_minus1: u8, + pub bit_rate_scale: u8, + pub cpb_size_scale: u8, + pub reserved1: u8, + pub bit_rate_value_minus1: [u32; 32usize], + pub cpb_size_value_minus1: [u32; 32usize], + pub cbr_flag: [u8; 32usize], + pub initial_cpb_removal_delay_length_minus1: u32, + pub cpb_removal_delay_length_minus1: u32, + pub dpb_output_delay_length_minus1: u32, + pub time_offset_length: u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SequenceParameterSetVui { + pub flags: StdVideoH264SpsVuiFlags, + pub aspect_ratio_idc: StdVideoH264AspectRatioIdc, + pub sar_width: u16, + pub sar_height: u16, + pub video_format: u8, + pub colour_primaries: u8, + pub transfer_characteristics: u8, + pub matrix_coefficients: u8, + pub num_units_in_tick: u32, + pub time_scale: u32, + pub max_num_reorder_frames: u8, + pub max_dec_frame_buffering: u8, + pub chroma_sample_loc_type_top_field: u8, + pub chroma_sample_loc_type_bottom_field: u8, + pub reserved1: u32, + pub pHrdParameters: *const StdVideoH264HrdParameters, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub __bindgen_padding_0: u16, +} +impl StdVideoH264SpsFlags { + #[inline] + pub fn constraint_set0_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set1_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set1_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set2_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set2_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set3_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set3_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set4_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set4_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn constraint_set5_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_constraint_set5_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn direct_8x8_inference_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn mb_adaptive_frame_field_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_mbs_only_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_mbs_only_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn delta_pic_order_always_zero_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn gaps_in_frame_num_value_allowed_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_gaps_in_frame_num_value_allowed_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn qpprime_y_zero_transform_bypass_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_qpprime_y_zero_transform_bypass_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_cropping_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_cropping_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn seq_scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_seq_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + constraint_set0_flag: u32, + constraint_set1_flag: u32, + constraint_set2_flag: u32, + constraint_set3_flag: u32, + constraint_set4_flag: u32, + constraint_set5_flag: u32, + direct_8x8_inference_flag: u32, + mb_adaptive_frame_field_flag: u32, + frame_mbs_only_flag: u32, + delta_pic_order_always_zero_flag: u32, + separate_colour_plane_flag: u32, + gaps_in_frame_num_value_allowed_flag: u32, + qpprime_y_zero_transform_bypass_flag: u32, + frame_cropping_flag: u32, + seq_scaling_matrix_present_flag: u32, + vui_parameters_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let constraint_set0_flag: u32 = unsafe { ::core::mem::transmute(constraint_set0_flag) }; + constraint_set0_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let constraint_set1_flag: u32 = unsafe { ::core::mem::transmute(constraint_set1_flag) }; + constraint_set1_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let constraint_set2_flag: u32 = unsafe { ::core::mem::transmute(constraint_set2_flag) }; + constraint_set2_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let constraint_set3_flag: u32 = unsafe { ::core::mem::transmute(constraint_set3_flag) }; + constraint_set3_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let constraint_set4_flag: u32 = unsafe { ::core::mem::transmute(constraint_set4_flag) }; + constraint_set4_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let constraint_set5_flag: u32 = unsafe { ::core::mem::transmute(constraint_set5_flag) }; + constraint_set5_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let direct_8x8_inference_flag: u32 = + unsafe { ::core::mem::transmute(direct_8x8_inference_flag) }; + direct_8x8_inference_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let mb_adaptive_frame_field_flag: u32 = + unsafe { ::core::mem::transmute(mb_adaptive_frame_field_flag) }; + mb_adaptive_frame_field_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let frame_mbs_only_flag: u32 = unsafe { ::core::mem::transmute(frame_mbs_only_flag) }; + frame_mbs_only_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let delta_pic_order_always_zero_flag: u32 = + unsafe { ::core::mem::transmute(delta_pic_order_always_zero_flag) }; + delta_pic_order_always_zero_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let separate_colour_plane_flag: u32 = + unsafe { ::core::mem::transmute(separate_colour_plane_flag) }; + separate_colour_plane_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let gaps_in_frame_num_value_allowed_flag: u32 = + unsafe { ::core::mem::transmute(gaps_in_frame_num_value_allowed_flag) }; + gaps_in_frame_num_value_allowed_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let qpprime_y_zero_transform_bypass_flag: u32 = + unsafe { ::core::mem::transmute(qpprime_y_zero_transform_bypass_flag) }; + qpprime_y_zero_transform_bypass_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let frame_cropping_flag: u32 = unsafe { ::core::mem::transmute(frame_cropping_flag) }; + frame_cropping_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let seq_scaling_matrix_present_flag: u32 = + unsafe { ::core::mem::transmute(seq_scaling_matrix_present_flag) }; + seq_scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let vui_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(vui_parameters_present_flag) }; + vui_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264ScalingLists { + pub scaling_list_present_mask: u16, + pub use_default_scaling_matrix_mask: u16, + pub ScalingList4x4: [[u8; 16usize]; 6usize], + pub ScalingList8x8: [[u8; 64usize]; 6usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264SequenceParameterSet { + pub flags: StdVideoH264SpsFlags, + pub profile_idc: StdVideoH264ProfileIdc, + pub level_idc: StdVideoH264LevelIdc, + pub chroma_format_idc: StdVideoH264ChromaFormatIdc, + pub seq_parameter_set_id: u8, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub log2_max_frame_num_minus4: u8, + pub pic_order_cnt_type: StdVideoH264PocType, + pub offset_for_non_ref_pic: i32, + pub offset_for_top_to_bottom_field: i32, + pub log2_max_pic_order_cnt_lsb_minus4: u8, + pub num_ref_frames_in_pic_order_cnt_cycle: u8, + pub max_num_ref_frames: u8, + pub reserved1: u8, + pub pic_width_in_mbs_minus1: u32, + pub pic_height_in_map_units_minus1: u32, + pub frame_crop_left_offset: u32, + pub frame_crop_right_offset: u32, + pub frame_crop_top_offset: u32, + pub frame_crop_bottom_offset: u32, + pub reserved2: u32, + pub pOffsetForRefFrame: *const i32, + pub pScalingLists: *const StdVideoH264ScalingLists, + pub pSequenceParameterSetVui: *const StdVideoH264SequenceParameterSetVui, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264PpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoH264PpsFlags { + #[inline] + pub fn transform_8x8_mode_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_8x8_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn redundant_pic_cnt_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn bottom_field_pic_order_in_frame_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_bottom_field_pic_order_in_frame_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn entropy_coding_mode_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn pic_scaling_matrix_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_scaling_matrix_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + transform_8x8_mode_flag: u32, + redundant_pic_cnt_present_flag: u32, + constrained_intra_pred_flag: u32, + deblocking_filter_control_present_flag: u32, + weighted_pred_flag: u32, + bottom_field_pic_order_in_frame_present_flag: u32, + entropy_coding_mode_flag: u32, + pic_scaling_matrix_present_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let transform_8x8_mode_flag: u32 = + unsafe { ::core::mem::transmute(transform_8x8_mode_flag) }; + transform_8x8_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let redundant_pic_cnt_present_flag: u32 = + unsafe { ::core::mem::transmute(redundant_pic_cnt_present_flag) }; + redundant_pic_cnt_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let constrained_intra_pred_flag: u32 = + unsafe { ::core::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::core::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::core::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let bottom_field_pic_order_in_frame_present_flag: u32 = + unsafe { ::core::mem::transmute(bottom_field_pic_order_in_frame_present_flag) }; + bottom_field_pic_order_in_frame_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let entropy_coding_mode_flag: u32 = + unsafe { ::core::mem::transmute(entropy_coding_mode_flag) }; + entropy_coding_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let pic_scaling_matrix_present_flag: u32 = + unsafe { ::core::mem::transmute(pic_scaling_matrix_present_flag) }; + pic_scaling_matrix_present_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH264PictureParameterSet { + pub flags: StdVideoH264PpsFlags, + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub num_ref_idx_l0_default_active_minus1: u8, + pub num_ref_idx_l1_default_active_minus1: u8, + pub weighted_bipred_idc: StdVideoH264WeightedBipredIdc, + 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 pScalingLists: *const StdVideoH264ScalingLists, +} +pub const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_TOP: StdVideoDecodeH264FieldOrderCount = + StdVideoDecodeH264FieldOrderCount(0); +pub const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_BOTTOM: StdVideoDecodeH264FieldOrderCount = + StdVideoDecodeH264FieldOrderCount(1); +pub const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_INVALID: StdVideoDecodeH264FieldOrderCount = + StdVideoDecodeH264FieldOrderCount(2147483647); +pub const STD_VIDEO_DECODE_H264_FIELD_ORDER_COUNT_MAX_ENUM: StdVideoDecodeH264FieldOrderCount = + StdVideoDecodeH264FieldOrderCount(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoDecodeH264FieldOrderCount(pub ::core::ffi::c_int); +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoDecodeH264PictureInfoFlags { + #[inline] + pub fn field_pic_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_intra(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_intra(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn bottom_field_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_bottom_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn complementary_field_pair(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_complementary_field_pair(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + field_pic_flag: u32, + is_intra: u32, + IdrPicFlag: u32, + bottom_field_flag: u32, + is_reference: u32, + complementary_field_pair: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let field_pic_flag: u32 = unsafe { ::core::mem::transmute(field_pic_flag) }; + field_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_intra: u32 = unsafe { ::core::mem::transmute(is_intra) }; + is_intra as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::core::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let bottom_field_flag: u32 = unsafe { ::core::mem::transmute(bottom_field_flag) }; + bottom_field_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let is_reference: u32 = unsafe { ::core::mem::transmute(is_reference) }; + is_reference as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let complementary_field_pair: u32 = + unsafe { ::core::mem::transmute(complementary_field_pair) }; + complementary_field_pair as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264PictureInfo { + pub flags: StdVideoDecodeH264PictureInfoFlags, + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub reserved1: u8, + pub reserved2: u8, + pub frame_num: u16, + pub idr_pic_id: u16, + pub PicOrderCnt: [i32; 2usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264ReferenceInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoDecodeH264ReferenceInfoFlags { + #[inline] + pub fn top_field_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_top_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn bottom_field_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_bottom_field_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn used_for_long_term_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_used_for_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_non_existing(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_non_existing(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + top_field_flag: u32, + bottom_field_flag: u32, + used_for_long_term_reference: u32, + is_non_existing: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let top_field_flag: u32 = unsafe { ::core::mem::transmute(top_field_flag) }; + top_field_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let bottom_field_flag: u32 = unsafe { ::core::mem::transmute(bottom_field_flag) }; + bottom_field_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let used_for_long_term_reference: u32 = + unsafe { ::core::mem::transmute(used_for_long_term_reference) }; + used_for_long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let is_non_existing: u32 = unsafe { ::core::mem::transmute(is_non_existing) }; + is_non_existing as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH264ReferenceInfo { + pub flags: StdVideoDecodeH264ReferenceInfoFlags, + pub FrameNum: u16, + pub reserved: u16, + pub PicOrderCnt: [i32; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264WeightTableFlags { + pub luma_weight_l0_flag: u32, + pub chroma_weight_l0_flag: u32, + pub luma_weight_l1_flag: u32, + pub chroma_weight_l1_flag: u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264WeightTable { + pub flags: StdVideoEncodeH264WeightTableFlags, + pub luma_log2_weight_denom: u8, + pub chroma_log2_weight_denom: u8, + pub luma_weight_l0: [i8; 32usize], + pub luma_offset_l0: [i8; 32usize], + pub chroma_weight_l0: [[i8; 2usize]; 32usize], + pub chroma_offset_l0: [[i8; 2usize]; 32usize], + pub luma_weight_l1: [i8; 32usize], + pub luma_offset_l1: [i8; 32usize], + pub chroma_weight_l1: [[i8; 2usize]; 32usize], + pub chroma_offset_l1: [[i8; 2usize]; 32usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264SliceHeaderFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH264SliceHeaderFlags { + #[inline] + pub fn direct_spatial_mv_pred_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_direct_spatial_mv_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn num_ref_idx_active_override_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_num_ref_idx_active_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + direct_spatial_mv_pred_flag: u32, + num_ref_idx_active_override_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let direct_spatial_mv_pred_flag: u32 = + unsafe { ::core::mem::transmute(direct_spatial_mv_pred_flag) }; + direct_spatial_mv_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let num_ref_idx_active_override_flag: u32 = + unsafe { ::core::mem::transmute(num_ref_idx_active_override_flag) }; + num_ref_idx_active_override_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264PictureInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH264PictureInfoFlags { + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn is_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn no_output_of_prior_pics_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_output_of_prior_pics_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn long_term_reference_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_reference_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn adaptive_ref_pic_marking_mode_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_adaptive_ref_pic_marking_mode_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 27u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + IdrPicFlag: u32, + is_reference: u32, + no_output_of_prior_pics_flag: u32, + long_term_reference_flag: u32, + adaptive_ref_pic_marking_mode_flag: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::core::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_reference: u32 = unsafe { ::core::mem::transmute(is_reference) }; + is_reference as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let no_output_of_prior_pics_flag: u32 = + unsafe { ::core::mem::transmute(no_output_of_prior_pics_flag) }; + no_output_of_prior_pics_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let long_term_reference_flag: u32 = + unsafe { ::core::mem::transmute(long_term_reference_flag) }; + long_term_reference_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let adaptive_ref_pic_marking_mode_flag: u32 = + unsafe { ::core::mem::transmute(adaptive_ref_pic_marking_mode_flag) }; + adaptive_ref_pic_marking_mode_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 27u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264ReferenceInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH264ReferenceInfoFlags { + #[inline] + pub fn used_for_long_term_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_used_for_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + used_for_long_term_reference: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let used_for_long_term_reference: u32 = + unsafe { ::core::mem::transmute(used_for_long_term_reference) }; + used_for_long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264ReferenceListsInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH264ReferenceListsInfoFlags { + #[inline] + pub fn ref_pic_list_modification_flag_l0(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_flag_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn ref_pic_list_modification_flag_l1(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_flag_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + ref_pic_list_modification_flag_l0: u32, + ref_pic_list_modification_flag_l1: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let ref_pic_list_modification_flag_l0: u32 = + unsafe { ::core::mem::transmute(ref_pic_list_modification_flag_l0) }; + ref_pic_list_modification_flag_l0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let ref_pic_list_modification_flag_l1: u32 = + unsafe { ::core::mem::transmute(ref_pic_list_modification_flag_l1) }; + ref_pic_list_modification_flag_l1 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefListModEntry { + pub modification_of_pic_nums_idc: StdVideoH264ModificationOfPicNumsIdc, + pub abs_diff_pic_num_minus1: u16, + pub long_term_pic_num: u16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264RefPicMarkingEntry { + pub memory_management_control_operation: StdVideoH264MemMgmtControlOp, + pub difference_of_pic_nums_minus1: u16, + pub long_term_pic_num: u16, + pub long_term_frame_idx: u16, + pub max_long_term_frame_idx_plus1: u16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264ReferenceListsInfo { + pub flags: StdVideoEncodeH264ReferenceListsInfoFlags, + pub num_ref_idx_l0_active_minus1: u8, + pub num_ref_idx_l1_active_minus1: u8, + pub RefPicList0: [u8; 32usize], + pub RefPicList1: [u8; 32usize], + pub refList0ModOpCount: u8, + pub refList1ModOpCount: u8, + pub refPicMarkingOpCount: u8, + pub reserved1: [u8; 7usize], + pub pRefList0ModOperations: *const StdVideoEncodeH264RefListModEntry, + pub pRefList1ModOperations: *const StdVideoEncodeH264RefListModEntry, + pub pRefPicMarkingOperations: *const StdVideoEncodeH264RefPicMarkingEntry, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264PictureInfo { + pub flags: StdVideoEncodeH264PictureInfoFlags, + pub seq_parameter_set_id: u8, + pub pic_parameter_set_id: u8, + pub idr_pic_id: u16, + pub primary_pic_type: StdVideoH264PictureType, + pub frame_num: u32, + pub PicOrderCnt: i32, + pub temporal_id: u8, + pub reserved1: [u8; 3usize], + pub pRefLists: *const StdVideoEncodeH264ReferenceListsInfo, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264ReferenceInfo { + pub flags: StdVideoEncodeH264ReferenceInfoFlags, + pub primary_pic_type: StdVideoH264PictureType, + pub FrameNum: u32, + pub PicOrderCnt: i32, + pub long_term_pic_num: u16, + pub long_term_frame_idx: u16, + pub temporal_id: u8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH264SliceHeader { + pub flags: StdVideoEncodeH264SliceHeaderFlags, + pub first_mb_in_slice: u32, + pub slice_type: StdVideoH264SliceType, + pub slice_alpha_c0_offset_div2: i8, + pub slice_beta_offset_div2: i8, + pub slice_qp_delta: i8, + pub reserved1: u8, + pub cabac_init_idc: StdVideoH264CabacInitIdc, + pub disable_deblocking_filter_idc: StdVideoH264DisableDeblockingFilterIdc, + pub pWeightTable: *const StdVideoEncodeH264WeightTable, +} +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_MONOCHROME: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(0); +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_420: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(1); +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_422: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(2); +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_444: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(3); +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_INVALID: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(2147483647); +pub const STD_VIDEO_H265_CHROMA_FORMAT_IDC_MAX_ENUM: StdVideoH265ChromaFormatIdc = + StdVideoH265ChromaFormatIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265ChromaFormatIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H265_PROFILE_IDC_MAIN: StdVideoH265ProfileIdc = StdVideoH265ProfileIdc(1); +pub const STD_VIDEO_H265_PROFILE_IDC_MAIN_10: StdVideoH265ProfileIdc = StdVideoH265ProfileIdc(2); +pub const STD_VIDEO_H265_PROFILE_IDC_MAIN_STILL_PICTURE: StdVideoH265ProfileIdc = + StdVideoH265ProfileIdc(3); +pub const STD_VIDEO_H265_PROFILE_IDC_FORMAT_RANGE_EXTENSIONS: StdVideoH265ProfileIdc = + StdVideoH265ProfileIdc(4); +pub const STD_VIDEO_H265_PROFILE_IDC_SCC_EXTENSIONS: StdVideoH265ProfileIdc = + StdVideoH265ProfileIdc(9); +pub const STD_VIDEO_H265_PROFILE_IDC_INVALID: StdVideoH265ProfileIdc = + StdVideoH265ProfileIdc(2147483647); +pub const STD_VIDEO_H265_PROFILE_IDC_MAX_ENUM: StdVideoH265ProfileIdc = + StdVideoH265ProfileIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265ProfileIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H265_LEVEL_IDC_1_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(0); +pub const STD_VIDEO_H265_LEVEL_IDC_2_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(1); +pub const STD_VIDEO_H265_LEVEL_IDC_2_1: StdVideoH265LevelIdc = StdVideoH265LevelIdc(2); +pub const STD_VIDEO_H265_LEVEL_IDC_3_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(3); +pub const STD_VIDEO_H265_LEVEL_IDC_3_1: StdVideoH265LevelIdc = StdVideoH265LevelIdc(4); +pub const STD_VIDEO_H265_LEVEL_IDC_4_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(5); +pub const STD_VIDEO_H265_LEVEL_IDC_4_1: StdVideoH265LevelIdc = StdVideoH265LevelIdc(6); +pub const STD_VIDEO_H265_LEVEL_IDC_5_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(7); +pub const STD_VIDEO_H265_LEVEL_IDC_5_1: StdVideoH265LevelIdc = StdVideoH265LevelIdc(8); +pub const STD_VIDEO_H265_LEVEL_IDC_5_2: StdVideoH265LevelIdc = StdVideoH265LevelIdc(9); +pub const STD_VIDEO_H265_LEVEL_IDC_6_0: StdVideoH265LevelIdc = StdVideoH265LevelIdc(10); +pub const STD_VIDEO_H265_LEVEL_IDC_6_1: StdVideoH265LevelIdc = StdVideoH265LevelIdc(11); +pub const STD_VIDEO_H265_LEVEL_IDC_6_2: StdVideoH265LevelIdc = StdVideoH265LevelIdc(12); +pub const STD_VIDEO_H265_LEVEL_IDC_INVALID: StdVideoH265LevelIdc = StdVideoH265LevelIdc(2147483647); +pub const STD_VIDEO_H265_LEVEL_IDC_MAX_ENUM: StdVideoH265LevelIdc = + StdVideoH265LevelIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265LevelIdc(pub ::core::ffi::c_int); +pub const STD_VIDEO_H265_SLICE_TYPE_B: StdVideoH265SliceType = StdVideoH265SliceType(0); +pub const STD_VIDEO_H265_SLICE_TYPE_P: StdVideoH265SliceType = StdVideoH265SliceType(1); +pub const STD_VIDEO_H265_SLICE_TYPE_I: StdVideoH265SliceType = StdVideoH265SliceType(2); +pub const STD_VIDEO_H265_SLICE_TYPE_INVALID: StdVideoH265SliceType = + StdVideoH265SliceType(2147483647); +pub const STD_VIDEO_H265_SLICE_TYPE_MAX_ENUM: StdVideoH265SliceType = + StdVideoH265SliceType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265SliceType(pub ::core::ffi::c_int); +pub const STD_VIDEO_H265_PICTURE_TYPE_P: StdVideoH265PictureType = StdVideoH265PictureType(0); +pub const STD_VIDEO_H265_PICTURE_TYPE_B: StdVideoH265PictureType = StdVideoH265PictureType(1); +pub const STD_VIDEO_H265_PICTURE_TYPE_I: StdVideoH265PictureType = StdVideoH265PictureType(2); +pub const STD_VIDEO_H265_PICTURE_TYPE_IDR: StdVideoH265PictureType = StdVideoH265PictureType(3); +pub const STD_VIDEO_H265_PICTURE_TYPE_INVALID: StdVideoH265PictureType = + StdVideoH265PictureType(2147483647); +pub const STD_VIDEO_H265_PICTURE_TYPE_MAX_ENUM: StdVideoH265PictureType = + StdVideoH265PictureType(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265PictureType(pub ::core::ffi::c_int); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_UNSPECIFIED: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(0); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_SQUARE: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(1); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_12_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(2); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_10_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(3); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_16_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(4); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_40_33: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(5); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_24_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(6); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_20_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(7); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_32_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(8); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_80_33: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(9); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_18_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(10); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_15_11: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(11); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_64_33: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(12); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_160_99: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(13); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_4_3: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(14); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_3_2: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(15); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_2_1: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(16); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_EXTENDED_SAR: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(255); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(2147483647); +pub const STD_VIDEO_H265_ASPECT_RATIO_IDC_MAX_ENUM: StdVideoH265AspectRatioIdc = + StdVideoH265AspectRatioIdc(2147483647); +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Default)] +pub struct StdVideoH265AspectRatioIdc(pub ::core::ffi::c_int); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265DecPicBufMgr { + pub max_latency_increase_plus1: [u32; 7usize], + pub max_dec_pic_buffering_minus1: [u8; 7usize], + pub max_num_reorder_pics: [u8; 7usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SubLayerHrdParameters { + pub bit_rate_value_minus1: [u32; 32usize], + pub cpb_size_value_minus1: [u32; 32usize], + pub cpb_size_du_value_minus1: [u32; 32usize], + pub bit_rate_du_value_minus1: [u32; 32usize], + pub cbr_flag: u32, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265HrdFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoH265HrdFlags { + #[inline] + pub fn nal_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_nal_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn vcl_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_vcl_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn sub_pic_hrd_params_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sub_pic_hrd_params_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn sub_pic_cpb_params_in_pic_timing_sei_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_sub_pic_cpb_params_in_pic_timing_sei_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn fixed_pic_rate_general_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 8u8) as u32) } + } + #[inline] + pub fn set_fixed_pic_rate_general_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 8u8, val as u64) + } + } + #[inline] + pub fn fixed_pic_rate_within_cvs_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 8u8) as u32) } + } + #[inline] + pub fn set_fixed_pic_rate_within_cvs_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 8u8, val as u64) + } + } + #[inline] + pub fn low_delay_hrd_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 8u8) as u32) } + } + #[inline] + pub fn set_low_delay_hrd_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 8u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + nal_hrd_parameters_present_flag: u32, + vcl_hrd_parameters_present_flag: u32, + sub_pic_hrd_params_present_flag: u32, + sub_pic_cpb_params_in_pic_timing_sei_flag: u32, + fixed_pic_rate_general_flag: u32, + fixed_pic_rate_within_cvs_flag: u32, + low_delay_hrd_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let nal_hrd_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(nal_hrd_parameters_present_flag) }; + nal_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let vcl_hrd_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(vcl_hrd_parameters_present_flag) }; + vcl_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let sub_pic_hrd_params_present_flag: u32 = + unsafe { ::core::mem::transmute(sub_pic_hrd_params_present_flag) }; + sub_pic_hrd_params_present_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let sub_pic_cpb_params_in_pic_timing_sei_flag: u32 = + unsafe { ::core::mem::transmute(sub_pic_cpb_params_in_pic_timing_sei_flag) }; + sub_pic_cpb_params_in_pic_timing_sei_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 8u8, { + let fixed_pic_rate_general_flag: u32 = + unsafe { ::core::mem::transmute(fixed_pic_rate_general_flag) }; + fixed_pic_rate_general_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 8u8, { + let fixed_pic_rate_within_cvs_flag: u32 = + unsafe { ::core::mem::transmute(fixed_pic_rate_within_cvs_flag) }; + fixed_pic_rate_within_cvs_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 8u8, { + let low_delay_hrd_flag: u32 = unsafe { ::core::mem::transmute(low_delay_hrd_flag) }; + low_delay_hrd_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265HrdParameters { + pub flags: StdVideoH265HrdFlags, + pub tick_divisor_minus2: u8, + pub du_cpb_removal_delay_increment_length_minus1: u8, + pub dpb_output_delay_du_length_minus1: u8, + pub bit_rate_scale: u8, + pub cpb_size_scale: u8, + pub cpb_size_du_scale: u8, + pub initial_cpb_removal_delay_length_minus1: u8, + pub au_cpb_removal_delay_length_minus1: u8, + pub dpb_output_delay_length_minus1: u8, + pub cpb_cnt_minus1: [u8; 7usize], + pub elemental_duration_in_tc_minus1: [u16; 7usize], + pub reserved: [u16; 3usize], + pub pSubLayerHrdParametersNal: *const StdVideoH265SubLayerHrdParameters, + pub pSubLayerHrdParametersVcl: *const StdVideoH265SubLayerHrdParameters, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265VpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoH265VpsFlags { + #[inline] + pub fn vps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_sub_layer_ordering_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_sub_layer_ordering_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_timing_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn vps_poc_proportional_to_timing_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_vps_poc_proportional_to_timing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + vps_temporal_id_nesting_flag: u32, + vps_sub_layer_ordering_info_present_flag: u32, + vps_timing_info_present_flag: u32, + vps_poc_proportional_to_timing_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let vps_temporal_id_nesting_flag: u32 = + unsafe { ::core::mem::transmute(vps_temporal_id_nesting_flag) }; + vps_temporal_id_nesting_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let vps_sub_layer_ordering_info_present_flag: u32 = + unsafe { ::core::mem::transmute(vps_sub_layer_ordering_info_present_flag) }; + vps_sub_layer_ordering_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let vps_timing_info_present_flag: u32 = + unsafe { ::core::mem::transmute(vps_timing_info_present_flag) }; + vps_timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let vps_poc_proportional_to_timing_flag: u32 = + unsafe { ::core::mem::transmute(vps_poc_proportional_to_timing_flag) }; + vps_poc_proportional_to_timing_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265ProfileTierLevelFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoH265ProfileTierLevelFlags { + #[inline] + pub fn general_tier_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_general_tier_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn general_progressive_source_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_general_progressive_source_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn general_interlaced_source_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_general_interlaced_source_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn general_non_packed_constraint_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_general_non_packed_constraint_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn general_frame_only_constraint_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_general_frame_only_constraint_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + general_tier_flag: u32, + general_progressive_source_flag: u32, + general_interlaced_source_flag: u32, + general_non_packed_constraint_flag: u32, + general_frame_only_constraint_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let general_tier_flag: u32 = unsafe { ::core::mem::transmute(general_tier_flag) }; + general_tier_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let general_progressive_source_flag: u32 = + unsafe { ::core::mem::transmute(general_progressive_source_flag) }; + general_progressive_source_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let general_interlaced_source_flag: u32 = + unsafe { ::core::mem::transmute(general_interlaced_source_flag) }; + general_interlaced_source_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let general_non_packed_constraint_flag: u32 = + unsafe { ::core::mem::transmute(general_non_packed_constraint_flag) }; + general_non_packed_constraint_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let general_frame_only_constraint_flag: u32 = + unsafe { ::core::mem::transmute(general_frame_only_constraint_flag) }; + general_frame_only_constraint_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265ProfileTierLevel { + pub flags: StdVideoH265ProfileTierLevelFlags, + pub general_profile_idc: StdVideoH265ProfileIdc, + pub general_level_idc: StdVideoH265LevelIdc, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265VideoParameterSet { + pub flags: StdVideoH265VpsFlags, + pub vps_video_parameter_set_id: u8, + pub vps_max_sub_layers_minus1: u8, + pub reserved1: u8, + pub reserved2: u8, + pub vps_num_units_in_tick: u32, + pub vps_time_scale: u32, + pub vps_num_ticks_poc_diff_one_minus1: u32, + pub reserved3: u32, + pub pDecPicBufMgr: *const StdVideoH265DecPicBufMgr, + pub pHrdParameters: *const StdVideoH265HrdParameters, + pub pProfileTierLevel: *const StdVideoH265ProfileTierLevel, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265ScalingLists { + pub ScalingList4x4: [[u8; 16usize]; 6usize], + pub ScalingList8x8: [[u8; 64usize]; 6usize], + pub ScalingList16x16: [[u8; 64usize]; 6usize], + pub ScalingList32x32: [[u8; 64usize]; 2usize], + pub ScalingListDCCoef16x16: [u8; 6usize], + pub ScalingListDCCoef32x32: [u8; 2usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SpsVuiFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub __bindgen_padding_0: u8, +} +impl StdVideoH265SpsVuiFlags { + #[inline] + pub fn aspect_ratio_info_present_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn overscan_appropriate_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_overscan_appropriate_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_signal_type_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_signal_type_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn video_full_range_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_video_full_range_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn colour_description_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_colour_description_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_loc_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_loc_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn neutral_chroma_indication_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_neutral_chroma_indication_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn field_seq_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_field_seq_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn frame_field_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_frame_field_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn default_display_window_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_default_display_window_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_timing_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_timing_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_poc_proportional_to_timing_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_poc_proportional_to_timing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_hrd_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_hrd_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn bitstream_restriction_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_bitstream_restriction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn tiles_fixed_structure_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_fixed_structure_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn restricted_ref_pic_lists_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_restricted_ref_pic_lists_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + aspect_ratio_info_present_flag: u32, + overscan_info_present_flag: u32, + overscan_appropriate_flag: u32, + video_signal_type_present_flag: u32, + video_full_range_flag: u32, + colour_description_present_flag: u32, + chroma_loc_info_present_flag: u32, + neutral_chroma_indication_flag: u32, + field_seq_flag: u32, + frame_field_info_present_flag: u32, + default_display_window_flag: u32, + vui_timing_info_present_flag: u32, + vui_poc_proportional_to_timing_flag: u32, + vui_hrd_parameters_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, + ) -> __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 { ::core::mem::transmute(aspect_ratio_info_present_flag) }; + aspect_ratio_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let overscan_info_present_flag: u32 = + unsafe { ::core::mem::transmute(overscan_info_present_flag) }; + overscan_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let overscan_appropriate_flag: u32 = + unsafe { ::core::mem::transmute(overscan_appropriate_flag) }; + overscan_appropriate_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let video_signal_type_present_flag: u32 = + unsafe { ::core::mem::transmute(video_signal_type_present_flag) }; + video_signal_type_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let video_full_range_flag: u32 = + unsafe { ::core::mem::transmute(video_full_range_flag) }; + video_full_range_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let colour_description_present_flag: u32 = + unsafe { ::core::mem::transmute(colour_description_present_flag) }; + colour_description_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let chroma_loc_info_present_flag: u32 = + unsafe { ::core::mem::transmute(chroma_loc_info_present_flag) }; + chroma_loc_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let neutral_chroma_indication_flag: u32 = + unsafe { ::core::mem::transmute(neutral_chroma_indication_flag) }; + neutral_chroma_indication_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let field_seq_flag: u32 = unsafe { ::core::mem::transmute(field_seq_flag) }; + field_seq_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let frame_field_info_present_flag: u32 = + unsafe { ::core::mem::transmute(frame_field_info_present_flag) }; + frame_field_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let default_display_window_flag: u32 = + unsafe { ::core::mem::transmute(default_display_window_flag) }; + default_display_window_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let vui_timing_info_present_flag: u32 = + unsafe { ::core::mem::transmute(vui_timing_info_present_flag) }; + vui_timing_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let vui_poc_proportional_to_timing_flag: u32 = + unsafe { ::core::mem::transmute(vui_poc_proportional_to_timing_flag) }; + vui_poc_proportional_to_timing_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let vui_hrd_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(vui_hrd_parameters_present_flag) }; + vui_hrd_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let bitstream_restriction_flag: u32 = + unsafe { ::core::mem::transmute(bitstream_restriction_flag) }; + bitstream_restriction_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let tiles_fixed_structure_flag: u32 = + unsafe { ::core::mem::transmute(tiles_fixed_structure_flag) }; + tiles_fixed_structure_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let motion_vectors_over_pic_boundaries_flag: u32 = + unsafe { ::core::mem::transmute(motion_vectors_over_pic_boundaries_flag) }; + motion_vectors_over_pic_boundaries_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let restricted_ref_pic_lists_flag: u32 = + unsafe { ::core::mem::transmute(restricted_ref_pic_lists_flag) }; + restricted_ref_pic_lists_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SequenceParameterSetVui { + pub flags: StdVideoH265SpsVuiFlags, + pub aspect_ratio_idc: StdVideoH265AspectRatioIdc, + pub sar_width: u16, + pub sar_height: u16, + pub video_format: u8, + pub colour_primaries: u8, + pub transfer_characteristics: u8, + pub matrix_coeffs: u8, + pub chroma_sample_loc_type_top_field: u8, + pub chroma_sample_loc_type_bottom_field: u8, + pub reserved1: u8, + pub reserved2: u8, + pub def_disp_win_left_offset: u16, + pub def_disp_win_right_offset: u16, + pub def_disp_win_top_offset: u16, + pub def_disp_win_bottom_offset: u16, + pub vui_num_units_in_tick: u32, + pub vui_time_scale: u32, + pub vui_num_ticks_poc_diff_one_minus1: u32, + pub min_spatial_segmentation_idc: u16, + pub reserved3: u16, + pub max_bytes_per_pic_denom: u8, + pub max_bits_per_min_cu_denom: u8, + pub log2_max_mv_length_horizontal: u8, + pub log2_max_mv_length_vertical: u8, + pub pHrdParameters: *const StdVideoH265HrdParameters, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PredictorPaletteEntries { + pub PredictorPaletteEntries: [[u16; 128usize]; 3usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoH265SpsFlags { + #[inline] + pub fn sps_temporal_id_nesting_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_id_nesting_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn separate_colour_plane_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_separate_colour_plane_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn conformance_window_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_conformance_window_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_sub_layer_ordering_info_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_sub_layer_ordering_info_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn scaling_list_enabled_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn amp_enabled_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn pcm_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn pcm_loop_filter_disabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn long_term_ref_pics_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_long_term_ref_pics_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn vui_parameters_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_vui_parameters_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_extension_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_range_extension_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_range_extension_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_rotation_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_rotation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_context_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_transform_skip_context_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn implicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_implicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn explicit_rdpcm_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_explicit_rdpcm_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn extended_precision_processing_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_extended_precision_processing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn intra_smoothing_disabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_smoothing_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn high_precision_offsets_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } + } + #[inline] + pub fn set_high_precision_offsets_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn persistent_rice_adaptation_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } + } + #[inline] + pub fn set_persistent_rice_adaptation_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_bypass_alignment_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_bypass_alignment_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_scc_extension_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_scc_extension_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_curr_pic_ref_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_curr_pic_ref_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn palette_mode_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } + } + #[inline] + pub fn set_palette_mode_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub fn sps_palette_predictor_initializers_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } + } + #[inline] + pub fn set_sps_palette_predictor_initializers_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub fn intra_boundary_filtering_disabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } + } + #[inline] + pub fn set_intra_boundary_filtering_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + sps_temporal_id_nesting_flag: u32, + separate_colour_plane_flag: u32, + conformance_window_flag: u32, + sps_sub_layer_ordering_info_present_flag: u32, + scaling_list_enabled_flag: u32, + sps_scaling_list_data_present_flag: u32, + amp_enabled_flag: u32, + sample_adaptive_offset_enabled_flag: u32, + pcm_enabled_flag: u32, + pcm_loop_filter_disabled_flag: u32, + long_term_ref_pics_present_flag: u32, + sps_temporal_mvp_enabled_flag: u32, + strong_intra_smoothing_enabled_flag: u32, + vui_parameters_present_flag: u32, + sps_extension_present_flag: u32, + sps_range_extension_flag: u32, + 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, + sps_scc_extension_flag: u32, + sps_curr_pic_ref_enabled_flag: u32, + palette_mode_enabled_flag: u32, + sps_palette_predictor_initializers_present_flag: u32, + intra_boundary_filtering_disabled_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let sps_temporal_id_nesting_flag: u32 = + unsafe { ::core::mem::transmute(sps_temporal_id_nesting_flag) }; + sps_temporal_id_nesting_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let separate_colour_plane_flag: u32 = + unsafe { ::core::mem::transmute(separate_colour_plane_flag) }; + separate_colour_plane_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let conformance_window_flag: u32 = + unsafe { ::core::mem::transmute(conformance_window_flag) }; + conformance_window_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let sps_sub_layer_ordering_info_present_flag: u32 = + unsafe { ::core::mem::transmute(sps_sub_layer_ordering_info_present_flag) }; + sps_sub_layer_ordering_info_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let scaling_list_enabled_flag: u32 = + unsafe { ::core::mem::transmute(scaling_list_enabled_flag) }; + scaling_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let sps_scaling_list_data_present_flag: u32 = + unsafe { ::core::mem::transmute(sps_scaling_list_data_present_flag) }; + sps_scaling_list_data_present_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let amp_enabled_flag: u32 = unsafe { ::core::mem::transmute(amp_enabled_flag) }; + amp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let sample_adaptive_offset_enabled_flag: u32 = + unsafe { ::core::mem::transmute(sample_adaptive_offset_enabled_flag) }; + sample_adaptive_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let pcm_enabled_flag: u32 = unsafe { ::core::mem::transmute(pcm_enabled_flag) }; + pcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let pcm_loop_filter_disabled_flag: u32 = + unsafe { ::core::mem::transmute(pcm_loop_filter_disabled_flag) }; + pcm_loop_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let long_term_ref_pics_present_flag: u32 = + unsafe { ::core::mem::transmute(long_term_ref_pics_present_flag) }; + long_term_ref_pics_present_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let sps_temporal_mvp_enabled_flag: u32 = + unsafe { ::core::mem::transmute(sps_temporal_mvp_enabled_flag) }; + sps_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let strong_intra_smoothing_enabled_flag: u32 = + unsafe { ::core::mem::transmute(strong_intra_smoothing_enabled_flag) }; + strong_intra_smoothing_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let vui_parameters_present_flag: u32 = + unsafe { ::core::mem::transmute(vui_parameters_present_flag) }; + vui_parameters_present_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let sps_extension_present_flag: u32 = + unsafe { ::core::mem::transmute(sps_extension_present_flag) }; + sps_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let sps_range_extension_flag: u32 = + unsafe { ::core::mem::transmute(sps_range_extension_flag) }; + sps_range_extension_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let transform_skip_rotation_enabled_flag: u32 = + unsafe { ::core::mem::transmute(transform_skip_rotation_enabled_flag) }; + transform_skip_rotation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let transform_skip_context_enabled_flag: u32 = + unsafe { ::core::mem::transmute(transform_skip_context_enabled_flag) }; + transform_skip_context_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let implicit_rdpcm_enabled_flag: u32 = + unsafe { ::core::mem::transmute(implicit_rdpcm_enabled_flag) }; + implicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let explicit_rdpcm_enabled_flag: u32 = + unsafe { ::core::mem::transmute(explicit_rdpcm_enabled_flag) }; + explicit_rdpcm_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let extended_precision_processing_flag: u32 = + unsafe { ::core::mem::transmute(extended_precision_processing_flag) }; + extended_precision_processing_flag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let intra_smoothing_disabled_flag: u32 = + unsafe { ::core::mem::transmute(intra_smoothing_disabled_flag) }; + intra_smoothing_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let high_precision_offsets_enabled_flag: u32 = + unsafe { ::core::mem::transmute(high_precision_offsets_enabled_flag) }; + high_precision_offsets_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let persistent_rice_adaptation_enabled_flag: u32 = + unsafe { ::core::mem::transmute(persistent_rice_adaptation_enabled_flag) }; + persistent_rice_adaptation_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let cabac_bypass_alignment_enabled_flag: u32 = + unsafe { ::core::mem::transmute(cabac_bypass_alignment_enabled_flag) }; + cabac_bypass_alignment_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let sps_scc_extension_flag: u32 = + unsafe { ::core::mem::transmute(sps_scc_extension_flag) }; + sps_scc_extension_flag as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let sps_curr_pic_ref_enabled_flag: u32 = + unsafe { ::core::mem::transmute(sps_curr_pic_ref_enabled_flag) }; + sps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let palette_mode_enabled_flag: u32 = + unsafe { ::core::mem::transmute(palette_mode_enabled_flag) }; + palette_mode_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let sps_palette_predictor_initializers_present_flag: u32 = + unsafe { ::core::mem::transmute(sps_palette_predictor_initializers_present_flag) }; + sps_palette_predictor_initializers_present_flag as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let intra_boundary_filtering_disabled_flag: u32 = + unsafe { ::core::mem::transmute(intra_boundary_filtering_disabled_flag) }; + intra_boundary_filtering_disabled_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265ShortTermRefPicSetFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoH265ShortTermRefPicSetFlags { + #[inline] + pub fn inter_ref_pic_set_prediction_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_inter_ref_pic_set_prediction_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn delta_rps_sign(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_delta_rps_sign(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + inter_ref_pic_set_prediction_flag: u32, + delta_rps_sign: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let inter_ref_pic_set_prediction_flag: u32 = + unsafe { ::core::mem::transmute(inter_ref_pic_set_prediction_flag) }; + inter_ref_pic_set_prediction_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let delta_rps_sign: u32 = unsafe { ::core::mem::transmute(delta_rps_sign) }; + delta_rps_sign as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265ShortTermRefPicSet { + pub flags: StdVideoH265ShortTermRefPicSetFlags, + pub delta_idx_minus1: u32, + pub use_delta_flag: u16, + pub abs_delta_rps_minus1: u16, + pub used_by_curr_pic_flag: u16, + pub used_by_curr_pic_s0_flag: u16, + pub used_by_curr_pic_s1_flag: u16, + pub reserved1: u16, + pub reserved2: u8, + pub reserved3: u8, + pub num_negative_pics: u8, + pub num_positive_pics: u8, + pub delta_poc_s0_minus1: [u16; 16usize], + pub delta_poc_s1_minus1: [u16; 16usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265LongTermRefPicsSps { + pub used_by_curr_pic_lt_sps_flag: u32, + pub lt_ref_pic_poc_lsb_sps: [u32; 32usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265SequenceParameterSet { + pub flags: StdVideoH265SpsFlags, + pub chroma_format_idc: StdVideoH265ChromaFormatIdc, + pub pic_width_in_luma_samples: u32, + pub pic_height_in_luma_samples: u32, + pub sps_video_parameter_set_id: u8, + pub sps_max_sub_layers_minus1: u8, + pub sps_seq_parameter_set_id: u8, + pub bit_depth_luma_minus8: u8, + pub bit_depth_chroma_minus8: u8, + pub log2_max_pic_order_cnt_lsb_minus4: u8, + pub log2_min_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_luma_coding_block_size: u8, + pub log2_min_luma_transform_block_size_minus2: u8, + pub log2_diff_max_min_luma_transform_block_size: u8, + pub max_transform_hierarchy_depth_inter: u8, + pub max_transform_hierarchy_depth_intra: u8, + pub num_short_term_ref_pic_sets: u8, + pub num_long_term_ref_pics_sps: u8, + pub pcm_sample_bit_depth_luma_minus1: u8, + pub pcm_sample_bit_depth_chroma_minus1: u8, + pub log2_min_pcm_luma_coding_block_size_minus3: u8, + pub log2_diff_max_min_pcm_luma_coding_block_size: u8, + pub reserved1: u8, + pub reserved2: u8, + pub palette_max_size: u8, + pub delta_palette_max_predictor_size: u8, + pub motion_vector_resolution_control_idc: u8, + pub sps_num_palette_predictor_initializers_minus1: u8, + pub conf_win_left_offset: u32, + pub conf_win_right_offset: u32, + pub conf_win_top_offset: u32, + pub conf_win_bottom_offset: u32, + pub pProfileTierLevel: *const StdVideoH265ProfileTierLevel, + pub pDecPicBufMgr: *const StdVideoH265DecPicBufMgr, + pub pScalingLists: *const StdVideoH265ScalingLists, + pub pShortTermRefPicSet: *const StdVideoH265ShortTermRefPicSet, + pub pLongTermRefPicsSps: *const StdVideoH265LongTermRefPicsSps, + pub pSequenceParameterSetVui: *const StdVideoH265SequenceParameterSetVui, + pub pPredictorPaletteEntries: *const StdVideoH265PredictorPaletteEntries, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PpsFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoH265PpsFlags { + #[inline] + pub fn dependent_slice_segments_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn output_flag_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_output_flag_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn sign_data_hiding_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_init_present_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn constrained_intra_pred_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_constrained_intra_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn transform_skip_enabled_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn cu_qp_delta_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_slice_chroma_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_chroma_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_pred_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_pred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn weighted_bipred_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_weighted_bipred_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn transquant_bypass_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn tiles_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn entropy_coding_sync_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } + } + #[inline] + pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn uniform_spacing_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } + } + #[inline] + pub fn set_uniform_spacing_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } + } + #[inline] + pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_control_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_override_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_override_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_deblocking_filter_disabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_deblocking_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_scaling_list_data_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_scaling_list_data_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn lists_modification_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) } + } + #[inline] + pub fn set_lists_modification_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_segment_header_extension_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_segment_header_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_extension_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_extension_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn cross_component_prediction_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u32) } + } + #[inline] + pub fn set_cross_component_prediction_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn chroma_qp_offset_list_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u32) } + } + #[inline] + pub fn set_chroma_qp_offset_list_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_curr_pic_ref_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn residual_adaptive_colour_transform_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u32) } + } + #[inline] + pub fn set_residual_adaptive_colour_transform_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_slice_act_qp_offsets_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_slice_act_qp_offsets_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_palette_predictor_initializers_present_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_palette_predictor_initializers_present_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub fn monochrome_palette_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } + } + #[inline] + pub fn set_monochrome_palette_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub fn pps_range_extension_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } + } + #[inline] + pub fn set_pps_range_extension_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + dependent_slice_segments_enabled_flag: u32, + output_flag_present_flag: u32, + sign_data_hiding_enabled_flag: u32, + cabac_init_present_flag: u32, + constrained_intra_pred_flag: u32, + transform_skip_enabled_flag: u32, + cu_qp_delta_enabled_flag: u32, + pps_slice_chroma_qp_offsets_present_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, + uniform_spacing_flag: u32, + loop_filter_across_tiles_enabled_flag: u32, + pps_loop_filter_across_slices_enabled_flag: u32, + deblocking_filter_control_present_flag: u32, + deblocking_filter_override_enabled_flag: u32, + pps_deblocking_filter_disabled_flag: u32, + pps_scaling_list_data_present_flag: u32, + lists_modification_present_flag: u32, + slice_segment_header_extension_present_flag: u32, + pps_extension_present_flag: u32, + cross_component_prediction_enabled_flag: u32, + chroma_qp_offset_list_enabled_flag: u32, + pps_curr_pic_ref_enabled_flag: u32, + residual_adaptive_colour_transform_enabled_flag: u32, + pps_slice_act_qp_offsets_present_flag: u32, + pps_palette_predictor_initializers_present_flag: u32, + monochrome_palette_flag: u32, + pps_range_extension_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let dependent_slice_segments_enabled_flag: u32 = + unsafe { ::core::mem::transmute(dependent_slice_segments_enabled_flag) }; + dependent_slice_segments_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let output_flag_present_flag: u32 = + unsafe { ::core::mem::transmute(output_flag_present_flag) }; + output_flag_present_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let sign_data_hiding_enabled_flag: u32 = + unsafe { ::core::mem::transmute(sign_data_hiding_enabled_flag) }; + sign_data_hiding_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cabac_init_present_flag: u32 = + unsafe { ::core::mem::transmute(cabac_init_present_flag) }; + cabac_init_present_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let constrained_intra_pred_flag: u32 = + unsafe { ::core::mem::transmute(constrained_intra_pred_flag) }; + constrained_intra_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let transform_skip_enabled_flag: u32 = + unsafe { ::core::mem::transmute(transform_skip_enabled_flag) }; + transform_skip_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let cu_qp_delta_enabled_flag: u32 = + unsafe { ::core::mem::transmute(cu_qp_delta_enabled_flag) }; + cu_qp_delta_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let pps_slice_chroma_qp_offsets_present_flag: u32 = + unsafe { ::core::mem::transmute(pps_slice_chroma_qp_offsets_present_flag) }; + pps_slice_chroma_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let weighted_pred_flag: u32 = unsafe { ::core::mem::transmute(weighted_pred_flag) }; + weighted_pred_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let weighted_bipred_flag: u32 = unsafe { ::core::mem::transmute(weighted_bipred_flag) }; + weighted_bipred_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let transquant_bypass_enabled_flag: u32 = + unsafe { ::core::mem::transmute(transquant_bypass_enabled_flag) }; + transquant_bypass_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let tiles_enabled_flag: u32 = unsafe { ::core::mem::transmute(tiles_enabled_flag) }; + tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let entropy_coding_sync_enabled_flag: u32 = + unsafe { ::core::mem::transmute(entropy_coding_sync_enabled_flag) }; + entropy_coding_sync_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let uniform_spacing_flag: u32 = unsafe { ::core::mem::transmute(uniform_spacing_flag) }; + uniform_spacing_flag as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let loop_filter_across_tiles_enabled_flag: u32 = + unsafe { ::core::mem::transmute(loop_filter_across_tiles_enabled_flag) }; + loop_filter_across_tiles_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let pps_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::core::mem::transmute(pps_loop_filter_across_slices_enabled_flag) }; + pps_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let deblocking_filter_control_present_flag: u32 = + unsafe { ::core::mem::transmute(deblocking_filter_control_present_flag) }; + deblocking_filter_control_present_flag as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let deblocking_filter_override_enabled_flag: u32 = + unsafe { ::core::mem::transmute(deblocking_filter_override_enabled_flag) }; + deblocking_filter_override_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let pps_deblocking_filter_disabled_flag: u32 = + unsafe { ::core::mem::transmute(pps_deblocking_filter_disabled_flag) }; + pps_deblocking_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let pps_scaling_list_data_present_flag: u32 = + unsafe { ::core::mem::transmute(pps_scaling_list_data_present_flag) }; + pps_scaling_list_data_present_flag as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let lists_modification_present_flag: u32 = + unsafe { ::core::mem::transmute(lists_modification_present_flag) }; + lists_modification_present_flag as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let slice_segment_header_extension_present_flag: u32 = + unsafe { ::core::mem::transmute(slice_segment_header_extension_present_flag) }; + slice_segment_header_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let pps_extension_present_flag: u32 = + unsafe { ::core::mem::transmute(pps_extension_present_flag) }; + pps_extension_present_flag as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let cross_component_prediction_enabled_flag: u32 = + unsafe { ::core::mem::transmute(cross_component_prediction_enabled_flag) }; + cross_component_prediction_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let chroma_qp_offset_list_enabled_flag: u32 = + unsafe { ::core::mem::transmute(chroma_qp_offset_list_enabled_flag) }; + chroma_qp_offset_list_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let pps_curr_pic_ref_enabled_flag: u32 = + unsafe { ::core::mem::transmute(pps_curr_pic_ref_enabled_flag) }; + pps_curr_pic_ref_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let residual_adaptive_colour_transform_enabled_flag: u32 = + unsafe { ::core::mem::transmute(residual_adaptive_colour_transform_enabled_flag) }; + residual_adaptive_colour_transform_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let pps_slice_act_qp_offsets_present_flag: u32 = + unsafe { ::core::mem::transmute(pps_slice_act_qp_offsets_present_flag) }; + pps_slice_act_qp_offsets_present_flag as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let pps_palette_predictor_initializers_present_flag: u32 = + unsafe { ::core::mem::transmute(pps_palette_predictor_initializers_present_flag) }; + pps_palette_predictor_initializers_present_flag as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let monochrome_palette_flag: u32 = + unsafe { ::core::mem::transmute(monochrome_palette_flag) }; + monochrome_palette_flag as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let pps_range_extension_flag: u32 = + unsafe { ::core::mem::transmute(pps_range_extension_flag) }; + pps_range_extension_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoH265PictureParameterSet { + pub flags: StdVideoH265PpsFlags, + pub pps_pic_parameter_set_id: u8, + pub pps_seq_parameter_set_id: u8, + pub sps_video_parameter_set_id: u8, + pub num_extra_slice_header_bits: u8, + pub num_ref_idx_l0_default_active_minus1: u8, + pub num_ref_idx_l1_default_active_minus1: u8, + pub init_qp_minus26: i8, + pub diff_cu_qp_delta_depth: u8, + pub pps_cb_qp_offset: i8, + pub pps_cr_qp_offset: i8, + pub pps_beta_offset_div2: i8, + pub pps_tc_offset_div2: i8, + pub log2_parallel_merge_level_minus2: u8, + pub log2_max_transform_skip_block_size_minus2: u8, + pub diff_cu_chroma_qp_offset_depth: u8, + pub chroma_qp_offset_list_len_minus1: u8, + pub cb_qp_offset_list: [i8; 6usize], + pub cr_qp_offset_list: [i8; 6usize], + pub log2_sao_offset_scale_luma: u8, + pub log2_sao_offset_scale_chroma: u8, + pub pps_act_y_qp_offset_plus5: i8, + pub pps_act_cb_qp_offset_plus5: i8, + pub pps_act_cr_qp_offset_plus3: i8, + pub pps_num_palette_predictor_initializers: u8, + pub luma_bit_depth_entry_minus8: u8, + pub chroma_bit_depth_entry_minus8: u8, + pub num_tile_columns_minus1: u8, + pub num_tile_rows_minus1: u8, + pub reserved1: u8, + pub reserved2: u8, + pub column_width_minus1: [u16; 19usize], + pub row_height_minus1: [u16; 21usize], + pub reserved3: u32, + pub pScalingLists: *const StdVideoH265ScalingLists, + pub pPredictorPaletteEntries: *const StdVideoH265PredictorPaletteEntries, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265PictureInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoDecodeH265PictureInfoFlags { + #[inline] + pub fn IrapPicFlag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_IrapPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn IdrPicFlag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_IdrPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn IsReference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_IsReference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn short_term_ref_pic_set_sps_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_short_term_ref_pic_set_sps_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + IrapPicFlag: u32, + IdrPicFlag: u32, + IsReference: u32, + short_term_ref_pic_set_sps_flag: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let IrapPicFlag: u32 = unsafe { ::core::mem::transmute(IrapPicFlag) }; + IrapPicFlag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let IdrPicFlag: u32 = unsafe { ::core::mem::transmute(IdrPicFlag) }; + IdrPicFlag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let IsReference: u32 = unsafe { ::core::mem::transmute(IsReference) }; + IsReference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let short_term_ref_pic_set_sps_flag: u32 = + unsafe { ::core::mem::transmute(short_term_ref_pic_set_sps_flag) }; + short_term_ref_pic_set_sps_flag as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265PictureInfo { + pub flags: StdVideoDecodeH265PictureInfoFlags, + pub sps_video_parameter_set_id: u8, + pub pps_seq_parameter_set_id: u8, + pub pps_pic_parameter_set_id: u8, + pub NumDeltaPocsOfRefRpsIdx: u8, + pub PicOrderCntVal: i32, + pub NumBitsForSTRefPicSetInSlice: u16, + pub reserved: u16, + pub RefPicSetStCurrBefore: [u8; 8usize], + pub RefPicSetStCurrAfter: [u8; 8usize], + pub RefPicSetLtCurr: [u8; 8usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265ReferenceInfoFlags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub __bindgen_padding_0: [u8; 3usize], +} +impl StdVideoDecodeH265ReferenceInfoFlags { + #[inline] + pub fn used_for_long_term_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_used_for_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn unused_for_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_unused_for_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + used_for_long_term_reference: u32, + unused_for_reference: u32, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let used_for_long_term_reference: u32 = + unsafe { ::core::mem::transmute(used_for_long_term_reference) }; + used_for_long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let unused_for_reference: u32 = unsafe { ::core::mem::transmute(unused_for_reference) }; + unused_for_reference as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoDecodeH265ReferenceInfo { + pub flags: StdVideoDecodeH265ReferenceInfoFlags, + pub PicOrderCntVal: i32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265WeightTableFlags { + pub luma_weight_l0_flag: u16, + pub chroma_weight_l0_flag: u16, + pub luma_weight_l1_flag: u16, + pub chroma_weight_l1_flag: u16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265WeightTable { + pub flags: StdVideoEncodeH265WeightTableFlags, + pub luma_log2_weight_denom: u8, + pub delta_chroma_log2_weight_denom: i8, + pub delta_luma_weight_l0: [i8; 15usize], + pub luma_offset_l0: [i8; 15usize], + pub delta_chroma_weight_l0: [[i8; 2usize]; 15usize], + pub delta_chroma_offset_l0: [[i8; 2usize]; 15usize], + pub delta_luma_weight_l1: [i8; 15usize], + pub luma_offset_l1: [i8; 15usize], + pub delta_chroma_weight_l1: [[i8; 2usize]; 15usize], + pub delta_chroma_offset_l1: [[i8; 2usize]; 15usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265SliceSegmentHeaderFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH265SliceSegmentHeaderFlags { + #[inline] + pub fn first_slice_segment_in_pic_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_first_slice_segment_in_pic_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn dependent_slice_segment_flag(&self) -> u32 { + unsafe { ::core::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 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_sao_luma_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_luma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_sao_chroma_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_sao_chroma_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn num_ref_idx_active_override_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_num_ref_idx_active_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn mvd_l1_zero_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_mvd_l1_zero_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn cabac_init_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_cabac_init_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn cu_chroma_qp_offset_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_cu_chroma_qp_offset_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn deblocking_filter_override_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_deblocking_filter_override_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_deblocking_filter_disabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_deblocking_filter_disabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn collocated_from_l0_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } + } + #[inline] + pub fn set_collocated_from_l0_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_loop_filter_across_slices_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_loop_filter_across_slices_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 20u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 20u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + first_slice_segment_in_pic_flag: u32, + dependent_slice_segment_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, + cu_chroma_qp_offset_enabled_flag: u32, + deblocking_filter_override_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 first_slice_segment_in_pic_flag: u32 = + unsafe { ::core::mem::transmute(first_slice_segment_in_pic_flag) }; + first_slice_segment_in_pic_flag as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let dependent_slice_segment_flag: u32 = + unsafe { ::core::mem::transmute(dependent_slice_segment_flag) }; + dependent_slice_segment_flag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let slice_sao_luma_flag: u32 = unsafe { ::core::mem::transmute(slice_sao_luma_flag) }; + slice_sao_luma_flag as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let slice_sao_chroma_flag: u32 = + unsafe { ::core::mem::transmute(slice_sao_chroma_flag) }; + slice_sao_chroma_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let num_ref_idx_active_override_flag: u32 = + unsafe { ::core::mem::transmute(num_ref_idx_active_override_flag) }; + num_ref_idx_active_override_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let mvd_l1_zero_flag: u32 = unsafe { ::core::mem::transmute(mvd_l1_zero_flag) }; + mvd_l1_zero_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let cabac_init_flag: u32 = unsafe { ::core::mem::transmute(cabac_init_flag) }; + cabac_init_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let cu_chroma_qp_offset_enabled_flag: u32 = + unsafe { ::core::mem::transmute(cu_chroma_qp_offset_enabled_flag) }; + cu_chroma_qp_offset_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let deblocking_filter_override_flag: u32 = + unsafe { ::core::mem::transmute(deblocking_filter_override_flag) }; + deblocking_filter_override_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let slice_deblocking_filter_disabled_flag: u32 = + unsafe { ::core::mem::transmute(slice_deblocking_filter_disabled_flag) }; + slice_deblocking_filter_disabled_flag as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let collocated_from_l0_flag: u32 = + unsafe { ::core::mem::transmute(collocated_from_l0_flag) }; + collocated_from_l0_flag as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let slice_loop_filter_across_slices_enabled_flag: u32 = + unsafe { ::core::mem::transmute(slice_loop_filter_across_slices_enabled_flag) }; + slice_loop_filter_across_slices_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(12usize, 20u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265SliceSegmentHeader { + pub flags: StdVideoEncodeH265SliceSegmentHeaderFlags, + pub slice_type: StdVideoH265SliceType, + pub slice_segment_address: u32, + pub collocated_ref_idx: u8, + pub MaxNumMergeCand: u8, + pub slice_cb_qp_offset: i8, + pub slice_cr_qp_offset: i8, + pub slice_beta_offset_div2: i8, + pub slice_tc_offset_div2: i8, + pub slice_act_y_qp_offset: i8, + pub slice_act_cb_qp_offset: i8, + pub slice_act_cr_qp_offset: i8, + pub slice_qp_delta: i8, + pub reserved1: u16, + pub pWeightTable: *const StdVideoEncodeH265WeightTable, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265ReferenceListsInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH265ReferenceListsInfoFlags { + #[inline] + pub fn ref_pic_list_modification_flag_l0(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_flag_l0(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn ref_pic_list_modification_flag_l1(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_ref_pic_list_modification_flag_l1(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + ref_pic_list_modification_flag_l0: u32, + ref_pic_list_modification_flag_l1: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let ref_pic_list_modification_flag_l0: u32 = + unsafe { ::core::mem::transmute(ref_pic_list_modification_flag_l0) }; + ref_pic_list_modification_flag_l0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let ref_pic_list_modification_flag_l1: u32 = + unsafe { ::core::mem::transmute(ref_pic_list_modification_flag_l1) }; + ref_pic_list_modification_flag_l1 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265ReferenceListsInfo { + pub flags: StdVideoEncodeH265ReferenceListsInfoFlags, + pub num_ref_idx_l0_active_minus1: u8, + pub num_ref_idx_l1_active_minus1: u8, + pub RefPicList0: [u8; 15usize], + pub RefPicList1: [u8; 15usize], + pub list_entry_l0: [u8; 15usize], + pub list_entry_l1: [u8; 15usize], +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265PictureInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH265PictureInfoFlags { + #[inline] + pub fn is_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn IrapPicFlag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_IrapPicFlag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn used_for_long_term_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_used_for_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn discardable_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_discardable_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn cross_layer_bla_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_cross_layer_bla_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn pic_output_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_pic_output_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn no_output_of_prior_pics_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_no_output_of_prior_pics_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn short_term_ref_pic_set_sps_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_short_term_ref_pic_set_sps_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn slice_temporal_mvp_enabled_flag(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_slice_temporal_mvp_enabled_flag(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 23u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + is_reference: u32, + IrapPicFlag: u32, + used_for_long_term_reference: u32, + discardable_flag: u32, + cross_layer_bla_flag: u32, + pic_output_flag: u32, + no_output_of_prior_pics_flag: u32, + short_term_ref_pic_set_sps_flag: u32, + slice_temporal_mvp_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 is_reference: u32 = unsafe { ::core::mem::transmute(is_reference) }; + is_reference as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let IrapPicFlag: u32 = unsafe { ::core::mem::transmute(IrapPicFlag) }; + IrapPicFlag as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let used_for_long_term_reference: u32 = + unsafe { ::core::mem::transmute(used_for_long_term_reference) }; + used_for_long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let discardable_flag: u32 = unsafe { ::core::mem::transmute(discardable_flag) }; + discardable_flag as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cross_layer_bla_flag: u32 = unsafe { ::core::mem::transmute(cross_layer_bla_flag) }; + cross_layer_bla_flag as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let pic_output_flag: u32 = unsafe { ::core::mem::transmute(pic_output_flag) }; + pic_output_flag as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let no_output_of_prior_pics_flag: u32 = + unsafe { ::core::mem::transmute(no_output_of_prior_pics_flag) }; + no_output_of_prior_pics_flag as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let short_term_ref_pic_set_sps_flag: u32 = + unsafe { ::core::mem::transmute(short_term_ref_pic_set_sps_flag) }; + short_term_ref_pic_set_sps_flag as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let slice_temporal_mvp_enabled_flag: u32 = + unsafe { ::core::mem::transmute(slice_temporal_mvp_enabled_flag) }; + slice_temporal_mvp_enabled_flag as u64 + }); + __bindgen_bitfield_unit.set(9usize, 23u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265LongTermRefPics { + pub num_long_term_sps: u8, + pub num_long_term_pics: u8, + pub lt_idx_sps: [u8; 32usize], + pub poc_lsb_lt: [u8; 16usize], + pub used_by_curr_pic_lt_flag: u16, + pub delta_poc_msb_present_flag: [u8; 48usize], + pub delta_poc_msb_cycle_lt: [u8; 48usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265PictureInfo { + pub flags: StdVideoEncodeH265PictureInfoFlags, + pub pic_type: StdVideoH265PictureType, + pub sps_video_parameter_set_id: u8, + pub pps_seq_parameter_set_id: u8, + pub pps_pic_parameter_set_id: u8, + pub short_term_ref_pic_set_idx: u8, + pub PicOrderCntVal: i32, + pub TemporalId: u8, + pub reserved1: [u8; 7usize], + pub pRefLists: *const StdVideoEncodeH265ReferenceListsInfo, + pub pShortTermRefPicSet: *const StdVideoH265ShortTermRefPicSet, + pub pLongTermRefPics: *const StdVideoEncodeH265LongTermRefPics, +} +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265ReferenceInfoFlags { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +impl StdVideoEncodeH265ReferenceInfoFlags { + #[inline] + pub fn used_for_long_term_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_used_for_long_term_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn unused_for_reference(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_unused_for_reference(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + used_for_long_term_reference: u32, + unused_for_reference: u32, + reserved: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let used_for_long_term_reference: u32 = + unsafe { ::core::mem::transmute(used_for_long_term_reference) }; + used_for_long_term_reference as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let unused_for_reference: u32 = unsafe { ::core::mem::transmute(unused_for_reference) }; + unused_for_reference as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct StdVideoEncodeH265ReferenceInfo { + pub flags: StdVideoEncodeH265ReferenceInfoFlags, + pub pic_type: StdVideoH265PictureType, + pub PicOrderCntVal: i32, + pub TemporalId: u8, +} diff --git a/vulkanalia/src/vk/builders.rs b/vulkanalia/src/vk/builders.rs index e406b9ab..105e3e73 100644 --- a/vulkanalia/src/vk/builders.rs +++ b/vulkanalia/src/vk/builders.rs @@ -4643,6 +4643,82 @@ unsafe impl Cast for BindVertexBufferIndirectCommandNVBuilder { } } +unsafe impl Cast for BindVideoSessionMemoryInfoKHR { + type Target = BindVideoSessionMemoryInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for BindVideoSessionMemoryInfoKHR { + type Builder = BindVideoSessionMemoryInfoKHRBuilder; +} + +/// A builder for a [`BindVideoSessionMemoryInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct BindVideoSessionMemoryInfoKHRBuilder { + value: BindVideoSessionMemoryInfoKHR, +} + +impl BindVideoSessionMemoryInfoKHRBuilder { + #[inline] + pub fn memory_bind_index(mut self, memory_bind_index: u32) -> Self { + self.value.memory_bind_index = memory_bind_index; + self + } + + #[inline] + pub fn memory(mut self, memory: DeviceMemory) -> Self { + self.value.memory = memory; + self + } + + #[inline] + pub fn memory_offset(mut self, memory_offset: DeviceSize) -> Self { + self.value.memory_offset = memory_offset; + self + } + + #[inline] + pub fn memory_size(mut self, memory_size: DeviceSize) -> Self { + self.value.memory_size = memory_size; + self + } + + #[inline] + pub fn build(self) -> BindVideoSessionMemoryInfoKHR { + self.value + } +} + +impl ops::Deref for BindVideoSessionMemoryInfoKHRBuilder { + type Target = BindVideoSessionMemoryInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for BindVideoSessionMemoryInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for BindVideoSessionMemoryInfoKHRBuilder { + type Target = BindVideoSessionMemoryInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for BlitImageCubicWeightsInfoQCOM { type Target = BlitImageCubicWeightsInfoQCOM; @@ -5489,6 +5565,7 @@ unsafe impl ExtendsBufferCreateInfo for BufferUsageFlags2CreateInfoKHR {} unsafe impl ExtendsBufferCreateInfo for DedicatedAllocationBufferCreateInfoNV {} unsafe impl ExtendsBufferCreateInfo for ExternalMemoryBufferCreateInfo {} unsafe impl ExtendsBufferCreateInfo for OpaqueCaptureDescriptorDataCreateInfoEXT {} +unsafe impl ExtendsBufferCreateInfo for VideoProfileListInfoKHR {} unsafe impl Cast for BufferCreateInfo { type Target = BufferCreateInfo; @@ -22553,6 +22630,7 @@ unsafe impl ExtendsImageCreateInfo for ImportMetalIOSurfaceInfoEXT {} unsafe impl ExtendsImageCreateInfo for ImportMetalTextureInfoEXT {} unsafe impl ExtendsImageCreateInfo for OpaqueCaptureDescriptorDataCreateInfoEXT {} unsafe impl ExtendsImageCreateInfo for OpticalFlowImageFormatInfoNV {} +unsafe impl ExtendsImageCreateInfo for VideoProfileListInfoKHR {} unsafe impl Cast for ImageCreateInfo { type Target = ImageCreateInfo; @@ -40851,6 +40929,7 @@ unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for OpticalFlowImageFormatInfo unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for PhysicalDeviceExternalImageFormatInfo {} unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for PhysicalDeviceImageDrmFormatModifierInfoEXT {} unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for PhysicalDeviceImageViewImageFormatInfoEXT {} +unsafe impl ExtendsPhysicalDeviceImageFormatInfo2 for VideoProfileListInfoKHR {} unsafe impl Cast for PhysicalDeviceImageFormatInfo2 { type Target = PhysicalDeviceImageFormatInfo2; @@ -53154,6 +53233,146 @@ unsafe impl Cast for PhysicalDeviceVertexInputDynamicStateFeaturesEXTBuilder { } } +unsafe impl Cast for PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + type Target = PhysicalDeviceVideoEncodeQualityLevelInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + type Builder = PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b>; +} + +/// A builder for a [`PhysicalDeviceVideoEncodeQualityLevelInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b> { + value: PhysicalDeviceVideoEncodeQualityLevelInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b> { + #[inline] + pub fn video_profile( + mut self, + video_profile: &'b impl Cast, + ) -> Self { + self.value.video_profile = video_profile.as_ref(); + self + } + + #[inline] + pub fn quality_level(mut self, quality_level: u32) -> Self { + self.value.quality_level = quality_level; + self + } + + #[inline] + pub fn build(self) -> PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b> { + type Target = PhysicalDeviceVideoEncodeQualityLevelInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PhysicalDeviceVideoEncodeQualityLevelInfoKHRBuilder<'b> { + type Target = PhysicalDeviceVideoEncodeQualityLevelInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`PhysicalDeviceVideoFormatInfoKHR`]. +pub unsafe trait ExtendsPhysicalDeviceVideoFormatInfoKHR: fmt::Debug {} +unsafe impl ExtendsPhysicalDeviceVideoFormatInfoKHR for VideoProfileListInfoKHR {} + +unsafe impl Cast for PhysicalDeviceVideoFormatInfoKHR { + type Target = PhysicalDeviceVideoFormatInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for PhysicalDeviceVideoFormatInfoKHR { + type Builder = PhysicalDeviceVideoFormatInfoKHRBuilder<'b>; +} + +/// A builder for a [`PhysicalDeviceVideoFormatInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct PhysicalDeviceVideoFormatInfoKHRBuilder<'b> { + value: PhysicalDeviceVideoFormatInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> PhysicalDeviceVideoFormatInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsPhysicalDeviceVideoFormatInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn image_usage(mut self, image_usage: ImageUsageFlags) -> Self { + self.value.image_usage = image_usage; + self + } + + #[inline] + pub fn build(self) -> PhysicalDeviceVideoFormatInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for PhysicalDeviceVideoFormatInfoKHRBuilder<'b> { + type Target = PhysicalDeviceVideoFormatInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for PhysicalDeviceVideoFormatInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for PhysicalDeviceVideoFormatInfoKHRBuilder<'b> { + type Target = PhysicalDeviceVideoFormatInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for PhysicalDeviceVulkan11Features { type Target = PhysicalDeviceVulkan11Features; @@ -60373,6 +60592,14 @@ unsafe impl<'b> Cast for QueryLowLatencySupportNVBuilder<'b> { pub unsafe trait ExtendsQueryPoolCreateInfo: fmt::Debug {} unsafe impl ExtendsQueryPoolCreateInfo for QueryPoolPerformanceCreateInfoKHR {} unsafe impl ExtendsQueryPoolCreateInfo for QueryPoolPerformanceQueryCreateInfoINTEL {} +unsafe impl ExtendsQueryPoolCreateInfo for QueryPoolVideoEncodeFeedbackCreateInfoKHR {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoDecodeH264ProfileInfoKHR {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoDecodeH265ProfileInfoKHR {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoDecodeUsageInfoKHR {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoEncodeH264ProfileInfoEXT {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoEncodeH265ProfileInfoEXT {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoEncodeUsageInfoKHR {} +unsafe impl ExtendsQueryPoolCreateInfo for VideoProfileInfoKHR {} unsafe impl Cast for QueryPoolCreateInfo { type Target = QueryPoolCreateInfo; @@ -60587,6 +60814,67 @@ unsafe impl Cast for QueryPoolPerformanceQueryCreateInfoINTELBuilder { } } +unsafe impl Cast for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + type Target = QueryPoolVideoEncodeFeedbackCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + type Builder = QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder; +} + +/// A builder for a [`QueryPoolVideoEncodeFeedbackCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + value: QueryPoolVideoEncodeFeedbackCreateInfoKHR, +} + +impl QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + #[inline] + pub fn encode_feedback_flags( + mut self, + encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, + ) -> Self { + self.value.encode_feedback_flags = encode_feedback_flags; + self + } + + #[inline] + pub fn build(self) -> QueryPoolVideoEncodeFeedbackCreateInfoKHR { + self.value + } +} + +impl ops::Deref for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + type Target = QueryPoolVideoEncodeFeedbackCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for QueryPoolVideoEncodeFeedbackCreateInfoKHRBuilder { + type Target = QueryPoolVideoEncodeFeedbackCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for QueueFamilyCheckpointProperties2NV { type Target = QueueFamilyCheckpointProperties2NV; @@ -60860,6 +61148,8 @@ pub unsafe trait ExtendsQueueFamilyProperties2: fmt::Debug {} unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyCheckpointProperties2NV {} unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyCheckpointPropertiesNV {} unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyGlobalPriorityPropertiesKHR {} +unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyQueryResultStatusPropertiesKHR {} +unsafe impl ExtendsQueueFamilyProperties2 for QueueFamilyVideoPropertiesKHR {} unsafe impl Cast for QueueFamilyProperties2 { type Target = QueueFamilyProperties2; @@ -60932,14 +61222,8 @@ unsafe impl<'b> Cast for QueueFamilyProperties2Builder<'b> { } } -/// A Vulkan struct that can be used to extend a [`RayTracingPipelineCreateInfoKHR`]. -pub unsafe trait ExtendsRayTracingPipelineCreateInfoKHR: fmt::Debug {} -unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreateFlags2CreateInfoKHR {} -unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreationFeedbackCreateInfo {} -unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineRobustnessCreateInfoEXT {} - -unsafe impl Cast for RayTracingPipelineCreateInfoKHR { - type Target = RayTracingPipelineCreateInfoKHR; +unsafe impl Cast for QueueFamilyQueryResultStatusPropertiesKHR { + type Target = QueueFamilyQueryResultStatusPropertiesKHR; #[inline] fn into(self) -> Self::Target { @@ -60947,116 +61231,93 @@ unsafe impl Cast for RayTracingPipelineCreateInfoKHR { } } -impl<'b> HasBuilder<'b> for RayTracingPipelineCreateInfoKHR { - type Builder = RayTracingPipelineCreateInfoKHRBuilder<'b>; +impl HasBuilder<'static> for QueueFamilyQueryResultStatusPropertiesKHR { + type Builder = QueueFamilyQueryResultStatusPropertiesKHRBuilder; } -/// A builder for a [`RayTracingPipelineCreateInfoKHR`]. +/// A builder for a [`QueueFamilyQueryResultStatusPropertiesKHR`]. #[repr(transparent)] #[derive(Copy, Clone, Debug, Default)] -pub struct RayTracingPipelineCreateInfoKHRBuilder<'b> { - value: RayTracingPipelineCreateInfoKHR, - _marker: PhantomData<&'b ()>, +pub struct QueueFamilyQueryResultStatusPropertiesKHRBuilder { + value: QueueFamilyQueryResultStatusPropertiesKHR, } -impl<'b> RayTracingPipelineCreateInfoKHRBuilder<'b> { +impl QueueFamilyQueryResultStatusPropertiesKHRBuilder { #[inline] - pub fn push_next(mut self, next: &'b mut impl Cast) -> Self - where - T: ExtendsRayTracingPipelineCreateInfoKHR, - { - self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + pub fn query_result_status_support(mut self, query_result_status_support: bool) -> Self { + self.value.query_result_status_support = query_result_status_support as Bool32; self } #[inline] - pub fn flags(mut self, flags: PipelineCreateFlags) -> Self { - self.value.flags = flags; - self + pub fn build(self) -> QueueFamilyQueryResultStatusPropertiesKHR { + self.value } +} - #[inline] - pub fn stages( - mut self, - stages: &'b [impl Cast], - ) -> Self { - self.value.stage_count = stages.len() as u32; - self.value.stages = stages.as_ptr().cast(); - self - } +impl ops::Deref for QueueFamilyQueryResultStatusPropertiesKHRBuilder { + type Target = QueueFamilyQueryResultStatusPropertiesKHR; #[inline] - pub fn groups( - mut self, - groups: &'b [impl Cast], - ) -> Self { - self.value.group_count = groups.len() as u32; - self.value.groups = groups.as_ptr().cast(); - self + fn deref(&self) -> &Self::Target { + &self.value } +} +impl ops::DerefMut for QueueFamilyQueryResultStatusPropertiesKHRBuilder { #[inline] - pub fn max_pipeline_ray_recursion_depth( - mut self, - max_pipeline_ray_recursion_depth: u32, - ) -> Self { - self.value.max_pipeline_ray_recursion_depth = max_pipeline_ray_recursion_depth; - self + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value } +} - #[inline] - pub fn library_info( - mut self, - library_info: &'b impl Cast, - ) -> Self { - self.value.library_info = library_info.as_ref(); - self - } +unsafe impl Cast for QueueFamilyQueryResultStatusPropertiesKHRBuilder { + type Target = QueueFamilyQueryResultStatusPropertiesKHR; #[inline] - pub fn library_interface( - mut self, - library_interface: &'b impl Cast, - ) -> Self { - self.value.library_interface = library_interface.as_ref(); - self + fn into(self) -> Self::Target { + self.value } +} - #[inline] - pub fn dynamic_state( - mut self, - dynamic_state: &'b impl Cast, - ) -> Self { - self.value.dynamic_state = dynamic_state.as_ref(); - self - } +unsafe impl Cast for QueueFamilyVideoPropertiesKHR { + type Target = QueueFamilyVideoPropertiesKHR; #[inline] - pub fn layout(mut self, layout: PipelineLayout) -> Self { - self.value.layout = layout; + fn into(self) -> Self::Target { self } +} - #[inline] - pub fn base_pipeline_handle(mut self, base_pipeline_handle: Pipeline) -> Self { - self.value.base_pipeline_handle = base_pipeline_handle; - self - } +impl HasBuilder<'static> for QueueFamilyVideoPropertiesKHR { + type Builder = QueueFamilyVideoPropertiesKHRBuilder; +} +/// A builder for a [`QueueFamilyVideoPropertiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct QueueFamilyVideoPropertiesKHRBuilder { + value: QueueFamilyVideoPropertiesKHR, +} + +impl QueueFamilyVideoPropertiesKHRBuilder { #[inline] - pub fn base_pipeline_index(mut self, base_pipeline_index: i32) -> Self { - self.value.base_pipeline_index = base_pipeline_index; + pub fn video_codec_operations( + mut self, + video_codec_operations: VideoCodecOperationFlagsKHR, + ) -> Self { + self.value.video_codec_operations = video_codec_operations; self } #[inline] - pub fn build(self) -> RayTracingPipelineCreateInfoKHR { + pub fn build(self) -> QueueFamilyVideoPropertiesKHR { self.value } } -impl<'b> ops::Deref for RayTracingPipelineCreateInfoKHRBuilder<'b> { - type Target = RayTracingPipelineCreateInfoKHR; +impl ops::Deref for QueueFamilyVideoPropertiesKHRBuilder { + type Target = QueueFamilyVideoPropertiesKHR; #[inline] fn deref(&self) -> &Self::Target { @@ -61064,15 +61325,15 @@ impl<'b> ops::Deref for RayTracingPipelineCreateInfoKHRBuilder<'b> { } } -impl<'b> ops::DerefMut for RayTracingPipelineCreateInfoKHRBuilder<'b> { +impl ops::DerefMut for QueueFamilyVideoPropertiesKHRBuilder { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.value } } -unsafe impl<'b> Cast for RayTracingPipelineCreateInfoKHRBuilder<'b> { - type Target = RayTracingPipelineCreateInfoKHR; +unsafe impl Cast for QueueFamilyVideoPropertiesKHRBuilder { + type Target = QueueFamilyVideoPropertiesKHR; #[inline] fn into(self) -> Self::Target { @@ -61080,13 +61341,14 @@ unsafe impl<'b> Cast for RayTracingPipelineCreateInfoKHRBuilder<'b> { } } -/// A Vulkan struct that can be used to extend a [`RayTracingPipelineCreateInfoNV`]. -pub unsafe trait ExtendsRayTracingPipelineCreateInfoNV: fmt::Debug {} -unsafe impl ExtendsRayTracingPipelineCreateInfoNV for PipelineCreateFlags2CreateInfoKHR {} -unsafe impl ExtendsRayTracingPipelineCreateInfoNV for PipelineCreationFeedbackCreateInfo {} +/// A Vulkan struct that can be used to extend a [`RayTracingPipelineCreateInfoKHR`]. +pub unsafe trait ExtendsRayTracingPipelineCreateInfoKHR: fmt::Debug {} +unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreateFlags2CreateInfoKHR {} +unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineCreationFeedbackCreateInfo {} +unsafe impl ExtendsRayTracingPipelineCreateInfoKHR for PipelineRobustnessCreateInfoEXT {} -unsafe impl Cast for RayTracingPipelineCreateInfoNV { - type Target = RayTracingPipelineCreateInfoNV; +unsafe impl Cast for RayTracingPipelineCreateInfoKHR { + type Target = RayTracingPipelineCreateInfoKHR; #[inline] fn into(self) -> Self::Target { @@ -61094,23 +61356,170 @@ unsafe impl Cast for RayTracingPipelineCreateInfoNV { } } -impl<'b> HasBuilder<'b> for RayTracingPipelineCreateInfoNV { - type Builder = RayTracingPipelineCreateInfoNVBuilder<'b>; +impl<'b> HasBuilder<'b> for RayTracingPipelineCreateInfoKHR { + type Builder = RayTracingPipelineCreateInfoKHRBuilder<'b>; } -/// A builder for a [`RayTracingPipelineCreateInfoNV`]. +/// A builder for a [`RayTracingPipelineCreateInfoKHR`]. #[repr(transparent)] #[derive(Copy, Clone, Debug, Default)] -pub struct RayTracingPipelineCreateInfoNVBuilder<'b> { - value: RayTracingPipelineCreateInfoNV, +pub struct RayTracingPipelineCreateInfoKHRBuilder<'b> { + value: RayTracingPipelineCreateInfoKHR, _marker: PhantomData<&'b ()>, } -impl<'b> RayTracingPipelineCreateInfoNVBuilder<'b> { +impl<'b> RayTracingPipelineCreateInfoKHRBuilder<'b> { #[inline] pub fn push_next(mut self, next: &'b mut impl Cast) -> Self where - T: ExtendsRayTracingPipelineCreateInfoNV, + T: ExtendsRayTracingPipelineCreateInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: PipelineCreateFlags) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn stages( + mut self, + stages: &'b [impl Cast], + ) -> Self { + self.value.stage_count = stages.len() as u32; + self.value.stages = stages.as_ptr().cast(); + self + } + + #[inline] + pub fn groups( + mut self, + groups: &'b [impl Cast], + ) -> Self { + self.value.group_count = groups.len() as u32; + self.value.groups = groups.as_ptr().cast(); + self + } + + #[inline] + pub fn max_pipeline_ray_recursion_depth( + mut self, + max_pipeline_ray_recursion_depth: u32, + ) -> Self { + self.value.max_pipeline_ray_recursion_depth = max_pipeline_ray_recursion_depth; + self + } + + #[inline] + pub fn library_info( + mut self, + library_info: &'b impl Cast, + ) -> Self { + self.value.library_info = library_info.as_ref(); + self + } + + #[inline] + pub fn library_interface( + mut self, + library_interface: &'b impl Cast, + ) -> Self { + self.value.library_interface = library_interface.as_ref(); + self + } + + #[inline] + pub fn dynamic_state( + mut self, + dynamic_state: &'b impl Cast, + ) -> Self { + self.value.dynamic_state = dynamic_state.as_ref(); + self + } + + #[inline] + pub fn layout(mut self, layout: PipelineLayout) -> Self { + self.value.layout = layout; + self + } + + #[inline] + pub fn base_pipeline_handle(mut self, base_pipeline_handle: Pipeline) -> Self { + self.value.base_pipeline_handle = base_pipeline_handle; + self + } + + #[inline] + pub fn base_pipeline_index(mut self, base_pipeline_index: i32) -> Self { + self.value.base_pipeline_index = base_pipeline_index; + self + } + + #[inline] + pub fn build(self) -> RayTracingPipelineCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for RayTracingPipelineCreateInfoKHRBuilder<'b> { + type Target = RayTracingPipelineCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for RayTracingPipelineCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for RayTracingPipelineCreateInfoKHRBuilder<'b> { + type Target = RayTracingPipelineCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`RayTracingPipelineCreateInfoNV`]. +pub unsafe trait ExtendsRayTracingPipelineCreateInfoNV: fmt::Debug {} +unsafe impl ExtendsRayTracingPipelineCreateInfoNV for PipelineCreateFlags2CreateInfoKHR {} +unsafe impl ExtendsRayTracingPipelineCreateInfoNV for PipelineCreationFeedbackCreateInfo {} + +unsafe impl Cast for RayTracingPipelineCreateInfoNV { + type Target = RayTracingPipelineCreateInfoNV; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for RayTracingPipelineCreateInfoNV { + type Builder = RayTracingPipelineCreateInfoNVBuilder<'b>; +} + +/// A builder for a [`RayTracingPipelineCreateInfoNV`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct RayTracingPipelineCreateInfoNVBuilder<'b> { + value: RayTracingPipelineCreateInfoNV, + _marker: PhantomData<&'b ()>, +} + +impl<'b> RayTracingPipelineCreateInfoNVBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsRayTracingPipelineCreateInfoNV, { self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); self @@ -71491,6 +71900,5613 @@ unsafe impl<'b> Cast for ViSurfaceCreateInfoNNBuilder<'b> { } } +/// A Vulkan struct that can be used to extend a [`VideoBeginCodingInfoKHR`]. +pub unsafe trait ExtendsVideoBeginCodingInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoBeginCodingInfoKHR for VideoEncodeH264GopRemainingFrameInfoEXT {} +unsafe impl ExtendsVideoBeginCodingInfoKHR for VideoEncodeH264RateControlInfoEXT {} +unsafe impl ExtendsVideoBeginCodingInfoKHR for VideoEncodeH265GopRemainingFrameInfoEXT {} +unsafe impl ExtendsVideoBeginCodingInfoKHR for VideoEncodeH265RateControlInfoEXT {} +unsafe impl ExtendsVideoBeginCodingInfoKHR for VideoEncodeRateControlInfoKHR {} + +unsafe impl Cast for VideoBeginCodingInfoKHR { + type Target = VideoBeginCodingInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoBeginCodingInfoKHR { + type Builder = VideoBeginCodingInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoBeginCodingInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoBeginCodingInfoKHRBuilder<'b> { + value: VideoBeginCodingInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoBeginCodingInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoBeginCodingInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoBeginCodingFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn video_session(mut self, video_session: VideoSessionKHR) -> Self { + self.value.video_session = video_session; + self + } + + #[inline] + pub fn video_session_parameters( + mut self, + video_session_parameters: VideoSessionParametersKHR, + ) -> Self { + self.value.video_session_parameters = video_session_parameters; + self + } + + #[inline] + pub fn reference_slots( + mut self, + reference_slots: &'b [impl Cast], + ) -> Self { + self.value.reference_slot_count = reference_slots.len() as u32; + self.value.reference_slots = reference_slots.as_ptr().cast(); + self + } + + #[inline] + pub fn build(self) -> VideoBeginCodingInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoBeginCodingInfoKHRBuilder<'b> { + type Target = VideoBeginCodingInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoBeginCodingInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoBeginCodingInfoKHRBuilder<'b> { + type Target = VideoBeginCodingInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoCapabilitiesKHR`]. +pub unsafe trait ExtendsVideoCapabilitiesKHR: fmt::Debug {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeCapabilitiesKHR {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH264CapabilitiesKHR {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoDecodeH265CapabilitiesKHR {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoEncodeCapabilitiesKHR {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoEncodeH264CapabilitiesEXT {} +unsafe impl ExtendsVideoCapabilitiesKHR for VideoEncodeH265CapabilitiesEXT {} + +unsafe impl Cast for VideoCapabilitiesKHR { + type Target = VideoCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoCapabilitiesKHR { + type Builder = VideoCapabilitiesKHRBuilder<'b>; +} + +/// A builder for a [`VideoCapabilitiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoCapabilitiesKHRBuilder<'b> { + value: VideoCapabilitiesKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoCapabilitiesKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoCapabilitiesKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoCapabilityFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn min_bitstream_buffer_offset_alignment( + mut self, + min_bitstream_buffer_offset_alignment: DeviceSize, + ) -> Self { + self.value.min_bitstream_buffer_offset_alignment = min_bitstream_buffer_offset_alignment; + self + } + + #[inline] + pub fn min_bitstream_buffer_size_alignment( + mut self, + min_bitstream_buffer_size_alignment: DeviceSize, + ) -> Self { + self.value.min_bitstream_buffer_size_alignment = min_bitstream_buffer_size_alignment; + self + } + + #[inline] + pub fn picture_access_granularity( + mut self, + picture_access_granularity: impl Cast, + ) -> Self { + self.value.picture_access_granularity = picture_access_granularity.into(); + self + } + + #[inline] + pub fn min_coded_extent(mut self, min_coded_extent: impl Cast) -> Self { + self.value.min_coded_extent = min_coded_extent.into(); + self + } + + #[inline] + pub fn max_coded_extent(mut self, max_coded_extent: impl Cast) -> Self { + self.value.max_coded_extent = max_coded_extent.into(); + self + } + + #[inline] + pub fn max_dpb_slots(mut self, max_dpb_slots: u32) -> Self { + self.value.max_dpb_slots = max_dpb_slots; + self + } + + #[inline] + pub fn max_active_reference_pictures(mut self, max_active_reference_pictures: u32) -> Self { + self.value.max_active_reference_pictures = max_active_reference_pictures; + self + } + + #[inline] + pub fn std_header_version( + mut self, + std_header_version: impl Cast, + ) -> Self { + self.value.std_header_version = std_header_version.into(); + self + } + + #[inline] + pub fn build(self) -> VideoCapabilitiesKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoCapabilitiesKHRBuilder<'b> { + type Target = VideoCapabilitiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoCapabilitiesKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoCapabilitiesKHRBuilder<'b> { + type Target = VideoCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoCodingControlInfoKHR`]. +pub unsafe trait ExtendsVideoCodingControlInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeH264RateControlInfoEXT {} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeH265RateControlInfoEXT {} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeQualityLevelInfoKHR {} +unsafe impl ExtendsVideoCodingControlInfoKHR for VideoEncodeRateControlInfoKHR {} + +unsafe impl Cast for VideoCodingControlInfoKHR { + type Target = VideoCodingControlInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoCodingControlInfoKHR { + type Builder = VideoCodingControlInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoCodingControlInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoCodingControlInfoKHRBuilder<'b> { + value: VideoCodingControlInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoCodingControlInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoCodingControlInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoCodingControlFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn build(self) -> VideoCodingControlInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoCodingControlInfoKHRBuilder<'b> { + type Target = VideoCodingControlInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoCodingControlInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoCodingControlInfoKHRBuilder<'b> { + type Target = VideoCodingControlInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeCapabilitiesKHR { + type Target = VideoDecodeCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeCapabilitiesKHR { + type Builder = VideoDecodeCapabilitiesKHRBuilder; +} + +/// A builder for a [`VideoDecodeCapabilitiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeCapabilitiesKHRBuilder { + value: VideoDecodeCapabilitiesKHR, +} + +impl VideoDecodeCapabilitiesKHRBuilder { + #[inline] + pub fn flags(mut self, flags: VideoDecodeCapabilityFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeCapabilitiesKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeCapabilitiesKHRBuilder { + type Target = VideoDecodeCapabilitiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeCapabilitiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeCapabilitiesKHRBuilder { + type Target = VideoDecodeCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264CapabilitiesKHR { + type Target = VideoDecodeH264CapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeH264CapabilitiesKHR { + type Builder = VideoDecodeH264CapabilitiesKHRBuilder; +} + +/// A builder for a [`VideoDecodeH264CapabilitiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264CapabilitiesKHRBuilder { + value: VideoDecodeH264CapabilitiesKHR, +} + +impl VideoDecodeH264CapabilitiesKHRBuilder { + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH264LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn field_offset_granularity( + mut self, + field_offset_granularity: impl Cast, + ) -> Self { + self.value.field_offset_granularity = field_offset_granularity.into(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264CapabilitiesKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeH264CapabilitiesKHRBuilder { + type Target = VideoDecodeH264CapabilitiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeH264CapabilitiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeH264CapabilitiesKHRBuilder { + type Target = VideoDecodeH264CapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264DpbSlotInfoKHR { + type Target = VideoDecodeH264DpbSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH264DpbSlotInfoKHR { + type Builder = VideoDecodeH264DpbSlotInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH264DpbSlotInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264DpbSlotInfoKHRBuilder<'b> { + value: VideoDecodeH264DpbSlotInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH264DpbSlotInfoKHRBuilder<'b> { + #[inline] + pub fn std_reference_info( + mut self, + std_reference_info: &'b video::StdVideoDecodeH264ReferenceInfo, + ) -> Self { + self.value.std_reference_info = + std_reference_info as *const video::StdVideoDecodeH264ReferenceInfo; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264DpbSlotInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH264DpbSlotInfoKHRBuilder<'b> { + type Target = VideoDecodeH264DpbSlotInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH264DpbSlotInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH264DpbSlotInfoKHRBuilder<'b> { + type Target = VideoDecodeH264DpbSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264PictureInfoKHR { + type Target = VideoDecodeH264PictureInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH264PictureInfoKHR { + type Builder = VideoDecodeH264PictureInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH264PictureInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264PictureInfoKHRBuilder<'b> { + value: VideoDecodeH264PictureInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH264PictureInfoKHRBuilder<'b> { + #[inline] + pub fn std_picture_info( + mut self, + std_picture_info: &'b video::StdVideoDecodeH264PictureInfo, + ) -> Self { + self.value.std_picture_info = + std_picture_info as *const video::StdVideoDecodeH264PictureInfo; + self + } + + #[inline] + pub fn slice_offsets(mut self, slice_offsets: &'b [u32]) -> Self { + self.value.slice_count = slice_offsets.len() as u32; + self.value.slice_offsets = slice_offsets.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264PictureInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH264PictureInfoKHRBuilder<'b> { + type Target = VideoDecodeH264PictureInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH264PictureInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH264PictureInfoKHRBuilder<'b> { + type Target = VideoDecodeH264PictureInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264ProfileInfoKHR { + type Target = VideoDecodeH264ProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeH264ProfileInfoKHR { + type Builder = VideoDecodeH264ProfileInfoKHRBuilder; +} + +/// A builder for a [`VideoDecodeH264ProfileInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264ProfileInfoKHRBuilder { + value: VideoDecodeH264ProfileInfoKHR, +} + +impl VideoDecodeH264ProfileInfoKHRBuilder { + #[inline] + pub fn std_profile_idc(mut self, std_profile_idc: video::StdVideoH264ProfileIdc) -> Self { + self.value.std_profile_idc = std_profile_idc; + self + } + + #[inline] + pub fn picture_layout(mut self, picture_layout: VideoDecodeH264PictureLayoutFlagsKHR) -> Self { + self.value.picture_layout = picture_layout; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264ProfileInfoKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeH264ProfileInfoKHRBuilder { + type Target = VideoDecodeH264ProfileInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeH264ProfileInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeH264ProfileInfoKHRBuilder { + type Target = VideoDecodeH264ProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264SessionParametersAddInfoKHR { + type Target = VideoDecodeH264SessionParametersAddInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH264SessionParametersAddInfoKHR { + type Builder = VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH264SessionParametersAddInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b> { + value: VideoDecodeH264SessionParametersAddInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b> { + #[inline] + pub fn std_sp_ss(mut self, std_sp_ss: &'b [video::StdVideoH264SequenceParameterSet]) -> Self { + self.value.std_sps_count = std_sp_ss.len() as u32; + self.value.std_sp_ss = std_sp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_pp_ss(mut self, std_pp_ss: &'b [video::StdVideoH264PictureParameterSet]) -> Self { + self.value.std_pps_count = std_pp_ss.len() as u32; + self.value.std_pp_ss = std_pp_ss.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264SessionParametersAddInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b> { + type Target = VideoDecodeH264SessionParametersAddInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH264SessionParametersAddInfoKHRBuilder<'b> { + type Target = VideoDecodeH264SessionParametersAddInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH264SessionParametersCreateInfoKHR { + type Target = VideoDecodeH264SessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH264SessionParametersCreateInfoKHR { + type Builder = VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH264SessionParametersCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b> { + value: VideoDecodeH264SessionParametersCreateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + pub fn max_std_sps_count(mut self, max_std_sps_count: u32) -> Self { + self.value.max_std_sps_count = max_std_sps_count; + self + } + + #[inline] + pub fn max_std_pps_count(mut self, max_std_pps_count: u32) -> Self { + self.value.max_std_pps_count = max_std_pps_count; + self + } + + #[inline] + pub fn parameters_add_info( + mut self, + parameters_add_info: &'b impl Cast, + ) -> Self { + self.value.parameters_add_info = parameters_add_info.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH264SessionParametersCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoDecodeH264SessionParametersCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH264SessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoDecodeH264SessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265CapabilitiesKHR { + type Target = VideoDecodeH265CapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeH265CapabilitiesKHR { + type Builder = VideoDecodeH265CapabilitiesKHRBuilder; +} + +/// A builder for a [`VideoDecodeH265CapabilitiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265CapabilitiesKHRBuilder { + value: VideoDecodeH265CapabilitiesKHR, +} + +impl VideoDecodeH265CapabilitiesKHRBuilder { + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH265LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265CapabilitiesKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeH265CapabilitiesKHRBuilder { + type Target = VideoDecodeH265CapabilitiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeH265CapabilitiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeH265CapabilitiesKHRBuilder { + type Target = VideoDecodeH265CapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265DpbSlotInfoKHR { + type Target = VideoDecodeH265DpbSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH265DpbSlotInfoKHR { + type Builder = VideoDecodeH265DpbSlotInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH265DpbSlotInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265DpbSlotInfoKHRBuilder<'b> { + value: VideoDecodeH265DpbSlotInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH265DpbSlotInfoKHRBuilder<'b> { + #[inline] + pub fn std_reference_info( + mut self, + std_reference_info: &'b video::StdVideoDecodeH265ReferenceInfo, + ) -> Self { + self.value.std_reference_info = + std_reference_info as *const video::StdVideoDecodeH265ReferenceInfo; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265DpbSlotInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH265DpbSlotInfoKHRBuilder<'b> { + type Target = VideoDecodeH265DpbSlotInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH265DpbSlotInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH265DpbSlotInfoKHRBuilder<'b> { + type Target = VideoDecodeH265DpbSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265PictureInfoKHR { + type Target = VideoDecodeH265PictureInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH265PictureInfoKHR { + type Builder = VideoDecodeH265PictureInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH265PictureInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265PictureInfoKHRBuilder<'b> { + value: VideoDecodeH265PictureInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH265PictureInfoKHRBuilder<'b> { + #[inline] + pub fn std_picture_info( + mut self, + std_picture_info: &'b video::StdVideoDecodeH265PictureInfo, + ) -> Self { + self.value.std_picture_info = + std_picture_info as *const video::StdVideoDecodeH265PictureInfo; + self + } + + #[inline] + pub fn slice_segment_offsets(mut self, slice_segment_offsets: &'b [u32]) -> Self { + self.value.slice_segment_count = slice_segment_offsets.len() as u32; + self.value.slice_segment_offsets = slice_segment_offsets.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265PictureInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH265PictureInfoKHRBuilder<'b> { + type Target = VideoDecodeH265PictureInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH265PictureInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH265PictureInfoKHRBuilder<'b> { + type Target = VideoDecodeH265PictureInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265ProfileInfoKHR { + type Target = VideoDecodeH265ProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeH265ProfileInfoKHR { + type Builder = VideoDecodeH265ProfileInfoKHRBuilder; +} + +/// A builder for a [`VideoDecodeH265ProfileInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265ProfileInfoKHRBuilder { + value: VideoDecodeH265ProfileInfoKHR, +} + +impl VideoDecodeH265ProfileInfoKHRBuilder { + #[inline] + pub fn std_profile_idc(mut self, std_profile_idc: video::StdVideoH265ProfileIdc) -> Self { + self.value.std_profile_idc = std_profile_idc; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265ProfileInfoKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeH265ProfileInfoKHRBuilder { + type Target = VideoDecodeH265ProfileInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeH265ProfileInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeH265ProfileInfoKHRBuilder { + type Target = VideoDecodeH265ProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265SessionParametersAddInfoKHR { + type Target = VideoDecodeH265SessionParametersAddInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH265SessionParametersAddInfoKHR { + type Builder = VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH265SessionParametersAddInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b> { + value: VideoDecodeH265SessionParametersAddInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b> { + #[inline] + pub fn std_vp_ss(mut self, std_vp_ss: &'b [video::StdVideoH265VideoParameterSet]) -> Self { + self.value.std_vps_count = std_vp_ss.len() as u32; + self.value.std_vp_ss = std_vp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_sp_ss(mut self, std_sp_ss: &'b [video::StdVideoH265SequenceParameterSet]) -> Self { + self.value.std_sps_count = std_sp_ss.len() as u32; + self.value.std_sp_ss = std_sp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_pp_ss(mut self, std_pp_ss: &'b [video::StdVideoH265PictureParameterSet]) -> Self { + self.value.std_pps_count = std_pp_ss.len() as u32; + self.value.std_pp_ss = std_pp_ss.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265SessionParametersAddInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b> { + type Target = VideoDecodeH265SessionParametersAddInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH265SessionParametersAddInfoKHRBuilder<'b> { + type Target = VideoDecodeH265SessionParametersAddInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeH265SessionParametersCreateInfoKHR { + type Target = VideoDecodeH265SessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeH265SessionParametersCreateInfoKHR { + type Builder = VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeH265SessionParametersCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b> { + value: VideoDecodeH265SessionParametersCreateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + pub fn max_std_vps_count(mut self, max_std_vps_count: u32) -> Self { + self.value.max_std_vps_count = max_std_vps_count; + self + } + + #[inline] + pub fn max_std_sps_count(mut self, max_std_sps_count: u32) -> Self { + self.value.max_std_sps_count = max_std_sps_count; + self + } + + #[inline] + pub fn max_std_pps_count(mut self, max_std_pps_count: u32) -> Self { + self.value.max_std_pps_count = max_std_pps_count; + self + } + + #[inline] + pub fn parameters_add_info( + mut self, + parameters_add_info: &'b impl Cast, + ) -> Self { + self.value.parameters_add_info = parameters_add_info.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeH265SessionParametersCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoDecodeH265SessionParametersCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeH265SessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoDecodeH265SessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoDecodeInfoKHR`]. +pub unsafe trait ExtendsVideoDecodeInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH264PictureInfoKHR {} +unsafe impl ExtendsVideoDecodeInfoKHR for VideoDecodeH265PictureInfoKHR {} + +unsafe impl Cast for VideoDecodeInfoKHR { + type Target = VideoDecodeInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoDecodeInfoKHR { + type Builder = VideoDecodeInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoDecodeInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeInfoKHRBuilder<'b> { + value: VideoDecodeInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoDecodeInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoDecodeInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoDecodeFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn src_buffer(mut self, src_buffer: Buffer) -> Self { + self.value.src_buffer = src_buffer; + self + } + + #[inline] + pub fn src_buffer_offset(mut self, src_buffer_offset: DeviceSize) -> Self { + self.value.src_buffer_offset = src_buffer_offset; + self + } + + #[inline] + pub fn src_buffer_range(mut self, src_buffer_range: DeviceSize) -> Self { + self.value.src_buffer_range = src_buffer_range; + self + } + + #[inline] + pub fn dst_picture_resource( + mut self, + dst_picture_resource: impl Cast, + ) -> Self { + self.value.dst_picture_resource = dst_picture_resource.into(); + self + } + + #[inline] + pub fn setup_reference_slot( + mut self, + setup_reference_slot: &'b impl Cast, + ) -> Self { + self.value.setup_reference_slot = setup_reference_slot.as_ref(); + self + } + + #[inline] + pub fn reference_slots( + mut self, + reference_slots: &'b [impl Cast], + ) -> Self { + self.value.reference_slot_count = reference_slots.len() as u32; + self.value.reference_slots = reference_slots.as_ptr().cast(); + self + } + + #[inline] + pub fn build(self) -> VideoDecodeInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoDecodeInfoKHRBuilder<'b> { + type Target = VideoDecodeInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoDecodeInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoDecodeInfoKHRBuilder<'b> { + type Target = VideoDecodeInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoDecodeUsageInfoKHR { + type Target = VideoDecodeUsageInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoDecodeUsageInfoKHR { + type Builder = VideoDecodeUsageInfoKHRBuilder; +} + +/// A builder for a [`VideoDecodeUsageInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoDecodeUsageInfoKHRBuilder { + value: VideoDecodeUsageInfoKHR, +} + +impl VideoDecodeUsageInfoKHRBuilder { + #[inline] + pub fn video_usage_hints(mut self, video_usage_hints: VideoDecodeUsageFlagsKHR) -> Self { + self.value.video_usage_hints = video_usage_hints; + self + } + + #[inline] + pub fn build(self) -> VideoDecodeUsageInfoKHR { + self.value + } +} + +impl ops::Deref for VideoDecodeUsageInfoKHRBuilder { + type Target = VideoDecodeUsageInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoDecodeUsageInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoDecodeUsageInfoKHRBuilder { + type Target = VideoDecodeUsageInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeCapabilitiesKHR { + type Target = VideoEncodeCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeCapabilitiesKHR { + type Builder = VideoEncodeCapabilitiesKHRBuilder; +} + +/// A builder for a [`VideoEncodeCapabilitiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeCapabilitiesKHRBuilder { + value: VideoEncodeCapabilitiesKHR, +} + +impl VideoEncodeCapabilitiesKHRBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEncodeCapabilityFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn rate_control_modes( + mut self, + rate_control_modes: VideoEncodeRateControlModeFlagsKHR, + ) -> Self { + self.value.rate_control_modes = rate_control_modes; + self + } + + #[inline] + pub fn max_rate_control_layers(mut self, max_rate_control_layers: u32) -> Self { + self.value.max_rate_control_layers = max_rate_control_layers; + self + } + + #[inline] + pub fn max_bitrate(mut self, max_bitrate: u64) -> Self { + self.value.max_bitrate = max_bitrate; + self + } + + #[inline] + pub fn max_quality_levels(mut self, max_quality_levels: u32) -> Self { + self.value.max_quality_levels = max_quality_levels; + self + } + + #[inline] + pub fn encode_input_picture_granularity( + mut self, + encode_input_picture_granularity: impl Cast, + ) -> Self { + self.value.encode_input_picture_granularity = encode_input_picture_granularity.into(); + self + } + + #[inline] + pub fn supported_encode_feedback_flags( + mut self, + supported_encode_feedback_flags: VideoEncodeFeedbackFlagsKHR, + ) -> Self { + self.value.supported_encode_feedback_flags = supported_encode_feedback_flags; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeCapabilitiesKHR { + self.value + } +} + +impl ops::Deref for VideoEncodeCapabilitiesKHRBuilder { + type Target = VideoEncodeCapabilitiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeCapabilitiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeCapabilitiesKHRBuilder { + type Target = VideoEncodeCapabilitiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264CapabilitiesEXT { + type Target = VideoEncodeH264CapabilitiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264CapabilitiesEXT { + type Builder = VideoEncodeH264CapabilitiesEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264CapabilitiesEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264CapabilitiesEXTBuilder { + value: VideoEncodeH264CapabilitiesEXT, +} + +impl VideoEncodeH264CapabilitiesEXTBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEncodeH264CapabilityFlagsEXT) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH264LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn max_slice_count(mut self, max_slice_count: u32) -> Self { + self.value.max_slice_count = max_slice_count; + self + } + + #[inline] + pub fn max_p_picture_l0_reference_count( + mut self, + max_p_picture_l0_reference_count: u32, + ) -> Self { + self.value.max_p_picture_l0_reference_count = max_p_picture_l0_reference_count; + self + } + + #[inline] + pub fn max_b_picture_l0_reference_count( + mut self, + max_b_picture_l0_reference_count: u32, + ) -> Self { + self.value.max_b_picture_l0_reference_count = max_b_picture_l0_reference_count; + self + } + + #[inline] + pub fn max_l1_reference_count(mut self, max_l1_reference_count: u32) -> Self { + self.value.max_l1_reference_count = max_l1_reference_count; + self + } + + #[inline] + pub fn max_temporal_layer_count(mut self, max_temporal_layer_count: u32) -> Self { + self.value.max_temporal_layer_count = max_temporal_layer_count; + self + } + + #[inline] + pub fn expect_dyadic_temporal_layer_pattern( + mut self, + expect_dyadic_temporal_layer_pattern: bool, + ) -> Self { + self.value.expect_dyadic_temporal_layer_pattern = + expect_dyadic_temporal_layer_pattern as Bool32; + self + } + + #[inline] + pub fn min_qp(mut self, min_qp: i32) -> Self { + self.value.min_qp = min_qp; + self + } + + #[inline] + pub fn max_qp(mut self, max_qp: i32) -> Self { + self.value.max_qp = max_qp; + self + } + + #[inline] + pub fn prefers_gop_remaining_frames(mut self, prefers_gop_remaining_frames: bool) -> Self { + self.value.prefers_gop_remaining_frames = prefers_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn requires_gop_remaining_frames(mut self, requires_gop_remaining_frames: bool) -> Self { + self.value.requires_gop_remaining_frames = requires_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn std_syntax_flags(mut self, std_syntax_flags: VideoEncodeH264StdFlagsEXT) -> Self { + self.value.std_syntax_flags = std_syntax_flags; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264CapabilitiesEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264CapabilitiesEXTBuilder { + type Target = VideoEncodeH264CapabilitiesEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264CapabilitiesEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264CapabilitiesEXTBuilder { + type Target = VideoEncodeH264CapabilitiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264DpbSlotInfoEXT { + type Target = VideoEncodeH264DpbSlotInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH264DpbSlotInfoEXT { + type Builder = VideoEncodeH264DpbSlotInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH264DpbSlotInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264DpbSlotInfoEXTBuilder<'b> { + value: VideoEncodeH264DpbSlotInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH264DpbSlotInfoEXTBuilder<'b> { + #[inline] + pub fn std_reference_info( + mut self, + std_reference_info: &'b video::StdVideoEncodeH264ReferenceInfo, + ) -> Self { + self.value.std_reference_info = + std_reference_info as *const video::StdVideoEncodeH264ReferenceInfo; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264DpbSlotInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH264DpbSlotInfoEXTBuilder<'b> { + type Target = VideoEncodeH264DpbSlotInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH264DpbSlotInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH264DpbSlotInfoEXTBuilder<'b> { + type Target = VideoEncodeH264DpbSlotInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264FrameSizeEXT { + type Target = VideoEncodeH264FrameSizeEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264FrameSizeEXT { + type Builder = VideoEncodeH264FrameSizeEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264FrameSizeEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264FrameSizeEXTBuilder { + value: VideoEncodeH264FrameSizeEXT, +} + +impl VideoEncodeH264FrameSizeEXTBuilder { + #[inline] + pub fn frame_i_size(mut self, frame_i_size: u32) -> Self { + self.value.frame_i_size = frame_i_size; + self + } + + #[inline] + pub fn frame_p_size(mut self, frame_p_size: u32) -> Self { + self.value.frame_p_size = frame_p_size; + self + } + + #[inline] + pub fn frame_b_size(mut self, frame_b_size: u32) -> Self { + self.value.frame_b_size = frame_b_size; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264FrameSizeEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264FrameSizeEXTBuilder { + type Target = VideoEncodeH264FrameSizeEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264FrameSizeEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264FrameSizeEXTBuilder { + type Target = VideoEncodeH264FrameSizeEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264GopRemainingFrameInfoEXT { + type Target = VideoEncodeH264GopRemainingFrameInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264GopRemainingFrameInfoEXT { + type Builder = VideoEncodeH264GopRemainingFrameInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264GopRemainingFrameInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264GopRemainingFrameInfoEXTBuilder { + value: VideoEncodeH264GopRemainingFrameInfoEXT, +} + +impl VideoEncodeH264GopRemainingFrameInfoEXTBuilder { + #[inline] + pub fn use_gop_remaining_frames(mut self, use_gop_remaining_frames: bool) -> Self { + self.value.use_gop_remaining_frames = use_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn gop_remaining_i(mut self, gop_remaining_i: u32) -> Self { + self.value.gop_remaining_i = gop_remaining_i; + self + } + + #[inline] + pub fn gop_remaining_p(mut self, gop_remaining_p: u32) -> Self { + self.value.gop_remaining_p = gop_remaining_p; + self + } + + #[inline] + pub fn gop_remaining_b(mut self, gop_remaining_b: u32) -> Self { + self.value.gop_remaining_b = gop_remaining_b; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264GopRemainingFrameInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264GopRemainingFrameInfoEXTBuilder { + type Target = VideoEncodeH264GopRemainingFrameInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264GopRemainingFrameInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264GopRemainingFrameInfoEXTBuilder { + type Target = VideoEncodeH264GopRemainingFrameInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264NaluSliceInfoEXT { + type Target = VideoEncodeH264NaluSliceInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH264NaluSliceInfoEXT { + type Builder = VideoEncodeH264NaluSliceInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH264NaluSliceInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264NaluSliceInfoEXTBuilder<'b> { + value: VideoEncodeH264NaluSliceInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH264NaluSliceInfoEXTBuilder<'b> { + #[inline] + pub fn constant_qp(mut self, constant_qp: i32) -> Self { + self.value.constant_qp = constant_qp; + self + } + + #[inline] + pub fn std_slice_header( + mut self, + std_slice_header: &'b video::StdVideoEncodeH264SliceHeader, + ) -> Self { + self.value.std_slice_header = + std_slice_header as *const video::StdVideoEncodeH264SliceHeader; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264NaluSliceInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH264NaluSliceInfoEXTBuilder<'b> { + type Target = VideoEncodeH264NaluSliceInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH264NaluSliceInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH264NaluSliceInfoEXTBuilder<'b> { + type Target = VideoEncodeH264NaluSliceInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264PictureInfoEXT { + type Target = VideoEncodeH264PictureInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH264PictureInfoEXT { + type Builder = VideoEncodeH264PictureInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH264PictureInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264PictureInfoEXTBuilder<'b> { + value: VideoEncodeH264PictureInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH264PictureInfoEXTBuilder<'b> { + #[inline] + pub fn nalu_slice_entries( + mut self, + nalu_slice_entries: &'b [impl Cast], + ) -> Self { + self.value.nalu_slice_entry_count = nalu_slice_entries.len() as u32; + self.value.nalu_slice_entries = nalu_slice_entries.as_ptr().cast(); + self + } + + #[inline] + pub fn std_picture_info( + mut self, + std_picture_info: &'b video::StdVideoEncodeH264PictureInfo, + ) -> Self { + self.value.std_picture_info = + std_picture_info as *const video::StdVideoEncodeH264PictureInfo; + self + } + + #[inline] + pub fn generate_prefix_nalu(mut self, generate_prefix_nalu: bool) -> Self { + self.value.generate_prefix_nalu = generate_prefix_nalu as Bool32; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264PictureInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH264PictureInfoEXTBuilder<'b> { + type Target = VideoEncodeH264PictureInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH264PictureInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH264PictureInfoEXTBuilder<'b> { + type Target = VideoEncodeH264PictureInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264ProfileInfoEXT { + type Target = VideoEncodeH264ProfileInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264ProfileInfoEXT { + type Builder = VideoEncodeH264ProfileInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264ProfileInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264ProfileInfoEXTBuilder { + value: VideoEncodeH264ProfileInfoEXT, +} + +impl VideoEncodeH264ProfileInfoEXTBuilder { + #[inline] + pub fn std_profile_idc(mut self, std_profile_idc: video::StdVideoH264ProfileIdc) -> Self { + self.value.std_profile_idc = std_profile_idc; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264ProfileInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264ProfileInfoEXTBuilder { + type Target = VideoEncodeH264ProfileInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264ProfileInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264ProfileInfoEXTBuilder { + type Target = VideoEncodeH264ProfileInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264QpEXT { + type Target = VideoEncodeH264QpEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264QpEXT { + type Builder = VideoEncodeH264QpEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264QpEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264QpEXTBuilder { + value: VideoEncodeH264QpEXT, +} + +impl VideoEncodeH264QpEXTBuilder { + #[inline] + pub fn qp_i(mut self, qp_i: i32) -> Self { + self.value.qp_i = qp_i; + self + } + + #[inline] + pub fn qp_p(mut self, qp_p: i32) -> Self { + self.value.qp_p = qp_p; + self + } + + #[inline] + pub fn qp_b(mut self, qp_b: i32) -> Self { + self.value.qp_b = qp_b; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264QpEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264QpEXTBuilder { + type Target = VideoEncodeH264QpEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264QpEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264QpEXTBuilder { + type Target = VideoEncodeH264QpEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264QualityLevelPropertiesEXT { + type Target = VideoEncodeH264QualityLevelPropertiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264QualityLevelPropertiesEXT { + type Builder = VideoEncodeH264QualityLevelPropertiesEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264QualityLevelPropertiesEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264QualityLevelPropertiesEXTBuilder { + value: VideoEncodeH264QualityLevelPropertiesEXT, +} + +impl VideoEncodeH264QualityLevelPropertiesEXTBuilder { + #[inline] + pub fn preferred_rate_control_flags( + mut self, + preferred_rate_control_flags: VideoEncodeH264RateControlFlagsEXT, + ) -> Self { + self.value.preferred_rate_control_flags = preferred_rate_control_flags; + self + } + + #[inline] + pub fn preferred_gop_frame_count(mut self, preferred_gop_frame_count: u32) -> Self { + self.value.preferred_gop_frame_count = preferred_gop_frame_count; + self + } + + #[inline] + pub fn preferred_idr_period(mut self, preferred_idr_period: u32) -> Self { + self.value.preferred_idr_period = preferred_idr_period; + self + } + + #[inline] + pub fn preferred_consecutive_b_frame_count( + mut self, + preferred_consecutive_b_frame_count: u32, + ) -> Self { + self.value.preferred_consecutive_b_frame_count = preferred_consecutive_b_frame_count; + self + } + + #[inline] + pub fn preferred_temporal_layer_count(mut self, preferred_temporal_layer_count: u32) -> Self { + self.value.preferred_temporal_layer_count = preferred_temporal_layer_count; + self + } + + #[inline] + pub fn preferred_constant_qp( + mut self, + preferred_constant_qp: impl Cast, + ) -> Self { + self.value.preferred_constant_qp = preferred_constant_qp.into(); + self + } + + #[inline] + pub fn preferred_max_l0_reference_count( + mut self, + preferred_max_l0_reference_count: u32, + ) -> Self { + self.value.preferred_max_l0_reference_count = preferred_max_l0_reference_count; + self + } + + #[inline] + pub fn preferred_max_l1_reference_count( + mut self, + preferred_max_l1_reference_count: u32, + ) -> Self { + self.value.preferred_max_l1_reference_count = preferred_max_l1_reference_count; + self + } + + #[inline] + pub fn preferred_std_entropy_coding_mode_flag( + mut self, + preferred_std_entropy_coding_mode_flag: bool, + ) -> Self { + self.value.preferred_std_entropy_coding_mode_flag = + preferred_std_entropy_coding_mode_flag as Bool32; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264QualityLevelPropertiesEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264QualityLevelPropertiesEXTBuilder { + type Target = VideoEncodeH264QualityLevelPropertiesEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264QualityLevelPropertiesEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264QualityLevelPropertiesEXTBuilder { + type Target = VideoEncodeH264QualityLevelPropertiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264RateControlInfoEXT { + type Target = VideoEncodeH264RateControlInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264RateControlInfoEXT { + type Builder = VideoEncodeH264RateControlInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264RateControlInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264RateControlInfoEXTBuilder { + value: VideoEncodeH264RateControlInfoEXT, +} + +impl VideoEncodeH264RateControlInfoEXTBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEncodeH264RateControlFlagsEXT) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn gop_frame_count(mut self, gop_frame_count: u32) -> Self { + self.value.gop_frame_count = gop_frame_count; + self + } + + #[inline] + pub fn idr_period(mut self, idr_period: u32) -> Self { + self.value.idr_period = idr_period; + self + } + + #[inline] + pub fn consecutive_b_frame_count(mut self, consecutive_b_frame_count: u32) -> Self { + self.value.consecutive_b_frame_count = consecutive_b_frame_count; + self + } + + #[inline] + pub fn temporal_layer_count(mut self, temporal_layer_count: u32) -> Self { + self.value.temporal_layer_count = temporal_layer_count; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264RateControlInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264RateControlInfoEXTBuilder { + type Target = VideoEncodeH264RateControlInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264RateControlInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264RateControlInfoEXTBuilder { + type Target = VideoEncodeH264RateControlInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264RateControlLayerInfoEXT { + type Target = VideoEncodeH264RateControlLayerInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264RateControlLayerInfoEXT { + type Builder = VideoEncodeH264RateControlLayerInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264RateControlLayerInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264RateControlLayerInfoEXTBuilder { + value: VideoEncodeH264RateControlLayerInfoEXT, +} + +impl VideoEncodeH264RateControlLayerInfoEXTBuilder { + #[inline] + pub fn use_min_qp(mut self, use_min_qp: bool) -> Self { + self.value.use_min_qp = use_min_qp as Bool32; + self + } + + #[inline] + pub fn min_qp(mut self, min_qp: impl Cast) -> Self { + self.value.min_qp = min_qp.into(); + self + } + + #[inline] + pub fn use_max_qp(mut self, use_max_qp: bool) -> Self { + self.value.use_max_qp = use_max_qp as Bool32; + self + } + + #[inline] + pub fn max_qp(mut self, max_qp: impl Cast) -> Self { + self.value.max_qp = max_qp.into(); + self + } + + #[inline] + pub fn use_max_frame_size(mut self, use_max_frame_size: bool) -> Self { + self.value.use_max_frame_size = use_max_frame_size as Bool32; + self + } + + #[inline] + pub fn max_frame_size( + mut self, + max_frame_size: impl Cast, + ) -> Self { + self.value.max_frame_size = max_frame_size.into(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264RateControlLayerInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264RateControlLayerInfoEXTBuilder { + type Target = VideoEncodeH264RateControlLayerInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264RateControlLayerInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264RateControlLayerInfoEXTBuilder { + type Target = VideoEncodeH264RateControlLayerInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionCreateInfoEXT { + type Target = VideoEncodeH264SessionCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264SessionCreateInfoEXT { + type Builder = VideoEncodeH264SessionCreateInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264SessionCreateInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264SessionCreateInfoEXTBuilder { + value: VideoEncodeH264SessionCreateInfoEXT, +} + +impl VideoEncodeH264SessionCreateInfoEXTBuilder { + #[inline] + pub fn use_max_level_idc(mut self, use_max_level_idc: bool) -> Self { + self.value.use_max_level_idc = use_max_level_idc as Bool32; + self + } + + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH264LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264SessionCreateInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264SessionCreateInfoEXTBuilder { + type Target = VideoEncodeH264SessionCreateInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264SessionCreateInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionCreateInfoEXTBuilder { + type Target = VideoEncodeH264SessionCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersAddInfoEXT { + type Target = VideoEncodeH264SessionParametersAddInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH264SessionParametersAddInfoEXT { + type Builder = VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH264SessionParametersAddInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b> { + value: VideoEncodeH264SessionParametersAddInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b> { + #[inline] + pub fn std_sps_count(mut self, std_sps_count: u32) -> Self { + self.value.std_sps_count = std_sps_count; + self + } + + #[inline] + pub fn std_sp_ss(mut self, std_sp_ss: &'b [video::StdVideoH264SequenceParameterSet]) -> Self { + self.value.std_sps_count = std_sp_ss.len() as u32; + self.value.std_sp_ss = std_sp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { + self.value.std_pps_count = std_pps_count; + self + } + + #[inline] + pub fn std_pp_ss(mut self, std_pp_ss: &'b [video::StdVideoH264PictureParameterSet]) -> Self { + self.value.std_pps_count = std_pp_ss.len() as u32; + self.value.std_pp_ss = std_pp_ss.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264SessionParametersAddInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b> { + type Target = VideoEncodeH264SessionParametersAddInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH264SessionParametersAddInfoEXTBuilder<'b> { + type Target = VideoEncodeH264SessionParametersAddInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersCreateInfoEXT { + type Target = VideoEncodeH264SessionParametersCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH264SessionParametersCreateInfoEXT { + type Builder = VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH264SessionParametersCreateInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b> { + value: VideoEncodeH264SessionParametersCreateInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b> { + #[inline] + pub fn max_std_sps_count(mut self, max_std_sps_count: u32) -> Self { + self.value.max_std_sps_count = max_std_sps_count; + self + } + + #[inline] + pub fn max_std_pps_count(mut self, max_std_pps_count: u32) -> Self { + self.value.max_std_pps_count = max_std_pps_count; + self + } + + #[inline] + pub fn parameters_add_info( + mut self, + parameters_add_info: &'b impl Cast, + ) -> Self { + self.value.parameters_add_info = parameters_add_info.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264SessionParametersCreateInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b> { + type Target = VideoEncodeH264SessionParametersCreateInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH264SessionParametersCreateInfoEXTBuilder<'b> { + type Target = VideoEncodeH264SessionParametersCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersFeedbackInfoEXT { + type Target = VideoEncodeH264SessionParametersFeedbackInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264SessionParametersFeedbackInfoEXT { + type Builder = VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264SessionParametersFeedbackInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder { + value: VideoEncodeH264SessionParametersFeedbackInfoEXT, +} + +impl VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder { + #[inline] + pub fn has_std_sps_overrides(mut self, has_std_sps_overrides: bool) -> Self { + self.value.has_std_sps_overrides = has_std_sps_overrides as Bool32; + self + } + + #[inline] + pub fn has_std_pps_overrides(mut self, has_std_pps_overrides: bool) -> Self { + self.value.has_std_pps_overrides = has_std_pps_overrides as Bool32; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264SessionParametersFeedbackInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder { + type Target = VideoEncodeH264SessionParametersFeedbackInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersFeedbackInfoEXTBuilder { + type Target = VideoEncodeH264SessionParametersFeedbackInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersGetInfoEXT { + type Target = VideoEncodeH264SessionParametersGetInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH264SessionParametersGetInfoEXT { + type Builder = VideoEncodeH264SessionParametersGetInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH264SessionParametersGetInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH264SessionParametersGetInfoEXTBuilder { + value: VideoEncodeH264SessionParametersGetInfoEXT, +} + +impl VideoEncodeH264SessionParametersGetInfoEXTBuilder { + #[inline] + pub fn write_std_sps(mut self, write_std_sps: bool) -> Self { + self.value.write_std_sps = write_std_sps as Bool32; + self + } + + #[inline] + pub fn write_std_pps(mut self, write_std_pps: bool) -> Self { + self.value.write_std_pps = write_std_pps as Bool32; + self + } + + #[inline] + pub fn std_sps_id(mut self, std_sps_id: u32) -> Self { + self.value.std_sps_id = std_sps_id; + self + } + + #[inline] + pub fn std_pps_id(mut self, std_pps_id: u32) -> Self { + self.value.std_pps_id = std_pps_id; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH264SessionParametersGetInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH264SessionParametersGetInfoEXTBuilder { + type Target = VideoEncodeH264SessionParametersGetInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH264SessionParametersGetInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH264SessionParametersGetInfoEXTBuilder { + type Target = VideoEncodeH264SessionParametersGetInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265CapabilitiesEXT { + type Target = VideoEncodeH265CapabilitiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265CapabilitiesEXT { + type Builder = VideoEncodeH265CapabilitiesEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265CapabilitiesEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265CapabilitiesEXTBuilder { + value: VideoEncodeH265CapabilitiesEXT, +} + +impl VideoEncodeH265CapabilitiesEXTBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEncodeH265CapabilityFlagsEXT) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH265LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn max_slice_segment_count(mut self, max_slice_segment_count: u32) -> Self { + self.value.max_slice_segment_count = max_slice_segment_count; + self + } + + #[inline] + pub fn max_tiles(mut self, max_tiles: impl Cast) -> Self { + self.value.max_tiles = max_tiles.into(); + self + } + + #[inline] + pub fn ctb_sizes(mut self, ctb_sizes: VideoEncodeH265CtbSizeFlagsEXT) -> Self { + self.value.ctb_sizes = ctb_sizes; + self + } + + #[inline] + pub fn transform_block_sizes( + mut self, + transform_block_sizes: VideoEncodeH265TransformBlockSizeFlagsEXT, + ) -> Self { + self.value.transform_block_sizes = transform_block_sizes; + self + } + + #[inline] + pub fn max_p_picture_l0_reference_count( + mut self, + max_p_picture_l0_reference_count: u32, + ) -> Self { + self.value.max_p_picture_l0_reference_count = max_p_picture_l0_reference_count; + self + } + + #[inline] + pub fn max_b_picture_l0_reference_count( + mut self, + max_b_picture_l0_reference_count: u32, + ) -> Self { + self.value.max_b_picture_l0_reference_count = max_b_picture_l0_reference_count; + self + } + + #[inline] + pub fn max_l1_reference_count(mut self, max_l1_reference_count: u32) -> Self { + self.value.max_l1_reference_count = max_l1_reference_count; + self + } + + #[inline] + pub fn max_sub_layer_count(mut self, max_sub_layer_count: u32) -> Self { + self.value.max_sub_layer_count = max_sub_layer_count; + self + } + + #[inline] + pub fn expect_dyadic_temporal_sub_layer_pattern( + mut self, + expect_dyadic_temporal_sub_layer_pattern: bool, + ) -> Self { + self.value.expect_dyadic_temporal_sub_layer_pattern = + expect_dyadic_temporal_sub_layer_pattern as Bool32; + self + } + + #[inline] + pub fn min_qp(mut self, min_qp: i32) -> Self { + self.value.min_qp = min_qp; + self + } + + #[inline] + pub fn max_qp(mut self, max_qp: i32) -> Self { + self.value.max_qp = max_qp; + self + } + + #[inline] + pub fn prefers_gop_remaining_frames(mut self, prefers_gop_remaining_frames: bool) -> Self { + self.value.prefers_gop_remaining_frames = prefers_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn requires_gop_remaining_frames(mut self, requires_gop_remaining_frames: bool) -> Self { + self.value.requires_gop_remaining_frames = requires_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn std_syntax_flags(mut self, std_syntax_flags: VideoEncodeH265StdFlagsEXT) -> Self { + self.value.std_syntax_flags = std_syntax_flags; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265CapabilitiesEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265CapabilitiesEXTBuilder { + type Target = VideoEncodeH265CapabilitiesEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265CapabilitiesEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265CapabilitiesEXTBuilder { + type Target = VideoEncodeH265CapabilitiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265DpbSlotInfoEXT { + type Target = VideoEncodeH265DpbSlotInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH265DpbSlotInfoEXT { + type Builder = VideoEncodeH265DpbSlotInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH265DpbSlotInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265DpbSlotInfoEXTBuilder<'b> { + value: VideoEncodeH265DpbSlotInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH265DpbSlotInfoEXTBuilder<'b> { + #[inline] + pub fn std_reference_info( + mut self, + std_reference_info: &'b video::StdVideoEncodeH265ReferenceInfo, + ) -> Self { + self.value.std_reference_info = + std_reference_info as *const video::StdVideoEncodeH265ReferenceInfo; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265DpbSlotInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH265DpbSlotInfoEXTBuilder<'b> { + type Target = VideoEncodeH265DpbSlotInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH265DpbSlotInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH265DpbSlotInfoEXTBuilder<'b> { + type Target = VideoEncodeH265DpbSlotInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265FrameSizeEXT { + type Target = VideoEncodeH265FrameSizeEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265FrameSizeEXT { + type Builder = VideoEncodeH265FrameSizeEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265FrameSizeEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265FrameSizeEXTBuilder { + value: VideoEncodeH265FrameSizeEXT, +} + +impl VideoEncodeH265FrameSizeEXTBuilder { + #[inline] + pub fn frame_i_size(mut self, frame_i_size: u32) -> Self { + self.value.frame_i_size = frame_i_size; + self + } + + #[inline] + pub fn frame_p_size(mut self, frame_p_size: u32) -> Self { + self.value.frame_p_size = frame_p_size; + self + } + + #[inline] + pub fn frame_b_size(mut self, frame_b_size: u32) -> Self { + self.value.frame_b_size = frame_b_size; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265FrameSizeEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265FrameSizeEXTBuilder { + type Target = VideoEncodeH265FrameSizeEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265FrameSizeEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265FrameSizeEXTBuilder { + type Target = VideoEncodeH265FrameSizeEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265GopRemainingFrameInfoEXT { + type Target = VideoEncodeH265GopRemainingFrameInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265GopRemainingFrameInfoEXT { + type Builder = VideoEncodeH265GopRemainingFrameInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265GopRemainingFrameInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265GopRemainingFrameInfoEXTBuilder { + value: VideoEncodeH265GopRemainingFrameInfoEXT, +} + +impl VideoEncodeH265GopRemainingFrameInfoEXTBuilder { + #[inline] + pub fn use_gop_remaining_frames(mut self, use_gop_remaining_frames: bool) -> Self { + self.value.use_gop_remaining_frames = use_gop_remaining_frames as Bool32; + self + } + + #[inline] + pub fn gop_remaining_i(mut self, gop_remaining_i: u32) -> Self { + self.value.gop_remaining_i = gop_remaining_i; + self + } + + #[inline] + pub fn gop_remaining_p(mut self, gop_remaining_p: u32) -> Self { + self.value.gop_remaining_p = gop_remaining_p; + self + } + + #[inline] + pub fn gop_remaining_b(mut self, gop_remaining_b: u32) -> Self { + self.value.gop_remaining_b = gop_remaining_b; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265GopRemainingFrameInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265GopRemainingFrameInfoEXTBuilder { + type Target = VideoEncodeH265GopRemainingFrameInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265GopRemainingFrameInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265GopRemainingFrameInfoEXTBuilder { + type Target = VideoEncodeH265GopRemainingFrameInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265NaluSliceSegmentInfoEXT { + type Target = VideoEncodeH265NaluSliceSegmentInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH265NaluSliceSegmentInfoEXT { + type Builder = VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH265NaluSliceSegmentInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b> { + value: VideoEncodeH265NaluSliceSegmentInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b> { + #[inline] + pub fn constant_qp(mut self, constant_qp: i32) -> Self { + self.value.constant_qp = constant_qp; + self + } + + #[inline] + pub fn std_slice_segment_header( + mut self, + std_slice_segment_header: &'b video::StdVideoEncodeH265SliceSegmentHeader, + ) -> Self { + self.value.std_slice_segment_header = + std_slice_segment_header as *const video::StdVideoEncodeH265SliceSegmentHeader; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265NaluSliceSegmentInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b> { + type Target = VideoEncodeH265NaluSliceSegmentInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH265NaluSliceSegmentInfoEXTBuilder<'b> { + type Target = VideoEncodeH265NaluSliceSegmentInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265PictureInfoEXT { + type Target = VideoEncodeH265PictureInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH265PictureInfoEXT { + type Builder = VideoEncodeH265PictureInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH265PictureInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265PictureInfoEXTBuilder<'b> { + value: VideoEncodeH265PictureInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH265PictureInfoEXTBuilder<'b> { + #[inline] + pub fn nalu_slice_segment_entries( + mut self, + nalu_slice_segment_entries: &'b [impl Cast], + ) -> Self { + self.value.nalu_slice_segment_entry_count = nalu_slice_segment_entries.len() as u32; + self.value.nalu_slice_segment_entries = nalu_slice_segment_entries.as_ptr().cast(); + self + } + + #[inline] + pub fn std_picture_info( + mut self, + std_picture_info: &'b video::StdVideoEncodeH265PictureInfo, + ) -> Self { + self.value.std_picture_info = + std_picture_info as *const video::StdVideoEncodeH265PictureInfo; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265PictureInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH265PictureInfoEXTBuilder<'b> { + type Target = VideoEncodeH265PictureInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH265PictureInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH265PictureInfoEXTBuilder<'b> { + type Target = VideoEncodeH265PictureInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265ProfileInfoEXT { + type Target = VideoEncodeH265ProfileInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265ProfileInfoEXT { + type Builder = VideoEncodeH265ProfileInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265ProfileInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265ProfileInfoEXTBuilder { + value: VideoEncodeH265ProfileInfoEXT, +} + +impl VideoEncodeH265ProfileInfoEXTBuilder { + #[inline] + pub fn std_profile_idc(mut self, std_profile_idc: video::StdVideoH265ProfileIdc) -> Self { + self.value.std_profile_idc = std_profile_idc; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265ProfileInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265ProfileInfoEXTBuilder { + type Target = VideoEncodeH265ProfileInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265ProfileInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265ProfileInfoEXTBuilder { + type Target = VideoEncodeH265ProfileInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265QpEXT { + type Target = VideoEncodeH265QpEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265QpEXT { + type Builder = VideoEncodeH265QpEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265QpEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265QpEXTBuilder { + value: VideoEncodeH265QpEXT, +} + +impl VideoEncodeH265QpEXTBuilder { + #[inline] + pub fn qp_i(mut self, qp_i: i32) -> Self { + self.value.qp_i = qp_i; + self + } + + #[inline] + pub fn qp_p(mut self, qp_p: i32) -> Self { + self.value.qp_p = qp_p; + self + } + + #[inline] + pub fn qp_b(mut self, qp_b: i32) -> Self { + self.value.qp_b = qp_b; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265QpEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265QpEXTBuilder { + type Target = VideoEncodeH265QpEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265QpEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265QpEXTBuilder { + type Target = VideoEncodeH265QpEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265QualityLevelPropertiesEXT { + type Target = VideoEncodeH265QualityLevelPropertiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265QualityLevelPropertiesEXT { + type Builder = VideoEncodeH265QualityLevelPropertiesEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265QualityLevelPropertiesEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265QualityLevelPropertiesEXTBuilder { + value: VideoEncodeH265QualityLevelPropertiesEXT, +} + +impl VideoEncodeH265QualityLevelPropertiesEXTBuilder { + #[inline] + pub fn preferred_rate_control_flags( + mut self, + preferred_rate_control_flags: VideoEncodeH265RateControlFlagsEXT, + ) -> Self { + self.value.preferred_rate_control_flags = preferred_rate_control_flags; + self + } + + #[inline] + pub fn preferred_gop_frame_count(mut self, preferred_gop_frame_count: u32) -> Self { + self.value.preferred_gop_frame_count = preferred_gop_frame_count; + self + } + + #[inline] + pub fn preferred_idr_period(mut self, preferred_idr_period: u32) -> Self { + self.value.preferred_idr_period = preferred_idr_period; + self + } + + #[inline] + pub fn preferred_consecutive_b_frame_count( + mut self, + preferred_consecutive_b_frame_count: u32, + ) -> Self { + self.value.preferred_consecutive_b_frame_count = preferred_consecutive_b_frame_count; + self + } + + #[inline] + pub fn preferred_sub_layer_count(mut self, preferred_sub_layer_count: u32) -> Self { + self.value.preferred_sub_layer_count = preferred_sub_layer_count; + self + } + + #[inline] + pub fn preferred_constant_qp( + mut self, + preferred_constant_qp: impl Cast, + ) -> Self { + self.value.preferred_constant_qp = preferred_constant_qp.into(); + self + } + + #[inline] + pub fn preferred_max_l0_reference_count( + mut self, + preferred_max_l0_reference_count: u32, + ) -> Self { + self.value.preferred_max_l0_reference_count = preferred_max_l0_reference_count; + self + } + + #[inline] + pub fn preferred_max_l1_reference_count( + mut self, + preferred_max_l1_reference_count: u32, + ) -> Self { + self.value.preferred_max_l1_reference_count = preferred_max_l1_reference_count; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265QualityLevelPropertiesEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265QualityLevelPropertiesEXTBuilder { + type Target = VideoEncodeH265QualityLevelPropertiesEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265QualityLevelPropertiesEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265QualityLevelPropertiesEXTBuilder { + type Target = VideoEncodeH265QualityLevelPropertiesEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265RateControlInfoEXT { + type Target = VideoEncodeH265RateControlInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265RateControlInfoEXT { + type Builder = VideoEncodeH265RateControlInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265RateControlInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265RateControlInfoEXTBuilder { + value: VideoEncodeH265RateControlInfoEXT, +} + +impl VideoEncodeH265RateControlInfoEXTBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEncodeH265RateControlFlagsEXT) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn gop_frame_count(mut self, gop_frame_count: u32) -> Self { + self.value.gop_frame_count = gop_frame_count; + self + } + + #[inline] + pub fn idr_period(mut self, idr_period: u32) -> Self { + self.value.idr_period = idr_period; + self + } + + #[inline] + pub fn consecutive_b_frame_count(mut self, consecutive_b_frame_count: u32) -> Self { + self.value.consecutive_b_frame_count = consecutive_b_frame_count; + self + } + + #[inline] + pub fn sub_layer_count(mut self, sub_layer_count: u32) -> Self { + self.value.sub_layer_count = sub_layer_count; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265RateControlInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265RateControlInfoEXTBuilder { + type Target = VideoEncodeH265RateControlInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265RateControlInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265RateControlInfoEXTBuilder { + type Target = VideoEncodeH265RateControlInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265RateControlLayerInfoEXT { + type Target = VideoEncodeH265RateControlLayerInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265RateControlLayerInfoEXT { + type Builder = VideoEncodeH265RateControlLayerInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265RateControlLayerInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265RateControlLayerInfoEXTBuilder { + value: VideoEncodeH265RateControlLayerInfoEXT, +} + +impl VideoEncodeH265RateControlLayerInfoEXTBuilder { + #[inline] + pub fn use_min_qp(mut self, use_min_qp: bool) -> Self { + self.value.use_min_qp = use_min_qp as Bool32; + self + } + + #[inline] + pub fn min_qp(mut self, min_qp: impl Cast) -> Self { + self.value.min_qp = min_qp.into(); + self + } + + #[inline] + pub fn use_max_qp(mut self, use_max_qp: bool) -> Self { + self.value.use_max_qp = use_max_qp as Bool32; + self + } + + #[inline] + pub fn max_qp(mut self, max_qp: impl Cast) -> Self { + self.value.max_qp = max_qp.into(); + self + } + + #[inline] + pub fn use_max_frame_size(mut self, use_max_frame_size: bool) -> Self { + self.value.use_max_frame_size = use_max_frame_size as Bool32; + self + } + + #[inline] + pub fn max_frame_size( + mut self, + max_frame_size: impl Cast, + ) -> Self { + self.value.max_frame_size = max_frame_size.into(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265RateControlLayerInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265RateControlLayerInfoEXTBuilder { + type Target = VideoEncodeH265RateControlLayerInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265RateControlLayerInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265RateControlLayerInfoEXTBuilder { + type Target = VideoEncodeH265RateControlLayerInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionCreateInfoEXT { + type Target = VideoEncodeH265SessionCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265SessionCreateInfoEXT { + type Builder = VideoEncodeH265SessionCreateInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265SessionCreateInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265SessionCreateInfoEXTBuilder { + value: VideoEncodeH265SessionCreateInfoEXT, +} + +impl VideoEncodeH265SessionCreateInfoEXTBuilder { + #[inline] + pub fn use_max_level_idc(mut self, use_max_level_idc: bool) -> Self { + self.value.use_max_level_idc = use_max_level_idc as Bool32; + self + } + + #[inline] + pub fn max_level_idc(mut self, max_level_idc: video::StdVideoH265LevelIdc) -> Self { + self.value.max_level_idc = max_level_idc; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265SessionCreateInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265SessionCreateInfoEXTBuilder { + type Target = VideoEncodeH265SessionCreateInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265SessionCreateInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionCreateInfoEXTBuilder { + type Target = VideoEncodeH265SessionCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersAddInfoEXT { + type Target = VideoEncodeH265SessionParametersAddInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH265SessionParametersAddInfoEXT { + type Builder = VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH265SessionParametersAddInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b> { + value: VideoEncodeH265SessionParametersAddInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b> { + #[inline] + pub fn std_vps_count(mut self, std_vps_count: u32) -> Self { + self.value.std_vps_count = std_vps_count; + self + } + + #[inline] + pub fn std_vp_ss(mut self, std_vp_ss: &'b [video::StdVideoH265VideoParameterSet]) -> Self { + self.value.std_vps_count = std_vp_ss.len() as u32; + self.value.std_vp_ss = std_vp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_sps_count(mut self, std_sps_count: u32) -> Self { + self.value.std_sps_count = std_sps_count; + self + } + + #[inline] + pub fn std_sp_ss(mut self, std_sp_ss: &'b [video::StdVideoH265SequenceParameterSet]) -> Self { + self.value.std_sps_count = std_sp_ss.len() as u32; + self.value.std_sp_ss = std_sp_ss.as_ptr(); + self + } + + #[inline] + pub fn std_pps_count(mut self, std_pps_count: u32) -> Self { + self.value.std_pps_count = std_pps_count; + self + } + + #[inline] + pub fn std_pp_ss(mut self, std_pp_ss: &'b [video::StdVideoH265PictureParameterSet]) -> Self { + self.value.std_pps_count = std_pp_ss.len() as u32; + self.value.std_pp_ss = std_pp_ss.as_ptr(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265SessionParametersAddInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b> { + type Target = VideoEncodeH265SessionParametersAddInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH265SessionParametersAddInfoEXTBuilder<'b> { + type Target = VideoEncodeH265SessionParametersAddInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersCreateInfoEXT { + type Target = VideoEncodeH265SessionParametersCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeH265SessionParametersCreateInfoEXT { + type Builder = VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b>; +} + +/// A builder for a [`VideoEncodeH265SessionParametersCreateInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b> { + value: VideoEncodeH265SessionParametersCreateInfoEXT, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b> { + #[inline] + pub fn max_std_vps_count(mut self, max_std_vps_count: u32) -> Self { + self.value.max_std_vps_count = max_std_vps_count; + self + } + + #[inline] + pub fn max_std_sps_count(mut self, max_std_sps_count: u32) -> Self { + self.value.max_std_sps_count = max_std_sps_count; + self + } + + #[inline] + pub fn max_std_pps_count(mut self, max_std_pps_count: u32) -> Self { + self.value.max_std_pps_count = max_std_pps_count; + self + } + + #[inline] + pub fn parameters_add_info( + mut self, + parameters_add_info: &'b impl Cast, + ) -> Self { + self.value.parameters_add_info = parameters_add_info.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265SessionParametersCreateInfoEXT { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b> { + type Target = VideoEncodeH265SessionParametersCreateInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeH265SessionParametersCreateInfoEXTBuilder<'b> { + type Target = VideoEncodeH265SessionParametersCreateInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersFeedbackInfoEXT { + type Target = VideoEncodeH265SessionParametersFeedbackInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265SessionParametersFeedbackInfoEXT { + type Builder = VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265SessionParametersFeedbackInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder { + value: VideoEncodeH265SessionParametersFeedbackInfoEXT, +} + +impl VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder { + #[inline] + pub fn has_std_vps_overrides(mut self, has_std_vps_overrides: bool) -> Self { + self.value.has_std_vps_overrides = has_std_vps_overrides as Bool32; + self + } + + #[inline] + pub fn has_std_sps_overrides(mut self, has_std_sps_overrides: bool) -> Self { + self.value.has_std_sps_overrides = has_std_sps_overrides as Bool32; + self + } + + #[inline] + pub fn has_std_pps_overrides(mut self, has_std_pps_overrides: bool) -> Self { + self.value.has_std_pps_overrides = has_std_pps_overrides as Bool32; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265SessionParametersFeedbackInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder { + type Target = VideoEncodeH265SessionParametersFeedbackInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersFeedbackInfoEXTBuilder { + type Target = VideoEncodeH265SessionParametersFeedbackInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersGetInfoEXT { + type Target = VideoEncodeH265SessionParametersGetInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeH265SessionParametersGetInfoEXT { + type Builder = VideoEncodeH265SessionParametersGetInfoEXTBuilder; +} + +/// A builder for a [`VideoEncodeH265SessionParametersGetInfoEXT`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeH265SessionParametersGetInfoEXTBuilder { + value: VideoEncodeH265SessionParametersGetInfoEXT, +} + +impl VideoEncodeH265SessionParametersGetInfoEXTBuilder { + #[inline] + pub fn write_std_vps(mut self, write_std_vps: bool) -> Self { + self.value.write_std_vps = write_std_vps as Bool32; + self + } + + #[inline] + pub fn write_std_sps(mut self, write_std_sps: bool) -> Self { + self.value.write_std_sps = write_std_sps as Bool32; + self + } + + #[inline] + pub fn write_std_pps(mut self, write_std_pps: bool) -> Self { + self.value.write_std_pps = write_std_pps as Bool32; + self + } + + #[inline] + pub fn std_vps_id(mut self, std_vps_id: u32) -> Self { + self.value.std_vps_id = std_vps_id; + self + } + + #[inline] + pub fn std_sps_id(mut self, std_sps_id: u32) -> Self { + self.value.std_sps_id = std_sps_id; + self + } + + #[inline] + pub fn std_pps_id(mut self, std_pps_id: u32) -> Self { + self.value.std_pps_id = std_pps_id; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeH265SessionParametersGetInfoEXT { + self.value + } +} + +impl ops::Deref for VideoEncodeH265SessionParametersGetInfoEXTBuilder { + type Target = VideoEncodeH265SessionParametersGetInfoEXT; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeH265SessionParametersGetInfoEXTBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeH265SessionParametersGetInfoEXTBuilder { + type Target = VideoEncodeH265SessionParametersGetInfoEXT; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoEncodeInfoKHR`]. +pub unsafe trait ExtendsVideoEncodeInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH264PictureInfoEXT {} +unsafe impl ExtendsVideoEncodeInfoKHR for VideoEncodeH265PictureInfoEXT {} + +unsafe impl Cast for VideoEncodeInfoKHR { + type Target = VideoEncodeInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeInfoKHR { + type Builder = VideoEncodeInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeInfoKHRBuilder<'b> { + value: VideoEncodeInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoEncodeInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoEncodeFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn dst_buffer(mut self, dst_buffer: Buffer) -> Self { + self.value.dst_buffer = dst_buffer; + self + } + + #[inline] + pub fn dst_buffer_offset(mut self, dst_buffer_offset: DeviceSize) -> Self { + self.value.dst_buffer_offset = dst_buffer_offset; + self + } + + #[inline] + pub fn dst_buffer_range(mut self, dst_buffer_range: DeviceSize) -> Self { + self.value.dst_buffer_range = dst_buffer_range; + self + } + + #[inline] + pub fn src_picture_resource( + mut self, + src_picture_resource: impl Cast, + ) -> Self { + self.value.src_picture_resource = src_picture_resource.into(); + self + } + + #[inline] + pub fn setup_reference_slot( + mut self, + setup_reference_slot: &'b impl Cast, + ) -> Self { + self.value.setup_reference_slot = setup_reference_slot.as_ref(); + self + } + + #[inline] + pub fn reference_slots( + mut self, + reference_slots: &'b [impl Cast], + ) -> Self { + self.value.reference_slot_count = reference_slots.len() as u32; + self.value.reference_slots = reference_slots.as_ptr().cast(); + self + } + + #[inline] + pub fn preceding_externally_encoded_bytes( + mut self, + preceding_externally_encoded_bytes: u32, + ) -> Self { + self.value.preceding_externally_encoded_bytes = preceding_externally_encoded_bytes; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeInfoKHRBuilder<'b> { + type Target = VideoEncodeInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeInfoKHRBuilder<'b> { + type Target = VideoEncodeInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeQualityLevelInfoKHR { + type Target = VideoEncodeQualityLevelInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeQualityLevelInfoKHR { + type Builder = VideoEncodeQualityLevelInfoKHRBuilder; +} + +/// A builder for a [`VideoEncodeQualityLevelInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeQualityLevelInfoKHRBuilder { + value: VideoEncodeQualityLevelInfoKHR, +} + +impl VideoEncodeQualityLevelInfoKHRBuilder { + #[inline] + pub fn quality_level(mut self, quality_level: u32) -> Self { + self.value.quality_level = quality_level; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeQualityLevelInfoKHR { + self.value + } +} + +impl ops::Deref for VideoEncodeQualityLevelInfoKHRBuilder { + type Target = VideoEncodeQualityLevelInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeQualityLevelInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeQualityLevelInfoKHRBuilder { + type Target = VideoEncodeQualityLevelInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoEncodeQualityLevelPropertiesKHR`]. +pub unsafe trait ExtendsVideoEncodeQualityLevelPropertiesKHR: fmt::Debug {} +unsafe impl ExtendsVideoEncodeQualityLevelPropertiesKHR + for VideoEncodeH264QualityLevelPropertiesEXT +{ +} +unsafe impl ExtendsVideoEncodeQualityLevelPropertiesKHR + for VideoEncodeH265QualityLevelPropertiesEXT +{ +} + +unsafe impl Cast for VideoEncodeQualityLevelPropertiesKHR { + type Target = VideoEncodeQualityLevelPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeQualityLevelPropertiesKHR { + type Builder = VideoEncodeQualityLevelPropertiesKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeQualityLevelPropertiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeQualityLevelPropertiesKHRBuilder<'b> { + value: VideoEncodeQualityLevelPropertiesKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeQualityLevelPropertiesKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoEncodeQualityLevelPropertiesKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn preferred_rate_control_mode( + mut self, + preferred_rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + ) -> Self { + self.value.preferred_rate_control_mode = preferred_rate_control_mode; + self + } + + #[inline] + pub fn preferred_rate_control_layer_count( + mut self, + preferred_rate_control_layer_count: u32, + ) -> Self { + self.value.preferred_rate_control_layer_count = preferred_rate_control_layer_count; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeQualityLevelPropertiesKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeQualityLevelPropertiesKHRBuilder<'b> { + type Target = VideoEncodeQualityLevelPropertiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeQualityLevelPropertiesKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeQualityLevelPropertiesKHRBuilder<'b> { + type Target = VideoEncodeQualityLevelPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeRateControlInfoKHR { + type Target = VideoEncodeRateControlInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeRateControlInfoKHR { + type Builder = VideoEncodeRateControlInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeRateControlInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeRateControlInfoKHRBuilder<'b> { + value: VideoEncodeRateControlInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeRateControlInfoKHRBuilder<'b> { + #[inline] + pub fn flags(mut self, flags: VideoEncodeRateControlFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn rate_control_mode( + mut self, + rate_control_mode: VideoEncodeRateControlModeFlagsKHR, + ) -> Self { + self.value.rate_control_mode = rate_control_mode; + self + } + + #[inline] + pub fn layers( + mut self, + layers: &'b [impl Cast], + ) -> Self { + self.value.layer_count = layers.len() as u32; + self.value.layers = layers.as_ptr().cast(); + self + } + + #[inline] + pub fn virtual_buffer_size_in_ms(mut self, virtual_buffer_size_in_ms: u32) -> Self { + self.value.virtual_buffer_size_in_ms = virtual_buffer_size_in_ms; + self + } + + #[inline] + pub fn initial_virtual_buffer_size_in_ms( + mut self, + initial_virtual_buffer_size_in_ms: u32, + ) -> Self { + self.value.initial_virtual_buffer_size_in_ms = initial_virtual_buffer_size_in_ms; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeRateControlInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeRateControlInfoKHRBuilder<'b> { + type Target = VideoEncodeRateControlInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeRateControlInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeRateControlInfoKHRBuilder<'b> { + type Target = VideoEncodeRateControlInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoEncodeRateControlLayerInfoKHR`]. +pub unsafe trait ExtendsVideoEncodeRateControlLayerInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoEncodeRateControlLayerInfoKHR for VideoEncodeH264RateControlLayerInfoEXT {} +unsafe impl ExtendsVideoEncodeRateControlLayerInfoKHR for VideoEncodeH265RateControlLayerInfoEXT {} + +unsafe impl Cast for VideoEncodeRateControlLayerInfoKHR { + type Target = VideoEncodeRateControlLayerInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeRateControlLayerInfoKHR { + type Builder = VideoEncodeRateControlLayerInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeRateControlLayerInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeRateControlLayerInfoKHRBuilder<'b> { + value: VideoEncodeRateControlLayerInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeRateControlLayerInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoEncodeRateControlLayerInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn average_bitrate(mut self, average_bitrate: u64) -> Self { + self.value.average_bitrate = average_bitrate; + self + } + + #[inline] + pub fn max_bitrate(mut self, max_bitrate: u64) -> Self { + self.value.max_bitrate = max_bitrate; + self + } + + #[inline] + pub fn frame_rate_numerator(mut self, frame_rate_numerator: u32) -> Self { + self.value.frame_rate_numerator = frame_rate_numerator; + self + } + + #[inline] + pub fn frame_rate_denominator(mut self, frame_rate_denominator: u32) -> Self { + self.value.frame_rate_denominator = frame_rate_denominator; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeRateControlLayerInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeRateControlLayerInfoKHRBuilder<'b> { + type Target = VideoEncodeRateControlLayerInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeRateControlLayerInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeRateControlLayerInfoKHRBuilder<'b> { + type Target = VideoEncodeRateControlLayerInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoEncodeSessionParametersFeedbackInfoKHR`]. +pub unsafe trait ExtendsVideoEncodeSessionParametersFeedbackInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoEncodeSessionParametersFeedbackInfoKHR + for VideoEncodeH264SessionParametersFeedbackInfoEXT +{ +} +unsafe impl ExtendsVideoEncodeSessionParametersFeedbackInfoKHR + for VideoEncodeH265SessionParametersFeedbackInfoEXT +{ +} + +unsafe impl Cast for VideoEncodeSessionParametersFeedbackInfoKHR { + type Target = VideoEncodeSessionParametersFeedbackInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeSessionParametersFeedbackInfoKHR { + type Builder = VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeSessionParametersFeedbackInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b> { + value: VideoEncodeSessionParametersFeedbackInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoEncodeSessionParametersFeedbackInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn has_overrides(mut self, has_overrides: bool) -> Self { + self.value.has_overrides = has_overrides as Bool32; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeSessionParametersFeedbackInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b> { + type Target = VideoEncodeSessionParametersFeedbackInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeSessionParametersFeedbackInfoKHRBuilder<'b> { + type Target = VideoEncodeSessionParametersFeedbackInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoEncodeSessionParametersGetInfoKHR`]. +pub unsafe trait ExtendsVideoEncodeSessionParametersGetInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoEncodeSessionParametersGetInfoKHR + for VideoEncodeH264SessionParametersGetInfoEXT +{ +} +unsafe impl ExtendsVideoEncodeSessionParametersGetInfoKHR + for VideoEncodeH265SessionParametersGetInfoEXT +{ +} + +unsafe impl Cast for VideoEncodeSessionParametersGetInfoKHR { + type Target = VideoEncodeSessionParametersGetInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoEncodeSessionParametersGetInfoKHR { + type Builder = VideoEncodeSessionParametersGetInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoEncodeSessionParametersGetInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeSessionParametersGetInfoKHRBuilder<'b> { + value: VideoEncodeSessionParametersGetInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoEncodeSessionParametersGetInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoEncodeSessionParametersGetInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn video_session_parameters( + mut self, + video_session_parameters: VideoSessionParametersKHR, + ) -> Self { + self.value.video_session_parameters = video_session_parameters; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeSessionParametersGetInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoEncodeSessionParametersGetInfoKHRBuilder<'b> { + type Target = VideoEncodeSessionParametersGetInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoEncodeSessionParametersGetInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoEncodeSessionParametersGetInfoKHRBuilder<'b> { + type Target = VideoEncodeSessionParametersGetInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEncodeUsageInfoKHR { + type Target = VideoEncodeUsageInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEncodeUsageInfoKHR { + type Builder = VideoEncodeUsageInfoKHRBuilder; +} + +/// A builder for a [`VideoEncodeUsageInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEncodeUsageInfoKHRBuilder { + value: VideoEncodeUsageInfoKHR, +} + +impl VideoEncodeUsageInfoKHRBuilder { + #[inline] + pub fn video_usage_hints(mut self, video_usage_hints: VideoEncodeUsageFlagsKHR) -> Self { + self.value.video_usage_hints = video_usage_hints; + self + } + + #[inline] + pub fn video_content_hints(mut self, video_content_hints: VideoEncodeContentFlagsKHR) -> Self { + self.value.video_content_hints = video_content_hints; + self + } + + #[inline] + pub fn tuning_mode(mut self, tuning_mode: VideoEncodeTuningModeKHR) -> Self { + self.value.tuning_mode = tuning_mode; + self + } + + #[inline] + pub fn build(self) -> VideoEncodeUsageInfoKHR { + self.value + } +} + +impl ops::Deref for VideoEncodeUsageInfoKHRBuilder { + type Target = VideoEncodeUsageInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEncodeUsageInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEncodeUsageInfoKHRBuilder { + type Target = VideoEncodeUsageInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoEndCodingInfoKHR { + type Target = VideoEndCodingInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoEndCodingInfoKHR { + type Builder = VideoEndCodingInfoKHRBuilder; +} + +/// A builder for a [`VideoEndCodingInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoEndCodingInfoKHRBuilder { + value: VideoEndCodingInfoKHR, +} + +impl VideoEndCodingInfoKHRBuilder { + #[inline] + pub fn flags(mut self, flags: VideoEndCodingFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn build(self) -> VideoEndCodingInfoKHR { + self.value + } +} + +impl ops::Deref for VideoEndCodingInfoKHRBuilder { + type Target = VideoEndCodingInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoEndCodingInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoEndCodingInfoKHRBuilder { + type Target = VideoEndCodingInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoFormatPropertiesKHR { + type Target = VideoFormatPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoFormatPropertiesKHR { + type Builder = VideoFormatPropertiesKHRBuilder; +} + +/// A builder for a [`VideoFormatPropertiesKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoFormatPropertiesKHRBuilder { + value: VideoFormatPropertiesKHR, +} + +impl VideoFormatPropertiesKHRBuilder { + #[inline] + pub fn format(mut self, format: Format) -> Self { + self.value.format = format; + self + } + + #[inline] + pub fn component_mapping( + mut self, + component_mapping: impl Cast, + ) -> Self { + self.value.component_mapping = component_mapping.into(); + self + } + + #[inline] + pub fn image_create_flags(mut self, image_create_flags: ImageCreateFlags) -> Self { + self.value.image_create_flags = image_create_flags; + self + } + + #[inline] + pub fn image_type(mut self, image_type: ImageType) -> Self { + self.value.image_type = image_type; + self + } + + #[inline] + pub fn image_tiling(mut self, image_tiling: ImageTiling) -> Self { + self.value.image_tiling = image_tiling; + self + } + + #[inline] + pub fn image_usage_flags(mut self, image_usage_flags: ImageUsageFlags) -> Self { + self.value.image_usage_flags = image_usage_flags; + self + } + + #[inline] + pub fn build(self) -> VideoFormatPropertiesKHR { + self.value + } +} + +impl ops::Deref for VideoFormatPropertiesKHRBuilder { + type Target = VideoFormatPropertiesKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoFormatPropertiesKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoFormatPropertiesKHRBuilder { + type Target = VideoFormatPropertiesKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoPictureResourceInfoKHR { + type Target = VideoPictureResourceInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoPictureResourceInfoKHR { + type Builder = VideoPictureResourceInfoKHRBuilder; +} + +/// A builder for a [`VideoPictureResourceInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoPictureResourceInfoKHRBuilder { + value: VideoPictureResourceInfoKHR, +} + +impl VideoPictureResourceInfoKHRBuilder { + #[inline] + pub fn coded_offset(mut self, coded_offset: impl Cast) -> Self { + self.value.coded_offset = coded_offset.into(); + self + } + + #[inline] + pub fn coded_extent(mut self, coded_extent: impl Cast) -> Self { + self.value.coded_extent = coded_extent.into(); + self + } + + #[inline] + pub fn base_array_layer(mut self, base_array_layer: u32) -> Self { + self.value.base_array_layer = base_array_layer; + self + } + + #[inline] + pub fn image_view_binding(mut self, image_view_binding: ImageView) -> Self { + self.value.image_view_binding = image_view_binding; + self + } + + #[inline] + pub fn build(self) -> VideoPictureResourceInfoKHR { + self.value + } +} + +impl ops::Deref for VideoPictureResourceInfoKHRBuilder { + type Target = VideoPictureResourceInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoPictureResourceInfoKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoPictureResourceInfoKHRBuilder { + type Target = VideoPictureResourceInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoProfileInfoKHR`]. +pub unsafe trait ExtendsVideoProfileInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoDecodeH264ProfileInfoKHR {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoDecodeH265ProfileInfoKHR {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoDecodeUsageInfoKHR {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoEncodeH264ProfileInfoEXT {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoEncodeH265ProfileInfoEXT {} +unsafe impl ExtendsVideoProfileInfoKHR for VideoEncodeUsageInfoKHR {} + +unsafe impl Cast for VideoProfileInfoKHR { + type Target = VideoProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoProfileInfoKHR { + type Builder = VideoProfileInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoProfileInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoProfileInfoKHRBuilder<'b> { + value: VideoProfileInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoProfileInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoProfileInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn video_codec_operation( + mut self, + video_codec_operation: VideoCodecOperationFlagsKHR, + ) -> Self { + self.value.video_codec_operation = video_codec_operation; + self + } + + #[inline] + pub fn chroma_subsampling( + mut self, + chroma_subsampling: VideoChromaSubsamplingFlagsKHR, + ) -> Self { + self.value.chroma_subsampling = chroma_subsampling; + self + } + + #[inline] + pub fn luma_bit_depth(mut self, luma_bit_depth: VideoComponentBitDepthFlagsKHR) -> Self { + self.value.luma_bit_depth = luma_bit_depth; + self + } + + #[inline] + pub fn chroma_bit_depth(mut self, chroma_bit_depth: VideoComponentBitDepthFlagsKHR) -> Self { + self.value.chroma_bit_depth = chroma_bit_depth; + self + } + + #[inline] + pub fn build(self) -> VideoProfileInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoProfileInfoKHRBuilder<'b> { + type Target = VideoProfileInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoProfileInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoProfileInfoKHRBuilder<'b> { + type Target = VideoProfileInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoProfileListInfoKHR { + type Target = VideoProfileListInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoProfileListInfoKHR { + type Builder = VideoProfileListInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoProfileListInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoProfileListInfoKHRBuilder<'b> { + value: VideoProfileListInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoProfileListInfoKHRBuilder<'b> { + #[inline] + pub fn profiles(mut self, profiles: &'b [impl Cast]) -> Self { + self.value.profile_count = profiles.len() as u32; + self.value.profiles = profiles.as_ptr().cast(); + self + } + + #[inline] + pub fn build(self) -> VideoProfileListInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoProfileListInfoKHRBuilder<'b> { + type Target = VideoProfileListInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoProfileListInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoProfileListInfoKHRBuilder<'b> { + type Target = VideoProfileListInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoReferenceSlotInfoKHR`]. +pub unsafe trait ExtendsVideoReferenceSlotInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoDecodeH264DpbSlotInfoKHR {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoDecodeH265DpbSlotInfoKHR {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH264DpbSlotInfoEXT {} +unsafe impl ExtendsVideoReferenceSlotInfoKHR for VideoEncodeH265DpbSlotInfoEXT {} + +unsafe impl Cast for VideoReferenceSlotInfoKHR { + type Target = VideoReferenceSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoReferenceSlotInfoKHR { + type Builder = VideoReferenceSlotInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoReferenceSlotInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoReferenceSlotInfoKHRBuilder<'b> { + value: VideoReferenceSlotInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoReferenceSlotInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoReferenceSlotInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn slot_index(mut self, slot_index: i32) -> Self { + self.value.slot_index = slot_index; + self + } + + #[inline] + pub fn picture_resource( + mut self, + picture_resource: &'b impl Cast, + ) -> Self { + self.value.picture_resource = picture_resource.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoReferenceSlotInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoReferenceSlotInfoKHRBuilder<'b> { + type Target = VideoReferenceSlotInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoReferenceSlotInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoReferenceSlotInfoKHRBuilder<'b> { + type Target = VideoReferenceSlotInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoSessionCreateInfoKHR`]. +pub unsafe trait ExtendsVideoSessionCreateInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoEncodeH264SessionCreateInfoEXT {} +unsafe impl ExtendsVideoSessionCreateInfoKHR for VideoEncodeH265SessionCreateInfoEXT {} + +unsafe impl Cast for VideoSessionCreateInfoKHR { + type Target = VideoSessionCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoSessionCreateInfoKHR { + type Builder = VideoSessionCreateInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoSessionCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoSessionCreateInfoKHRBuilder<'b> { + value: VideoSessionCreateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoSessionCreateInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoSessionCreateInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn queue_family_index(mut self, queue_family_index: u32) -> Self { + self.value.queue_family_index = queue_family_index; + self + } + + #[inline] + pub fn flags(mut self, flags: VideoSessionCreateFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn video_profile( + mut self, + video_profile: &'b impl Cast, + ) -> Self { + self.value.video_profile = video_profile.as_ref(); + self + } + + #[inline] + pub fn picture_format(mut self, picture_format: Format) -> Self { + self.value.picture_format = picture_format; + self + } + + #[inline] + pub fn max_coded_extent(mut self, max_coded_extent: impl Cast) -> Self { + self.value.max_coded_extent = max_coded_extent.into(); + self + } + + #[inline] + pub fn reference_picture_format(mut self, reference_picture_format: Format) -> Self { + self.value.reference_picture_format = reference_picture_format; + self + } + + #[inline] + pub fn max_dpb_slots(mut self, max_dpb_slots: u32) -> Self { + self.value.max_dpb_slots = max_dpb_slots; + self + } + + #[inline] + pub fn max_active_reference_pictures(mut self, max_active_reference_pictures: u32) -> Self { + self.value.max_active_reference_pictures = max_active_reference_pictures; + self + } + + #[inline] + pub fn std_header_version( + mut self, + std_header_version: &'b impl Cast, + ) -> Self { + self.value.std_header_version = std_header_version.as_ref(); + self + } + + #[inline] + pub fn build(self) -> VideoSessionCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoSessionCreateInfoKHRBuilder<'b> { + type Target = VideoSessionCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoSessionCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoSessionCreateInfoKHRBuilder<'b> { + type Target = VideoSessionCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +unsafe impl Cast for VideoSessionMemoryRequirementsKHR { + type Target = VideoSessionMemoryRequirementsKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl HasBuilder<'static> for VideoSessionMemoryRequirementsKHR { + type Builder = VideoSessionMemoryRequirementsKHRBuilder; +} + +/// A builder for a [`VideoSessionMemoryRequirementsKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoSessionMemoryRequirementsKHRBuilder { + value: VideoSessionMemoryRequirementsKHR, +} + +impl VideoSessionMemoryRequirementsKHRBuilder { + #[inline] + pub fn memory_bind_index(mut self, memory_bind_index: u32) -> Self { + self.value.memory_bind_index = memory_bind_index; + self + } + + #[inline] + pub fn memory_requirements( + mut self, + memory_requirements: impl Cast, + ) -> Self { + self.value.memory_requirements = memory_requirements.into(); + self + } + + #[inline] + pub fn build(self) -> VideoSessionMemoryRequirementsKHR { + self.value + } +} + +impl ops::Deref for VideoSessionMemoryRequirementsKHRBuilder { + type Target = VideoSessionMemoryRequirementsKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl ops::DerefMut for VideoSessionMemoryRequirementsKHRBuilder { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl Cast for VideoSessionMemoryRequirementsKHRBuilder { + type Target = VideoSessionMemoryRequirementsKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoSessionParametersCreateInfoKHR`]. +pub unsafe trait ExtendsVideoSessionParametersCreateInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH264SessionParametersCreateInfoKHR +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoDecodeH265SessionParametersCreateInfoKHR +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoEncodeH264SessionParametersCreateInfoEXT +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR + for VideoEncodeH265SessionParametersCreateInfoEXT +{ +} +unsafe impl ExtendsVideoSessionParametersCreateInfoKHR for VideoEncodeQualityLevelInfoKHR {} + +unsafe impl Cast for VideoSessionParametersCreateInfoKHR { + type Target = VideoSessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoSessionParametersCreateInfoKHR { + type Builder = VideoSessionParametersCreateInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoSessionParametersCreateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoSessionParametersCreateInfoKHRBuilder<'b> { + value: VideoSessionParametersCreateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoSessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoSessionParametersCreateInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn flags(mut self, flags: VideoSessionParametersCreateFlagsKHR) -> Self { + self.value.flags = flags; + self + } + + #[inline] + pub fn video_session_parameters_template( + mut self, + video_session_parameters_template: VideoSessionParametersKHR, + ) -> Self { + self.value.video_session_parameters_template = video_session_parameters_template; + self + } + + #[inline] + pub fn video_session(mut self, video_session: VideoSessionKHR) -> Self { + self.value.video_session = video_session; + self + } + + #[inline] + pub fn build(self) -> VideoSessionParametersCreateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoSessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoSessionParametersCreateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoSessionParametersCreateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoSessionParametersCreateInfoKHRBuilder<'b> { + type Target = VideoSessionParametersCreateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + +/// A Vulkan struct that can be used to extend a [`VideoSessionParametersUpdateInfoKHR`]. +pub unsafe trait ExtendsVideoSessionParametersUpdateInfoKHR: fmt::Debug {} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH264SessionParametersAddInfoKHR +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoDecodeH265SessionParametersAddInfoKHR +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoEncodeH264SessionParametersAddInfoEXT +{ +} +unsafe impl ExtendsVideoSessionParametersUpdateInfoKHR + for VideoEncodeH265SessionParametersAddInfoEXT +{ +} + +unsafe impl Cast for VideoSessionParametersUpdateInfoKHR { + type Target = VideoSessionParametersUpdateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self + } +} + +impl<'b> HasBuilder<'b> for VideoSessionParametersUpdateInfoKHR { + type Builder = VideoSessionParametersUpdateInfoKHRBuilder<'b>; +} + +/// A builder for a [`VideoSessionParametersUpdateInfoKHR`]. +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default)] +pub struct VideoSessionParametersUpdateInfoKHRBuilder<'b> { + value: VideoSessionParametersUpdateInfoKHR, + _marker: PhantomData<&'b ()>, +} + +impl<'b> VideoSessionParametersUpdateInfoKHRBuilder<'b> { + #[inline] + pub fn push_next(mut self, next: &'b mut impl Cast) -> Self + where + T: ExtendsVideoSessionParametersUpdateInfoKHR, + { + self.next = merge(self.next as *mut c_void, NonNull::from(next).cast()); + self + } + + #[inline] + pub fn update_sequence_count(mut self, update_sequence_count: u32) -> Self { + self.value.update_sequence_count = update_sequence_count; + self + } + + #[inline] + pub fn build(self) -> VideoSessionParametersUpdateInfoKHR { + self.value + } +} + +impl<'b> ops::Deref for VideoSessionParametersUpdateInfoKHRBuilder<'b> { + type Target = VideoSessionParametersUpdateInfoKHR; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.value + } +} + +impl<'b> ops::DerefMut for VideoSessionParametersUpdateInfoKHRBuilder<'b> { + #[inline] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.value + } +} + +unsafe impl<'b> Cast for VideoSessionParametersUpdateInfoKHRBuilder<'b> { + type Target = VideoSessionParametersUpdateInfoKHR; + + #[inline] + fn into(self) -> Self::Target { + self.value + } +} + unsafe impl Cast for Viewport { type Target = Viewport; diff --git a/vulkanalia/src/vk/chains.rs b/vulkanalia/src/vk/chains.rs index c468a111..4149e255 100644 --- a/vulkanalia/src/vk/chains.rs +++ b/vulkanalia/src/vk/chains.rs @@ -682,6 +682,20 @@ unsafe impl InputChainStruct for BindSparseInfo { } } +unsafe impl InputChainStruct for BindVideoSessionMemoryInfoKHR { + const TYPE: StructureType = StructureType::BIND_VIDEO_SESSION_MEMORY_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + unsafe impl InputChainStruct for BlitImageCubicWeightsInfoQCOM { const TYPE: StructureType = StructureType::BLIT_IMAGE_CUBIC_WEIGHTS_INFO_QCOM; @@ -10748,6 +10762,34 @@ unsafe impl OutputChainStruct for PhysicalDeviceVertexInputDynamicStateFeaturesE } } +unsafe impl InputChainStruct for PhysicalDeviceVideoEncodeQualityLevelInfoKHR { + const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for PhysicalDeviceVideoFormatInfoKHR { + const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + unsafe impl InputChainStruct for PhysicalDeviceVulkan11Features { const TYPE: StructureType = StructureType::PHYSICAL_DEVICE_VULKAN_1_1_FEATURES; @@ -11931,6 +11973,20 @@ unsafe impl InputChainStruct for QueryPoolPerformanceQueryCreateInfoINTEL { } } +unsafe impl InputChainStruct for QueryPoolVideoEncodeFeedbackCreateInfoKHR { + const TYPE: StructureType = StructureType::QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + unsafe impl InputChainStruct for QueueFamilyCheckpointProperties2NV { const TYPE: StructureType = StructureType::QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV; @@ -12015,6 +12071,48 @@ unsafe impl OutputChainStruct for QueueFamilyProperties2 { } } +unsafe impl InputChainStruct for QueueFamilyQueryResultStatusPropertiesKHR { + const TYPE: StructureType = StructureType::QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for QueueFamilyQueryResultStatusPropertiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for QueueFamilyVideoPropertiesKHR { + const TYPE: StructureType = StructureType::QUEUE_FAMILY_VIDEO_PROPERTIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for QueueFamilyVideoPropertiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + unsafe impl InputChainStruct for RayTracingPipelineCreateInfoKHR { const TYPE: StructureType = StructureType::RAY_TRACING_PIPELINE_CREATE_INFO_KHR; @@ -13648,6 +13746,1023 @@ unsafe impl InputChainStruct for ViSurfaceCreateInfoNN { } } +unsafe impl InputChainStruct for VideoBeginCodingInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_BEGIN_CODING_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoCapabilitiesKHR { + const TYPE: StructureType = StructureType::VIDEO_CAPABILITIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoCapabilitiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoCodingControlInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_CODING_CONTROL_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeCapabilitiesKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_CAPABILITIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoDecodeCapabilitiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264CapabilitiesKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_CAPABILITIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoDecodeH264CapabilitiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264DpbSlotInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_DPB_SLOT_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264PictureInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_PICTURE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264ProfileInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_PROFILE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264SessionParametersAddInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH264SessionParametersCreateInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265CapabilitiesKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_CAPABILITIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoDecodeH265CapabilitiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265DpbSlotInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265PictureInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_PICTURE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265ProfileInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_PROFILE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265SessionParametersAddInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeH265SessionParametersCreateInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoDecodeUsageInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_DECODE_USAGE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeCapabilitiesKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_CAPABILITIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeCapabilitiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264CapabilitiesEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_CAPABILITIES_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH264CapabilitiesEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264DpbSlotInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264GopRemainingFrameInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264NaluSliceInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264PictureInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_PICTURE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264ProfileInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_PROFILE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264QualityLevelPropertiesEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH264QualityLevelPropertiesEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264RateControlInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264RateControlLayerInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264SessionCreateInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264SessionParametersAddInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264SessionParametersCreateInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264SessionParametersFeedbackInfoEXT { + const TYPE: StructureType = + StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH264SessionParametersFeedbackInfoEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH264SessionParametersGetInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265CapabilitiesEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_CAPABILITIES_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH265CapabilitiesEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265DpbSlotInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265GopRemainingFrameInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265NaluSliceSegmentInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265PictureInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_PICTURE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265ProfileInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_PROFILE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265QualityLevelPropertiesEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH265QualityLevelPropertiesEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265RateControlInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265RateControlLayerInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265SessionCreateInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_SESSION_CREATE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265SessionParametersAddInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265SessionParametersCreateInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265SessionParametersFeedbackInfoEXT { + const TYPE: StructureType = + StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeH265SessionParametersFeedbackInfoEXT { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeH265SessionParametersGetInfoEXT { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_EXT; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeQualityLevelInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeQualityLevelPropertiesKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeQualityLevelPropertiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeRateControlInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_RATE_CONTROL_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeRateControlLayerInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeSessionParametersFeedbackInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoEncodeSessionParametersFeedbackInfoKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeSessionParametersGetInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEncodeUsageInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_ENCODE_USAGE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoEndCodingInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_END_CODING_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoFormatPropertiesKHR { + const TYPE: StructureType = StructureType::VIDEO_FORMAT_PROPERTIES_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoFormatPropertiesKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoPictureResourceInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_PICTURE_RESOURCE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoProfileInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_PROFILE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoProfileListInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_PROFILE_LIST_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoReferenceSlotInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_REFERENCE_SLOT_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoSessionCreateInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_SESSION_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoSessionMemoryRequirementsKHR { + const TYPE: StructureType = StructureType::VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl OutputChainStruct for VideoSessionMemoryRequirementsKHR { + #[inline] + fn next_mut(&self) -> *mut c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoSessionParametersCreateInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + +unsafe impl InputChainStruct for VideoSessionParametersUpdateInfoKHR { + const TYPE: StructureType = StructureType::VIDEO_SESSION_PARAMETERS_UPDATE_INFO_KHR; + + #[inline] + fn s_type(&self) -> StructureType { + self.s_type + } + + #[inline] + fn next(&self) -> *const c_void { + self.next + } +} + unsafe impl InputChainStruct for WaylandSurfaceCreateInfoKHR { const TYPE: StructureType = StructureType::WAYLAND_SURFACE_CREATE_INFO_KHR; diff --git a/vulkanalia/src/vk/commands.rs b/vulkanalia/src/vk/commands.rs index d6eba46b..fe062ae6 100644 --- a/vulkanalia/src/vk/commands.rs +++ b/vulkanalia/src/vk/commands.rs @@ -44,6 +44,7 @@ pub struct DeviceCommands { pub bind_image_memory2: PFN_vkBindImageMemory2, pub bind_image_memory2_khr: PFN_vkBindImageMemory2KHR, pub bind_optical_flow_session_image_nv: PFN_vkBindOpticalFlowSessionImageNV, + pub bind_video_session_memory_khr: PFN_vkBindVideoSessionMemoryKHR, pub build_acceleration_structures_khr: PFN_vkBuildAccelerationStructuresKHR, pub build_micromaps_ext: PFN_vkBuildMicromapsEXT, pub cmd_begin_conditional_rendering_ext: PFN_vkCmdBeginConditionalRenderingEXT, @@ -55,6 +56,7 @@ pub struct DeviceCommands { pub cmd_begin_rendering: PFN_vkCmdBeginRendering, pub cmd_begin_rendering_khr: PFN_vkCmdBeginRenderingKHR, pub cmd_begin_transform_feedback_ext: PFN_vkCmdBeginTransformFeedbackEXT, + pub cmd_begin_video_coding_khr: PFN_vkCmdBeginVideoCodingKHR, pub cmd_bind_descriptor_buffer_embedded_samplers_ext: PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT, pub cmd_bind_descriptor_buffers_ext: PFN_vkCmdBindDescriptorBuffersEXT, @@ -81,6 +83,7 @@ pub struct DeviceCommands { pub cmd_clear_attachments: PFN_vkCmdClearAttachments, pub cmd_clear_color_image: PFN_vkCmdClearColorImage, pub cmd_clear_depth_stencil_image: PFN_vkCmdClearDepthStencilImage, + pub cmd_control_video_coding_khr: PFN_vkCmdControlVideoCodingKHR, pub cmd_copy_acceleration_structure_khr: PFN_vkCmdCopyAccelerationStructureKHR, pub cmd_copy_acceleration_structure_nv: PFN_vkCmdCopyAccelerationStructureNV, pub cmd_copy_acceleration_structure_to_memory_khr: @@ -109,6 +112,7 @@ pub struct DeviceCommands { pub cmd_debug_marker_begin_ext: PFN_vkCmdDebugMarkerBeginEXT, pub cmd_debug_marker_end_ext: PFN_vkCmdDebugMarkerEndEXT, pub cmd_debug_marker_insert_ext: PFN_vkCmdDebugMarkerInsertEXT, + pub cmd_decode_video_khr: PFN_vkCmdDecodeVideoKHR, pub cmd_decompress_memory_indirect_count_nv: PFN_vkCmdDecompressMemoryIndirectCountNV, pub cmd_decompress_memory_nv: PFN_vkCmdDecompressMemoryNV, pub cmd_dispatch: PFN_vkCmdDispatch, @@ -139,6 +143,7 @@ pub struct DeviceCommands { pub cmd_draw_mesh_tasks_nv: PFN_vkCmdDrawMeshTasksNV, pub cmd_draw_multi_ext: PFN_vkCmdDrawMultiEXT, pub cmd_draw_multi_indexed_ext: PFN_vkCmdDrawMultiIndexedEXT, + pub cmd_encode_video_khr: PFN_vkCmdEncodeVideoKHR, pub cmd_end_conditional_rendering_ext: PFN_vkCmdEndConditionalRenderingEXT, pub cmd_end_query: PFN_vkCmdEndQuery, pub cmd_end_query_indexed_ext: PFN_vkCmdEndQueryIndexedEXT, @@ -148,6 +153,7 @@ pub struct DeviceCommands { pub cmd_end_rendering: PFN_vkCmdEndRendering, pub cmd_end_rendering_khr: PFN_vkCmdEndRenderingKHR, pub cmd_end_transform_feedback_ext: PFN_vkCmdEndTransformFeedbackEXT, + pub cmd_end_video_coding_khr: PFN_vkCmdEndVideoCodingKHR, pub cmd_execute_commands: PFN_vkCmdExecuteCommands, pub cmd_execute_generated_commands_nv: PFN_vkCmdExecuteGeneratedCommandsNV, pub cmd_fill_buffer: PFN_vkCmdFillBuffer, @@ -344,6 +350,8 @@ pub struct DeviceCommands { pub create_shared_swapchains_khr: PFN_vkCreateSharedSwapchainsKHR, pub create_swapchain_khr: PFN_vkCreateSwapchainKHR, pub create_validation_cache_ext: PFN_vkCreateValidationCacheEXT, + pub create_video_session_khr: PFN_vkCreateVideoSessionKHR, + pub create_video_session_parameters_khr: PFN_vkCreateVideoSessionParametersKHR, pub debug_marker_set_object_name_ext: PFN_vkDebugMarkerSetObjectNameEXT, pub debug_marker_set_object_tag_ext: PFN_vkDebugMarkerSetObjectTagEXT, pub deferred_operation_join_khr: PFN_vkDeferredOperationJoinKHR, @@ -385,6 +393,8 @@ pub struct DeviceCommands { pub destroy_shader_module: PFN_vkDestroyShaderModule, pub destroy_swapchain_khr: PFN_vkDestroySwapchainKHR, pub destroy_validation_cache_ext: PFN_vkDestroyValidationCacheEXT, + pub destroy_video_session_khr: PFN_vkDestroyVideoSessionKHR, + pub destroy_video_session_parameters_khr: PFN_vkDestroyVideoSessionParametersKHR, pub device_wait_idle: PFN_vkDeviceWaitIdle, pub display_power_control_ext: PFN_vkDisplayPowerControlEXT, pub end_command_buffer: PFN_vkEndCommandBuffer, @@ -452,6 +462,7 @@ pub struct DeviceCommands { pub get_device_subpass_shading_max_workgroup_size_huawei: PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, pub get_dynamic_rendering_tile_properties_qcom: PFN_vkGetDynamicRenderingTilePropertiesQCOM, + pub get_encoded_video_session_parameters_khr: PFN_vkGetEncodedVideoSessionParametersKHR, pub get_event_status: PFN_vkGetEventStatus, pub get_execution_graph_pipeline_node_index_amdx: PFN_vkGetExecutionGraphPipelineNodeIndexAMDX, pub get_execution_graph_pipeline_scratch_size_amdx: @@ -520,6 +531,11 @@ pub struct DeviceCommands { pub get_physical_device_surface_present_modes2_ext: PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT, pub get_physical_device_tool_properties_ext: PFN_vkGetPhysicalDeviceToolPropertiesEXT, + pub get_physical_device_video_capabilities_khr: PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR, + pub get_physical_device_video_encode_quality_level_properties_khr: + PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, + pub get_physical_device_video_format_properties_khr: + PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR, pub get_pipeline_cache_data: PFN_vkGetPipelineCacheData, pub get_pipeline_executable_internal_representations_khr: PFN_vkGetPipelineExecutableInternalRepresentationsKHR, @@ -558,6 +574,7 @@ pub struct DeviceCommands { pub get_swapchain_images_khr: PFN_vkGetSwapchainImagesKHR, pub get_swapchain_status_khr: PFN_vkGetSwapchainStatusKHR, pub get_validation_cache_data_ext: PFN_vkGetValidationCacheDataEXT, + pub get_video_session_memory_requirements_khr: PFN_vkGetVideoSessionMemoryRequirementsKHR, pub get_winrt_display_nv: PFN_vkGetWinrtDisplayNV, pub import_fence_fd_khr: PFN_vkImportFenceFdKHR, pub import_fence_sci_sync_fence_nv: PFN_vkImportFenceSciSyncFenceNV, @@ -618,6 +635,7 @@ pub struct DeviceCommands { pub update_descriptor_set_with_template: PFN_vkUpdateDescriptorSetWithTemplate, pub update_descriptor_set_with_template_khr: PFN_vkUpdateDescriptorSetWithTemplateKHR, pub update_descriptor_sets: PFN_vkUpdateDescriptorSets, + pub update_video_session_parameters_khr: PFN_vkUpdateVideoSessionParametersKHR, pub wait_for_fences: PFN_vkWaitForFences, pub wait_for_present_khr: PFN_vkWaitForPresentKHR, pub wait_semaphores: PFN_vkWaitSemaphores, @@ -907,6 +925,22 @@ impl DeviceCommands { fallback } }, + bind_video_session_memory_khr: { + let value = loader(b"vkBindVideoSessionMemoryKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session: VideoSessionKHR, + _bind_session_memory_info_count: u32, + _bind_session_memory_infos: *const BindVideoSessionMemoryInfoKHR, + ) -> Result { + panic!("could not load vkBindVideoSessionMemoryKHR") + } + fallback + } + }, build_acceleration_structures_khr: { let value = loader(b"vkBuildAccelerationStructuresKHR\0".as_ptr().cast()); if let Some(value) = value { @@ -1077,6 +1111,20 @@ impl DeviceCommands { fallback } }, + cmd_begin_video_coding_khr: { + let value = loader(b"vkCmdBeginVideoCodingKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _command_buffer: CommandBuffer, + _begin_info: *const VideoBeginCodingInfoKHR, + ) { + panic!("could not load vkCmdBeginVideoCodingKHR") + } + fallback + } + }, cmd_bind_descriptor_buffer_embedded_samplers_ext: { let value = loader( b"vkCmdBindDescriptorBufferEmbeddedSamplersEXT\0" @@ -1490,6 +1538,20 @@ impl DeviceCommands { fallback } }, + cmd_control_video_coding_khr: { + let value = loader(b"vkCmdControlVideoCodingKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _command_buffer: CommandBuffer, + _coding_control_info: *const VideoCodingControlInfoKHR, + ) { + panic!("could not load vkCmdControlVideoCodingKHR") + } + fallback + } + }, cmd_copy_acceleration_structure_khr: { let value = loader(b"vkCmdCopyAccelerationStructureKHR\0".as_ptr().cast()); if let Some(value) = value { @@ -1890,6 +1952,20 @@ impl DeviceCommands { fallback } }, + cmd_decode_video_khr: { + let value = loader(b"vkCmdDecodeVideoKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _command_buffer: CommandBuffer, + _decode_info: *const VideoDecodeInfoKHR, + ) { + panic!("could not load vkCmdDecodeVideoKHR") + } + fallback + } + }, cmd_decompress_memory_indirect_count_nv: { let value = loader(b"vkCmdDecompressMemoryIndirectCountNV\0".as_ptr().cast()); if let Some(value) = value { @@ -2408,6 +2484,20 @@ impl DeviceCommands { fallback } }, + cmd_encode_video_khr: { + let value = loader(b"vkCmdEncodeVideoKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _command_buffer: CommandBuffer, + _encode_info: *const VideoEncodeInfoKHR, + ) { + panic!("could not load vkCmdEncodeVideoKHR") + } + fallback + } + }, cmd_end_conditional_rendering_ext: { let value = loader(b"vkCmdEndConditionalRenderingEXT\0".as_ptr().cast()); if let Some(value) = value { @@ -2528,6 +2618,20 @@ impl DeviceCommands { fallback } }, + cmd_end_video_coding_khr: { + let value = loader(b"vkCmdEndVideoCodingKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _command_buffer: CommandBuffer, + _end_coding_info: *const VideoEndCodingInfoKHR, + ) { + panic!("could not load vkCmdEndVideoCodingKHR") + } + fallback + } + }, cmd_execute_commands: { let value = loader(b"vkCmdExecuteCommands\0".as_ptr().cast()); if let Some(value) = value { @@ -5502,6 +5606,38 @@ impl DeviceCommands { fallback } }, + create_video_session_khr: { + let value = loader(b"vkCreateVideoSessionKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _create_info: *const VideoSessionCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _video_session: *mut VideoSessionKHR, + ) -> Result { + panic!("could not load vkCreateVideoSessionKHR") + } + fallback + } + }, + create_video_session_parameters_khr: { + let value = loader(b"vkCreateVideoSessionParametersKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _create_info: *const VideoSessionParametersCreateInfoKHR, + _allocator: *const AllocationCallbacks, + _video_session_parameters: *mut VideoSessionParametersKHR, + ) -> Result { + panic!("could not load vkCreateVideoSessionParametersKHR") + } + fallback + } + }, debug_marker_set_object_name_ext: { let value = loader(b"vkDebugMarkerSetObjectNameEXT\0".as_ptr().cast()); if let Some(value) = value { @@ -6113,6 +6249,36 @@ impl DeviceCommands { fallback } }, + destroy_video_session_khr: { + let value = loader(b"vkDestroyVideoSessionKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session: VideoSessionKHR, + _allocator: *const AllocationCallbacks, + ) { + panic!("could not load vkDestroyVideoSessionKHR") + } + fallback + } + }, + destroy_video_session_parameters_khr: { + let value = loader(b"vkDestroyVideoSessionParametersKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _allocator: *const AllocationCallbacks, + ) { + panic!("could not load vkDestroyVideoSessionParametersKHR") + } + fallback + } + }, device_wait_idle: { let value = loader(b"vkDeviceWaitIdle\0".as_ptr().cast()); if let Some(value) = value { @@ -7018,6 +7184,23 @@ impl DeviceCommands { fallback } }, + get_encoded_video_session_parameters_khr: { + let value = loader(b"vkGetEncodedVideoSessionParametersKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session_parameters_info: *const VideoEncodeSessionParametersGetInfoKHR, + _feedback_info: *mut VideoEncodeSessionParametersFeedbackInfoKHR, + _data_size: *mut usize, + _data: *mut c_void, + ) -> Result { + panic!("could not load vkGetEncodedVideoSessionParametersKHR") + } + fallback + } + }, get_event_status: { let value = loader(b"vkGetEventStatus\0".as_ptr().cast()); if let Some(value) = value { @@ -7910,6 +8093,60 @@ impl DeviceCommands { fallback } }, + get_physical_device_video_capabilities_khr: { + let value = loader(b"vkGetPhysicalDeviceVideoCapabilitiesKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _physical_device: PhysicalDevice, + _video_profile: *const VideoProfileInfoKHR, + _capabilities: *mut VideoCapabilitiesKHR, + ) -> Result { + panic!("could not load vkGetPhysicalDeviceVideoCapabilitiesKHR") + } + fallback + } + }, + get_physical_device_video_encode_quality_level_properties_khr: { + let value = loader( + b"vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR\0" + .as_ptr() + .cast(), + ); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _physical_device: PhysicalDevice, + _quality_level_info: *const PhysicalDeviceVideoEncodeQualityLevelInfoKHR, + _quality_level_properties: *mut VideoEncodeQualityLevelPropertiesKHR, + ) -> Result { + panic!("could not load vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR") + } + fallback + } + }, + get_physical_device_video_format_properties_khr: { + let value = loader( + b"vkGetPhysicalDeviceVideoFormatPropertiesKHR\0" + .as_ptr() + .cast(), + ); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _physical_device: PhysicalDevice, + _video_format_info: *const PhysicalDeviceVideoFormatInfoKHR, + _video_format_property_count: *mut u32, + _video_format_properties: *mut VideoFormatPropertiesKHR, + ) -> Result { + panic!("could not load vkGetPhysicalDeviceVideoFormatPropertiesKHR") + } + fallback + } + }, get_pipeline_cache_data: { let value = loader(b"vkGetPipelineCacheData\0".as_ptr().cast()); if let Some(value) = value { @@ -8483,6 +8720,22 @@ impl DeviceCommands { fallback } }, + get_video_session_memory_requirements_khr: { + let value = loader(b"vkGetVideoSessionMemoryRequirementsKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session: VideoSessionKHR, + _memory_requirements_count: *mut u32, + _memory_requirements: *mut VideoSessionMemoryRequirementsKHR, + ) -> Result { + panic!("could not load vkGetVideoSessionMemoryRequirementsKHR") + } + fallback + } + }, get_winrt_display_nv: { let value = loader(b"vkGetWinrtDisplayNV\0".as_ptr().cast()); if let Some(value) = value { @@ -9341,6 +9594,21 @@ impl DeviceCommands { fallback } }, + update_video_session_parameters_khr: { + let value = loader(b"vkUpdateVideoSessionParametersKHR\0".as_ptr().cast()); + if let Some(value) = value { + mem::transmute(value) + } else { + unsafe extern "system" fn fallback( + _device: Device, + _video_session_parameters: VideoSessionParametersKHR, + _update_info: *const VideoSessionParametersUpdateInfoKHR, + ) -> Result { + panic!("could not load vkUpdateVideoSessionParametersKHR") + } + fallback + } + }, wait_for_fences: { let value = loader(b"vkWaitForFences\0".as_ptr().cast()); if let Some(value) = value { diff --git a/vulkanalia/src/vk/enums.rs b/vulkanalia/src/vk/enums.rs index ba0aee37..3563abf2 100644 --- a/vulkanalia/src/vk/enums.rs +++ b/vulkanalia/src/vk/enums.rs @@ -124,9 +124,16 @@ impl ErrorCode { pub const INCOMPATIBLE_DISPLAY_KHR: Self = Self(-1000003001); pub const VALIDATION_FAILED_EXT: Self = Self(-1000011001); pub const INVALID_SHADER_NV: Self = Self(-1000012000); + pub const IMAGE_USAGE_NOT_SUPPORTED_KHR: Self = Self(-1000023000); + pub const VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR: Self = Self(-1000023001); + pub const VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR: Self = Self(-1000023002); + pub const VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR: Self = Self(-1000023003); + pub const VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR: Self = Self(-1000023004); + pub const VIDEO_STD_VERSION_NOT_SUPPORTED_KHR: Self = Self(-1000023005); pub const INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: Self = Self(-1000158000); pub const NOT_PERMITTED_KHR: Self = Self(-1000174001); pub const FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT: Self = Self(-1000255000); + pub const INVALID_VIDEO_STD_PARAMETERS_KHR: Self = Self(-1000299000); pub const COMPRESSION_EXHAUSTED_EXT: Self = Self(-1000338000); /// Constructs an instance of this enum with the supplied underlying value. @@ -168,9 +175,16 @@ impl fmt::Debug for ErrorCode { -1000003001 => write!(f, "INCOMPATIBLE_DISPLAY_KHR"), -1000011001 => write!(f, "VALIDATION_FAILED_EXT"), -1000012000 => write!(f, "INVALID_SHADER_NV"), + -1000023000 => write!(f, "IMAGE_USAGE_NOT_SUPPORTED_KHR"), + -1000023001 => write!(f, "VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR"), + -1000023002 => write!(f, "VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR"), + -1000023003 => write!(f, "VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR"), + -1000023004 => write!(f, "VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR"), + -1000023005 => write!(f, "VIDEO_STD_VERSION_NOT_SUPPORTED_KHR"), -1000158000 => write!(f, "INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"), -1000174001 => write!(f, "NOT_PERMITTED_KHR"), -1000255000 => write!(f, "FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"), + -1000299000 => write!(f, "INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "COMPRESSION_EXHAUSTED_EXT"), _ => self.0.fmt(f), } @@ -203,9 +217,16 @@ impl fmt::Display for ErrorCode { -1000003001 => write!(f, "The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image."), -1000011001 => write!(f, "VALIDATION_FAILED_EXT"), -1000012000 => write!(f, "One or more shaders failed to compile or link. More details are reported back to the application via VK_EXT_debug_report if enabled."), + -1000023000 => write!(f, "IMAGE_USAGE_NOT_SUPPORTED_KHR"), + -1000023001 => write!(f, "VIDEO_PICTURE_LAYOUT_NOT_SUPPORTED_KHR"), + -1000023002 => write!(f, "VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR"), + -1000023003 => write!(f, "VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR"), + -1000023004 => write!(f, "VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR"), + -1000023005 => write!(f, "VIDEO_STD_VERSION_NOT_SUPPORTED_KHR"), -1000158000 => write!(f, "INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"), -1000174001 => write!(f, "NOT_PERMITTED_KHR"), -1000255000 => write!(f, "An operation on a swapchain created with VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT failed as it did not have exclusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application's control."), + -1000299000 => write!(f, "INVALID_VIDEO_STD_PARAMETERS_KHR"), -1000338000 => write!(f, "COMPRESSION_EXHAUSTED_EXT"), _ => write!(f, "unknown Vulkan result (code = {})", self.0), } diff --git a/vulkanalia/src/vk/extensions.rs b/vulkanalia/src/vk/extensions.rs index 42baac7a..d9414562 100644 --- a/vulkanalia/src/vk/extensions.rs +++ b/vulkanalia/src/vk/extensions.rs @@ -5074,6 +5074,42 @@ pub trait ExtVertexInputDynamicStateExtension: DeviceV1_0 { impl ExtVertexInputDynamicStateExtension for crate::Device {} +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +pub trait ExtVideoEncodeH264Extension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = EXT_VIDEO_ENCODE_H264_EXTENSION; +} + +#[cfg(feature = "provisional")] +impl ExtVideoEncodeH264Extension for crate::Device {} + +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +pub trait ExtVideoEncodeH265Extension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = EXT_VIDEO_ENCODE_H265_EXTENSION; +} + +#[cfg(feature = "provisional")] +impl ExtVideoEncodeH265Extension for crate::Device {} + /// pub trait ExtYcbcr2plane444FormatsExtension: DeviceV1_0 { /// The metadata for this extension. @@ -9672,6 +9708,380 @@ pub trait KhrVariablePointersExtension: DeviceV1_0 { impl KhrVariablePointersExtension for crate::Device {} +/// +pub trait KhrVideoDecodeH264Extension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_VIDEO_DECODE_H264_EXTENSION; +} + +impl KhrVideoDecodeH264Extension for crate::Device {} + +/// +pub trait KhrVideoDecodeH265Extension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_VIDEO_DECODE_H265_EXTENSION; +} + +impl KhrVideoDecodeH265Extension for crate::Device {} + +/// +pub trait KhrVideoDecodeQueueExtension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_VIDEO_DECODE_QUEUE_EXTENSION; + + /// + #[inline] + unsafe fn cmd_decode_video_khr( + &self, + command_buffer: CommandBuffer, + decode_info: &VideoDecodeInfoKHR, + ) { + let __result = (self.commands().cmd_decode_video_khr)(command_buffer, decode_info); + } +} + +impl KhrVideoDecodeQueueExtension for crate::Device {} + +/// +/// +/// ## WARNING +/// +/// This is a +/// [provisional extension](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/provisional-headers.html). +/// Provisional extensions are not guaranteed to be backwards compatible and are +/// not intended to be used in production applications. +#[cfg(feature = "provisional")] +pub trait KhrVideoEncodeQueueExtension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_VIDEO_ENCODE_QUEUE_EXTENSION; + + /// + #[inline] + unsafe fn cmd_encode_video_khr( + &self, + command_buffer: CommandBuffer, + encode_info: &VideoEncodeInfoKHR, + ) { + let __result = (self.commands().cmd_encode_video_khr)(command_buffer, encode_info); + } + + /// + #[inline] + unsafe fn get_encoded_video_session_parameters_khr( + &self, + video_session_parameters_info: &VideoEncodeSessionParametersGetInfoKHR, + feedback_info: Option<&mut VideoEncodeSessionParametersFeedbackInfoKHR>, + ) -> crate::VkResult> { + let mut data_size = 0; + + (self.commands().get_encoded_video_session_parameters_khr)( + self.handle(), + video_session_parameters_info, + ptr::null_mut(), + &mut data_size, + ptr::null_mut(), + ); + + let mut data = Vec::with_capacity(data_size as usize); + + let __result = (self.commands().get_encoded_video_session_parameters_khr)( + self.handle(), + video_session_parameters_info, + feedback_info.map_or(ptr::null_mut(), |v| v), + &mut data_size, + data.as_mut_ptr() as *mut c_void, + ); + + debug_assert!(data.capacity() == data_size as usize); + data.set_len(data_size as usize); + + if __result == Result::SUCCESS { + Ok(data) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn get_physical_device_video_encode_quality_level_properties_khr( + &self, + physical_device: PhysicalDevice, + quality_level_info: &PhysicalDeviceVideoEncodeQualityLevelInfoKHR, + quality_level_properties: &mut VideoEncodeQualityLevelPropertiesKHR, + ) -> crate::VkResult<()> { + let __result = (self + .commands() + .get_physical_device_video_encode_quality_level_properties_khr)( + physical_device, + quality_level_info, + quality_level_properties, + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } +} + +#[cfg(feature = "provisional")] +impl KhrVideoEncodeQueueExtension for crate::Device {} + +/// +pub trait KhrVideoQueueExtension: DeviceV1_0 { + /// The metadata for this extension. + #[allow(deprecated)] + const METADATA: Extension = KHR_VIDEO_QUEUE_EXTENSION; + + /// + #[inline] + unsafe fn bind_video_session_memory_khr( + &self, + video_session: VideoSessionKHR, + bind_session_memory_infos: &[impl Cast], + ) -> crate::VkResult<()> { + let __result = (self.commands().bind_video_session_memory_khr)( + self.handle(), + video_session, + bind_session_memory_infos.len() as u32, + bind_session_memory_infos.as_ptr().cast(), + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn cmd_begin_video_coding_khr( + &self, + command_buffer: CommandBuffer, + begin_info: &VideoBeginCodingInfoKHR, + ) { + let __result = (self.commands().cmd_begin_video_coding_khr)(command_buffer, begin_info); + } + + /// + #[inline] + unsafe fn cmd_control_video_coding_khr( + &self, + command_buffer: CommandBuffer, + coding_control_info: &VideoCodingControlInfoKHR, + ) { + let __result = + (self.commands().cmd_control_video_coding_khr)(command_buffer, coding_control_info); + } + + /// + #[inline] + unsafe fn cmd_end_video_coding_khr( + &self, + command_buffer: CommandBuffer, + end_coding_info: &VideoEndCodingInfoKHR, + ) { + let __result = (self.commands().cmd_end_video_coding_khr)(command_buffer, end_coding_info); + } + + /// + #[inline] + unsafe fn create_video_session_khr( + &self, + create_info: &VideoSessionCreateInfoKHR, + allocator: Option<&AllocationCallbacks>, + ) -> crate::VkResult { + let mut video_session = MaybeUninit::::uninit(); + + let __result = (self.commands().create_video_session_khr)( + self.handle(), + create_info, + allocator.map_or(ptr::null(), |v| v), + video_session.as_mut_ptr(), + ); + + if __result == Result::SUCCESS { + Ok(video_session.assume_init()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn create_video_session_parameters_khr( + &self, + create_info: &VideoSessionParametersCreateInfoKHR, + allocator: Option<&AllocationCallbacks>, + ) -> crate::VkResult { + let mut video_session_parameters = MaybeUninit::::uninit(); + + let __result = (self.commands().create_video_session_parameters_khr)( + self.handle(), + create_info, + allocator.map_or(ptr::null(), |v| v), + video_session_parameters.as_mut_ptr(), + ); + + if __result == Result::SUCCESS { + Ok(video_session_parameters.assume_init()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn destroy_video_session_khr( + &self, + video_session: VideoSessionKHR, + allocator: Option<&AllocationCallbacks>, + ) { + let __result = (self.commands().destroy_video_session_khr)( + self.handle(), + video_session, + allocator.map_or(ptr::null(), |v| v), + ); + } + + /// + #[inline] + unsafe fn destroy_video_session_parameters_khr( + &self, + video_session_parameters: VideoSessionParametersKHR, + allocator: Option<&AllocationCallbacks>, + ) { + let __result = (self.commands().destroy_video_session_parameters_khr)( + self.handle(), + video_session_parameters, + allocator.map_or(ptr::null(), |v| v), + ); + } + + /// + #[inline] + unsafe fn get_physical_device_video_capabilities_khr( + &self, + physical_device: PhysicalDevice, + video_profile: &VideoProfileInfoKHR, + capabilities: &mut VideoCapabilitiesKHR, + ) -> crate::VkResult<()> { + let __result = (self.commands().get_physical_device_video_capabilities_khr)( + physical_device, + video_profile, + capabilities, + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn get_physical_device_video_format_properties_khr( + &self, + physical_device: PhysicalDevice, + video_format_info: &PhysicalDeviceVideoFormatInfoKHR, + ) -> crate::VkResult> { + let mut video_format_property_count = 0; + + (self + .commands() + .get_physical_device_video_format_properties_khr)( + physical_device, + video_format_info, + &mut video_format_property_count, + ptr::null_mut(), + ); + + let mut video_format_properties = Vec::with_capacity(video_format_property_count as usize); + + let __result = (self + .commands() + .get_physical_device_video_format_properties_khr)( + physical_device, + video_format_info, + &mut video_format_property_count, + video_format_properties.as_mut_ptr(), + ); + + debug_assert!(video_format_properties.capacity() == video_format_property_count as usize); + video_format_properties.set_len(video_format_property_count as usize); + + if __result == Result::SUCCESS { + Ok(video_format_properties) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn get_video_session_memory_requirements_khr( + &self, + video_session: VideoSessionKHR, + ) -> crate::VkResult> { + let mut memory_requirements_count = 0; + + (self.commands().get_video_session_memory_requirements_khr)( + self.handle(), + video_session, + &mut memory_requirements_count, + ptr::null_mut(), + ); + + let mut memory_requirements = Vec::with_capacity(memory_requirements_count as usize); + + let __result = (self.commands().get_video_session_memory_requirements_khr)( + self.handle(), + video_session, + &mut memory_requirements_count, + memory_requirements.as_mut_ptr(), + ); + + debug_assert!(memory_requirements.capacity() == memory_requirements_count as usize); + memory_requirements.set_len(memory_requirements_count as usize); + + if __result == Result::SUCCESS { + Ok(memory_requirements) + } else { + Err(__result.into()) + } + } + + /// + #[inline] + unsafe fn update_video_session_parameters_khr( + &self, + video_session_parameters: VideoSessionParametersKHR, + update_info: &VideoSessionParametersUpdateInfoKHR, + ) -> crate::VkResult<()> { + let __result = (self.commands().update_video_session_parameters_khr)( + self.handle(), + video_session_parameters, + update_info, + ); + + if __result == Result::SUCCESS { + Ok(()) + } else { + Err(__result.into()) + } + } +} + +impl KhrVideoQueueExtension for crate::Device {} + /// pub trait KhrVulkanMemoryModelExtension: DeviceV1_0 { /// The metadata for this extension.