vkCmdEncodeVideoKHR(3)

# vkCmdEncodeVideoKHR(3) Manual Page

## Name

vkCmdEncodeVideoKHR - Encode operation for bitstream generation

Loading… please wait.

## C Specification

To launch an encode operation that results in bitstream generation, call:

    // Provided by VK_KHR_video_encode_queue
    void vkCmdEncodeVideoKHR(
        VkCommandBuffer                             commandBuffer,
        const VkVideoEncodeInfoKHR*                 pEncodeInfo);

## Parameters

- `commandBuffer` is the command buffer to be filled with this function for encoding to generate a bitstream.

- `pEncodeInfo` is a pointer to a VkVideoEncodeInfoKHR structure.

## Description

Valid Usage (Implicit)

- VUID-vkCmdEncodeVideoKHR-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdEncodeVideoKHR-pEncodeInfo-parameter
  `pEncodeInfo` must be a valid pointer to a valid VkVideoEncodeInfoKHR structure

- VUID-vkCmdEncodeVideoKHR-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdEncodeVideoKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support encode operations

- VUID-vkCmdEncodeVideoKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdEncodeVideoKHR-bufferlevel
  `commandBuffer` must be a primary `VkCommandBuffer`

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Supported Queue Types
--- | --- | ---
Primary | Outside | Encode

## See Also

VK_KHR_video_encode_queue, VkCommandBuffer, VkVideoEncodeInfoKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0