VkVideoEncodeFeedbackFlagBitsKHR(3)

Name

VkVideoEncodeFeedbackFlagBitsKHR - Bits specifying queried video encode feedback values

C Specification

Bits which can be set in VkQueryPoolVideoEncodeFeedbackCreateInfoKHR::encodeFeedbackFlags for video encode feedback query pools are:

// Provided by VK_KHR_video_encode_queue
typedef enum VkVideoEncodeFeedbackFlagBitsKHR {
    VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001,
    VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002,
    VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR = 0x00000008,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR = 0x00000010,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR = 0x00000020,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR = 0x00000040,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR = 0x00000080,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR = 0x00000100,
  // Provided by VK_KHR_video_encode_feedback2
    VK_VIDEO_ENCODE_FEEDBACK_PICTURE_PARTITION_COUNT_BIT_KHR = 0x00000200,
} VkVideoEncodeFeedbackFlagBitsKHR;

Description

The average, minimum, and maximum quantization values captured when VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_MIN_QUANTIZATION_BIT_KHR, and/or VK_VIDEO_ENCODE_FEEDBACK_MAX_QUANTIZATION_BIT_KHR are specified, respectively, depend on the used video profile:

  • In case of H.264 encode profiles, this value is a signed integer indicating the average, minimum, or maximum QP used across the encoded coding blocks, respectively.

  • In case of H.265 encode profiles this value is a signed integer indicating the average, minimum, or maximum QP used across the encoded coding blocks, respectively.

  • In case of AV1 encode profiles this value is an unsigned integer indicating the average, minimum, or maximum quantizer index used across the encoded coding blocks, respectively.

The rounding mode used to calculate the average value captured when VK_VIDEO_ENCODE_FEEDBACK_AVERAGE_QUANTIZATION_BIT_KHR is specified is undefined.

The number of pixels captured when VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR, VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR, and/or VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR are specified include padding pixels beyond the requested coded extent that are part of the complete coding blocks encoded for the picture.

If VK_VIDEO_ENCODE_FEEDBACK_SKIPPED_PIXELS_BIT_KHR is not supported for a video encode profile, then the results captured for VK_VIDEO_ENCODE_FEEDBACK_INTRA_PIXELS_BIT_KHR and VK_VIDEO_ENCODE_FEEDBACK_INTER_PIXELS_BIT_KHR will always include pixels in any intra or inter blocks, respectively, that are encoded as skipped blocks. Otherwise, the behavior depends on the used video profile:

When retrieving the results of video encode feedback queries, the values corresponding to each enabled video encode feedback are written in the order of the bits defined above, followed by an optional value indicating availability or result status if VK_QUERY_RESULT_WITH_AVAILABILITY_BIT or VK_QUERY_RESULT_WITH_STATUS_BIT_KHR is specified, respectively. If per picture partition feedback is enabled, this is followed by the values corresponding to each enabled per picture partition video encode feedback for each encoded picture partition but at most for VkQueryPoolVideoEncodePerPartitionFeedbackCreateInfoKHR::maxPerPartitionFeedbackEntries number of picture partitions, in picture-partition-major order.

If the result status of a video encode feedback query is negative, then the results of all enabled video encode feedback values will be undefined.

Applications should always specify VK_QUERY_RESULT_WITH_STATUS_BIT_KHR when retrieving the results of video encode feedback queries and ignore such undefined video encode feedback values for any unsuccessfully completed video encode operations.

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.