| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_optical_flow
Description
Name
VK_NV_optical_flow - device extension
VK_NV_optical_flow
- Name String
VK_NV_optical_flow
- Extension Type
- Device extension
- Registered Extension Number
- 465
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or
VK_KHR_format_feature_flags2 and
VK_KHR_synchronization2 or Vulkan Version 1.3
- Contact
Other Extension Metadata
- Last Modified Date
- 2022-09-26
- Contributors
- Carsten Rohde, NVIDIA
- Vipul Parashar, NVIDIA
- Jeff Bolz, NVIDIA
- Eric Werness, NVIDIA
Description
Optical flow are fundamental algorithms in computer vision (CV) area. This extension allows applications to estimate 2D displacement of pixels between two frames.
This extension is designed to be used with upcoming NVIDIA Optical Flow SDK Version 5 which will be available on NVIDIA Developer webpage.
New Object Types
New Commands
cmdOpticalFlowExecuteNVcreateOpticalFlowSessionNVdestroyOpticalFlowSessionNVgetPhysicalDeviceOpticalFlowImageFormatsNV
New Structures
OpticalFlowImageFormatPropertiesNVOpticalFlowSessionCreateInfoNVExtending
OpticalFlowSessionCreateInfoNV:Extending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceImageFormatInfo2,ImageCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
OpticalFlowGridSizeFlagBitsNVOpticalFlowPerformanceLevelNVOpticalFlowSessionBindingPointNVOpticalFlowSessionCreateFlagBitsNVOpticalFlowUsageFlagBitsNV
New Bitmasks
New Enum Constants
NV_OPTICAL_FLOW_SPEC_VERSIONExtending
AccessFlagBits2:Extending
Format:Extending
FormatFeatureFlagBits2:Extending
ObjectType:Extending
PipelineStageFlagBits2:Extending
QueueFlagBits:Extending
StructureType:STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NVSTRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NVSTRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NVSTRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NVSTRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_PROPERTIES_NV
Examples
// Example querying available input formats
VkOpticalFlowImageFormatInfoNV ofFormatInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_INFO_NV };
ofFormatInfo.usage = VK_OPTICAL_FLOW_USAGE_INPUT_BIT_NV;
uint32_t count = 0;
vkGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, &ofFormatInfo, &count, NULL);
VkOpticalFlowImageFormatPropertiesNV* fmt = new VkOpticalFlowImageFormatPropertiesNV[count];
memset(fmt, 0, count * sizeof(VkOpticalFlowImageFormatPropertiesNV));
for (uint32_t i = 0; i < count; i++) {
fmt[i].sType = VK_STRUCTURE_TYPE_OPTICAL_FLOW_IMAGE_FORMAT_PROPERTIES_NV;
}
vkGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, &ofFormatInfo, &count, fmt);
// Pick one of the available formats
VkFormat inputFormat = fmt[0].format;
// Check feature support for optimal tiling
VkFormatProperties3 formatProperties3 = { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3 };
VkFormatProperties2 formatProperties2 = { VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, &formatProperties3 };
vkGetPhysicalDeviceFormatProperties2(physicalDevice, inputFormat, &formatProperties2);
if (!(formatProperties3.optimalTilingFeatures & VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV)) {
return false;
}
// Check support for image creation parameters
VkPhysicalDeviceImageFormatInfo2 imageFormatInfo2 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, &ofFormatInfo };
imageFormatInfo2.format = inputFormat;
imageFormatInfo2.type = VK_IMAGE_TYPE_2D;
imageFormatInfo2.tiling = VK_IMAGE_TILING_OPTIMAL;
imageFormatInfo2.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
VkImageFormatProperties2 imageFormatProperties2 = { VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 };
if (vkGetPhysicalDeviceImageFormatProperties2(physicalDevice, &imageFormatInfo2, &imageFormatProperties2) != VK_SUCCESS) {
return false;
}
VkImageCreateInfo imageCreateInfo = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, &ofFormatInfo };
imageCreateInfo.imageType = VK_IMAGE_TYPE_2D;
imageCreateInfo.format = inputFormat;
imageCreateInfo.extent = { width, height, (uint32_t)1};
imageCreateInfo.mipLevels = 1;
imageCreateInfo.arrayLayers = 1;
imageCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
imageCreateInfo.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
vkCreateImage(device, &imageCreateInfo, NULL, &input);
"allocate memory, bind image, create view"
"do the same for reference and output"
// Create optical flow session
VkOpticalFlowSessionCreateInfoNV sessionCreateInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV };
sessionCreateInfo.width = width;
sessionCreateInfo.height = height;
sessionCreateInfo.imageFormat = inputFormat;
sessionCreateInfo.flowVectorFormat = outputFormat;
sessionCreateInfo.outputGridSize = VK_OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV;
sessionCreateInfo.performanceLevel = VK_OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV;
VkOpticalFlowSessionNV session;
vkCreateOpticalFlowSessionNV(device, &sessionCreateInfo, NULL, &session);
"allocate command buffer"
"transfer images to VK_PIPELINE_STAGE_2_OPTICAL_FLOW_BIT_NV"
"transfer input images to VK_ACCESS_2_OPTICAL_FLOW_READ_BIT_NV and output image to VK_ACCESS_2_OPTICAL_FLOW_WRITE_BIT_NV"
vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV, inputView, VK_IMAGE_LAYOUT_GENERAL);
vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV, refView, VK_IMAGE_LAYOUT_GENERAL);
vkBindOpticalFlowSessionImageNV(device, session, VK_OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV, outputView, VK_IMAGE_LAYOUT_GENERAL);
VkOpticalFlowExecuteInfoNV opticalFlowExecuteInfo = { VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV };
vkCmdOpticalFlowExecuteNV(cmd, session, &opticalFlowExecuteInfo);
"submit command buffer"Version History
Revision 1, 2022-09-26 (Carsten Rohde)
- Internal revisions
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- getPhysicalDeviceOpticalFlowImageFormatsNV :: MonadIO io => PhysicalDevice -> OpticalFlowImageFormatInfoNV -> io (Result, "imageFormatProperties" ::: Vector OpticalFlowImageFormatPropertiesNV)
- createOpticalFlowSessionNV :: forall (a :: [Type]) io. (Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a, MonadIO io) => Device -> OpticalFlowSessionCreateInfoNV a -> ("allocator" ::: Maybe AllocationCallbacks) -> io OpticalFlowSessionNV
- withOpticalFlowSessionNV :: forall (a :: [Type]) io r. (Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a, MonadIO io) => Device -> OpticalFlowSessionCreateInfoNV a -> Maybe AllocationCallbacks -> (io OpticalFlowSessionNV -> (OpticalFlowSessionNV -> io ()) -> r) -> r
- destroyOpticalFlowSessionNV :: MonadIO io => Device -> OpticalFlowSessionNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- bindOpticalFlowSessionImageNV :: MonadIO io => Device -> OpticalFlowSessionNV -> OpticalFlowSessionBindingPointNV -> ImageView -> ImageLayout -> io ()
- cmdOpticalFlowExecuteNV :: MonadIO io => CommandBuffer -> OpticalFlowSessionNV -> OpticalFlowExecuteInfoNV -> io ()
- pattern FORMAT_R16G16_S10_5_NV :: Format
- data PhysicalDeviceOpticalFlowFeaturesNV = PhysicalDeviceOpticalFlowFeaturesNV {
- opticalFlow :: Bool
- data PhysicalDeviceOpticalFlowPropertiesNV = PhysicalDeviceOpticalFlowPropertiesNV {
- supportedOutputGridSizes :: OpticalFlowGridSizeFlagsNV
- supportedHintGridSizes :: OpticalFlowGridSizeFlagsNV
- hintSupported :: Bool
- costSupported :: Bool
- bidirectionalFlowSupported :: Bool
- globalFlowSupported :: Bool
- minWidth :: Word32
- minHeight :: Word32
- maxWidth :: Word32
- maxHeight :: Word32
- maxNumRegionsOfInterest :: Word32
- data OpticalFlowImageFormatInfoNV = OpticalFlowImageFormatInfoNV {}
- data OpticalFlowImageFormatPropertiesNV = OpticalFlowImageFormatPropertiesNV {}
- data OpticalFlowSessionCreateInfoNV (es :: [Type]) = OpticalFlowSessionCreateInfoNV {}
- data OpticalFlowSessionCreatePrivateDataInfoNV = OpticalFlowSessionCreatePrivateDataInfoNV {}
- data OpticalFlowExecuteInfoNV = OpticalFlowExecuteInfoNV {}
- type OpticalFlowGridSizeFlagsNV = OpticalFlowGridSizeFlagBitsNV
- newtype OpticalFlowGridSizeFlagBitsNV where
- OpticalFlowGridSizeFlagBitsNV Flags
- pattern OPTICAL_FLOW_GRID_SIZE_UNKNOWN_NV :: OpticalFlowGridSizeFlagBitsNV
- pattern OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
- pattern OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
- pattern OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
- pattern OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NV :: OpticalFlowGridSizeFlagBitsNV
- type OpticalFlowUsageFlagsNV = OpticalFlowUsageFlagBitsNV
- newtype OpticalFlowUsageFlagBitsNV where
- OpticalFlowUsageFlagBitsNV Flags
- pattern OPTICAL_FLOW_USAGE_UNKNOWN_NV :: OpticalFlowUsageFlagBitsNV
- pattern OPTICAL_FLOW_USAGE_INPUT_BIT_NV :: OpticalFlowUsageFlagBitsNV
- pattern OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV :: OpticalFlowUsageFlagBitsNV
- pattern OPTICAL_FLOW_USAGE_HINT_BIT_NV :: OpticalFlowUsageFlagBitsNV
- pattern OPTICAL_FLOW_USAGE_COST_BIT_NV :: OpticalFlowUsageFlagBitsNV
- pattern OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV :: OpticalFlowUsageFlagBitsNV
- newtype OpticalFlowPerformanceLevelNV where
- OpticalFlowPerformanceLevelNV Int32
- pattern OPTICAL_FLOW_PERFORMANCE_LEVEL_UNKNOWN_NV :: OpticalFlowPerformanceLevelNV
- pattern OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NV :: OpticalFlowPerformanceLevelNV
- pattern OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NV :: OpticalFlowPerformanceLevelNV
- pattern OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NV :: OpticalFlowPerformanceLevelNV
- newtype OpticalFlowSessionBindingPointNV where
- OpticalFlowSessionBindingPointNV Int32
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_UNKNOWN_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV :: OpticalFlowSessionBindingPointNV
- pattern OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV :: OpticalFlowSessionBindingPointNV
- type OpticalFlowSessionCreateFlagsNV = OpticalFlowSessionCreateFlagBitsNV
- newtype OpticalFlowSessionCreateFlagBitsNV where
- OpticalFlowSessionCreateFlagBitsNV Flags
- pattern OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
- pattern OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
- pattern OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
- pattern OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
- pattern OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NV :: OpticalFlowSessionCreateFlagBitsNV
- type OpticalFlowExecuteFlagsNV = OpticalFlowExecuteFlagBitsNV
- newtype OpticalFlowExecuteFlagBitsNV where
- type NV_OPTICAL_FLOW_SPEC_VERSION = 1
- pattern NV_OPTICAL_FLOW_SPEC_VERSION :: Integral a => a
- type NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow"
- pattern NV_OPTICAL_FLOW_EXTENSION_NAME :: (Eq a, IsString a) => a
- newtype OpticalFlowSessionNV = OpticalFlowSessionNV Word64
Documentation
getPhysicalDeviceOpticalFlowImageFormatsNV Source #
Arguments
| :: MonadIO io | |
| => PhysicalDevice |
|
| -> OpticalFlowImageFormatInfoNV |
|
| -> io (Result, "imageFormatProperties" ::: Vector OpticalFlowImageFormatPropertiesNV) |
vkGetPhysicalDeviceOpticalFlowImageFormatsNV - Query image formats for optical flow
Description
If pImageFormatProperties is NULL, then the number of optical flow
properties supported for the given physicalDevice is returned in
pFormatCount. Otherwise, pFormatCount must point to a variable set
by the application to the number of elements in the
pImageFormatProperties array, and on return the variable is
overwritten with the number of values actually written to
pImageFormatProperties. If the value of pFormatCount is less than
the number of optical flow properties supported, at most pFormatCount
values will be written to pImageFormatProperties, and
INCOMPLETE will be returned instead of
SUCCESS, to indicate that not all the
available values were returned.
Before creating an image to be used as an optical flow frame, obtain the
supported image creation parameters by querying with
getPhysicalDeviceFormatProperties2
and
getPhysicalDeviceImageFormatProperties2
using one of the reported formats and adding
OpticalFlowImageFormatInfoNV to the pNext chain of
PhysicalDeviceImageFormatInfo2.
When querying the parameters with
getPhysicalDeviceImageFormatProperties2
for images used for optical flow operations, the
OpticalFlowImageFormatInfoNV::usage field must contain one or more
of the bits defined in OpticalFlowUsageFlagBitsNV.
Valid Usage (Implicit)
-
physicalDevicemust be a validPhysicalDevicehandle
-
pOpticalFlowImageFormatInfomust be a valid pointer to a validOpticalFlowImageFormatInfoNVstructure -
pFormatCountmust be a valid pointer to auint32_tvalue -
If the value referenced by
pFormatCountis not0, andpImageFormatPropertiesis notNULL,pImageFormatPropertiesmust be a valid pointer to an array ofpFormatCountOpticalFlowImageFormatPropertiesNVstructures
Return Codes
FORMAT_B8G8R8A8_UNORM,
FORMAT_R8_UNORM and
FORMAT_G8_B8R8_2PLANE_420_UNORM are
initially supported for images with
optical usage
OPTICAL_FLOW_USAGE_INPUT_BIT_NV.
FORMAT_R16G16_SFIXED5_NV is initially
supported for images with
optical flow usage
OPTICAL_FLOW_USAGE_OUTPUT_BIT_NV, OPTICAL_FLOW_USAGE_HINT_BIT_NV and
OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NV.
FORMAT_R8_UINT and
FORMAT_R32_UINT are initially supported for
images with
optical flow usage
OPTICAL_FLOW_USAGE_COST_BIT_NV. It is recommended to use
FORMAT_R8_UINT because of the lower
bandwidth.
See Also
VK_NV_optical_flow,
OpticalFlowImageFormatInfoNV, OpticalFlowImageFormatPropertiesNV,
PhysicalDevice
createOpticalFlowSessionNV Source #
Arguments
| :: forall (a :: [Type]) io. (Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> OpticalFlowSessionCreateInfoNV a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io OpticalFlowSessionNV |
vkCreateOpticalFlowSessionNV - Creates an optical flow session object
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pCreateInfomust be a valid pointer to a validOpticalFlowSessionCreateInfoNVstructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pSessionmust be a valid pointer to aOpticalFlowSessionNVhandle - The device
must have been created with at least
1queue
Return Codes
See Also
VK_NV_optical_flow,
AllocationCallbacks,
Device, OpticalFlowSessionCreateInfoNV,
OpticalFlowSessionNV
withOpticalFlowSessionNV :: forall (a :: [Type]) io r. (Extendss OpticalFlowSessionCreateInfoNV a, PokeChain a, MonadIO io) => Device -> OpticalFlowSessionCreateInfoNV a -> Maybe AllocationCallbacks -> (io OpticalFlowSessionNV -> (OpticalFlowSessionNV -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createOpticalFlowSessionNV and destroyOpticalFlowSessionNV
To ensure that destroyOpticalFlowSessionNV is always called: pass
bracket (or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,) as the last argument.
destroyOpticalFlowSessionNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> OpticalFlowSessionNV |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyOpticalFlowSessionNV - Destroy optical flow session object
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
sessionmust be a validOpticalFlowSessionNVhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
sessionmust have been created, allocated, or retrieved fromdevice
See Also
VK_NV_optical_flow,
AllocationCallbacks,
Device,
OpticalFlowSessionNV
bindOpticalFlowSessionImageNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> OpticalFlowSessionNV |
|
| -> OpticalFlowSessionBindingPointNV |
|
| -> ImageView |
|
| -> ImageLayout |
|
| -> io () |
vkBindOpticalFlowSessionImageNV - Bind image to an optical flow session
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
sessionmust be a validOpticalFlowSessionNVhandle -
bindingPointmust be a validOpticalFlowSessionBindingPointNVvalue - If
viewis notNULL_HANDLE,viewmust be a validImageViewhandle -
layoutmust be a validImageLayoutvalue -
sessionmust have been created, allocated, or retrieved fromdevice - If
viewis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_NV_optical_flow,
Device,
ImageLayout,
ImageView, OpticalFlowSessionBindingPointNV,
OpticalFlowSessionNV
cmdOpticalFlowExecuteNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> OpticalFlowSessionNV |
|
| -> OpticalFlowExecuteInfoNV |
|
| -> io () |
vkCmdOpticalFlowExecuteNV - Calculate optical flow vectors
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
sessionmust be a validOpticalFlowSessionNVhandle -
pExecuteInfomust be a valid pointer to a validOpticalFlowExecuteInfoNVstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_OPTICAL_FLOW_BIT_NVoperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
- Both of
commandBuffer, andsessionmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_OPTICAL_FLOW_BIT_NV | Action |
Conditional Rendering
vkCmdOpticalFlowExecuteNV is not affected by conditional rendering
See Also
VK_NV_optical_flow,
CommandBuffer, OpticalFlowExecuteInfoNV,
OpticalFlowSessionNV
pattern FORMAT_R16G16_S10_5_NV :: Format Source #
data PhysicalDeviceOpticalFlowFeaturesNV Source #
VkPhysicalDeviceOpticalFlowFeaturesNV - Structure describing the optical flow features supported by the implementation
Members
This structure describes the following feature:
Description
If the PhysicalDeviceOpticalFlowFeaturesNV structure is included in
the pNext chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2,
it is filled in to indicate whether each corresponding feature is
supported. If the application wishes to use a
Device with any features described by
PhysicalDeviceOpticalFlowFeaturesNV, it must add an instance of the
structure, with the desired feature members set to
TRUE, to the pNext chain of
DeviceCreateInfo when creating the
Device.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceOpticalFlowFeaturesNV | |
Fields
| |
Instances
data PhysicalDeviceOpticalFlowPropertiesNV Source #
VkPhysicalDeviceOpticalFlowPropertiesNV - Structure describing properties supported by VK_NV_optical_flow
Description
If the PhysicalDeviceOpticalFlowPropertiesNV structure is included in
the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
VK_NV_optical_flow,
Bool32, OpticalFlowGridSizeFlagsNV,
StructureType
Constructors
| PhysicalDeviceOpticalFlowPropertiesNV | |
Fields
| |
Instances
data OpticalFlowImageFormatInfoNV Source #
VkOpticalFlowImageFormatInfoNV - Structure describing optical flow image format info
Valid Usage (Implicit)
See Also
VK_NV_optical_flow,
OpticalFlowUsageFlagsNV,
StructureType,
getPhysicalDeviceOpticalFlowImageFormatsNV
Constructors
| OpticalFlowImageFormatInfoNV | |
Fields
| |
Instances
data OpticalFlowImageFormatPropertiesNV Source #
VkOpticalFlowImageFormatPropertiesNV - Structure describing properties of an optical flow image format
Valid Usage (Implicit)
See Also
VK_NV_optical_flow,
Format,
StructureType,
getPhysicalDeviceOpticalFlowImageFormatsNV
Constructors
| OpticalFlowImageFormatPropertiesNV | |
Instances
data OpticalFlowSessionCreateInfoNV (es :: [Type]) Source #
VkOpticalFlowSessionCreateInfoNV - Structure specifying parameters of a newly created optical flow session
Valid Usage
-
widthmust be greater than or equal toPhysicalDeviceOpticalFlowPropertiesNV::minWidthand less than or equal toPhysicalDeviceOpticalFlowPropertiesNV::maxWidth
-
heightmust be greater than or equal toPhysicalDeviceOpticalFlowPropertiesNV::minHeightand less than or equal toPhysicalDeviceOpticalFlowPropertiesNV::maxHeight -
imageFormatmust be one of the formats returned bygetPhysicalDeviceOpticalFlowImageFormatsNVforOPTICAL_FLOW_USAGE_INPUT_BIT_NV -
flowVectorFormatmust be one of the formats returned bygetPhysicalDeviceOpticalFlowImageFormatsNVforOPTICAL_FLOW_USAGE_OUTPUT_BIT_NV -
costFormatmust be one of the formats returned bygetPhysicalDeviceOpticalFlowImageFormatsNVforOPTICAL_FLOW_USAGE_COST_BIT_NVifOPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NVis set inflags -
outputGridSizemust be exactly one of the bits reported inPhysicalDeviceOpticalFlowPropertiesNV::supportedOutputGridSizes -
hintGridSizemust be exactly one of the bits reported inPhysicalDeviceOpticalFlowPropertiesNV::supportedHintGridSizesifOPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NVis set inflags -
OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NVmust not be set inflagsifPhysicalDeviceOpticalFlowPropertiesNV::hintSupportedisFALSE -
OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NVmust not be set inflagsifPhysicalDeviceOpticalFlowPropertiesNV::costSupportedisFALSE -
OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NVmust not be set inflagsifPhysicalDeviceOpticalFlowPropertiesNV::globalFlowSupportedisFALSE -
OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NVmust not be set inflagsifPhysicalDeviceOpticalFlowPropertiesNV::maxNumRegionsOfInterestis 0 -
OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NVmust not be set inflagsifPhysicalDeviceOpticalFlowPropertiesNV::bidirectionalFlowSupportedisFALSE
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_INFO_NV
-
pNextmust beNULLor a pointer to a valid instance ofOpticalFlowSessionCreatePrivateDataInfoNV - The
sTypevalue of each structure in thepNextchain must be unique -
imageFormatmust be a validFormatvalue -
flowVectorFormatmust be a validFormatvalue - If
costFormatis not0,costFormatmust be a validFormatvalue -
outputGridSizemust be a valid combination ofOpticalFlowGridSizeFlagBitsNVvalues -
outputGridSizemust not be0 -
hintGridSizemust be a valid combination ofOpticalFlowGridSizeFlagBitsNVvalues -
If
performanceLevelis not0,performanceLevelmust be a validOpticalFlowPerformanceLevelNVvalue -
flagsmust be a valid combination ofOpticalFlowSessionCreateFlagBitsNVvalues
See Also
VK_NV_optical_flow,
Format, OpticalFlowGridSizeFlagsNV,
OpticalFlowPerformanceLevelNV, OpticalFlowSessionCreateFlagsNV,
StructureType,
createOpticalFlowSessionNV
Constructors
| OpticalFlowSessionCreateInfoNV | |
Fields
| |
Instances
data OpticalFlowSessionCreatePrivateDataInfoNV Source #
VkOpticalFlowSessionCreatePrivateDataInfoNV - Structure for NV internal use only
Valid Usage (Implicit)
See Also
Constructors
| OpticalFlowSessionCreatePrivateDataInfoNV | |
Fields
| |
Instances
data OpticalFlowExecuteInfoNV Source #
VkOpticalFlowExecuteInfoNV - Structure specifying parameters of an optical flow vector calculation
Valid Usage
-
regionCountmust be 0 ifOPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NVwas not set forOpticalFlowSessionNVon which this command is operating
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV
-
pNextmust beNULL -
flagsmust be a valid combination ofOpticalFlowExecuteFlagBitsNVvalues - If
regionCountis not0,pRegionsmust be a valid pointer to an array ofregionCountRect2Dstructures
See Also
VK_NV_optical_flow,
OpticalFlowExecuteFlagsNV, Rect2D,
StructureType,
cmdOpticalFlowExecuteNV
Constructors
| OpticalFlowExecuteInfoNV | |
Fields
| |
Instances
| Show OpticalFlowExecuteInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_optical_flow Methods showsPrec :: Int -> OpticalFlowExecuteInfoNV -> ShowS # show :: OpticalFlowExecuteInfoNV -> String # showList :: [OpticalFlowExecuteInfoNV] -> ShowS # | |
| FromCStruct OpticalFlowExecuteInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_optical_flow Methods peekCStruct :: Ptr OpticalFlowExecuteInfoNV -> IO OpticalFlowExecuteInfoNV Source # | |
| ToCStruct OpticalFlowExecuteInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_optical_flow Methods withCStruct :: OpticalFlowExecuteInfoNV -> (Ptr OpticalFlowExecuteInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr OpticalFlowExecuteInfoNV -> OpticalFlowExecuteInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr OpticalFlowExecuteInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr OpticalFlowExecuteInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero OpticalFlowExecuteInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_optical_flow Methods | |
newtype OpticalFlowGridSizeFlagBitsNV Source #
VkOpticalFlowGridSizeFlagBitsNV - Bits specifying grid sizes for optical flow operations
Description
OPTICAL_FLOW_GRID_SIZE_1X1_BIT_NVspecifies that grid is 1x1 pixel.
OPTICAL_FLOW_GRID_SIZE_2X2_BIT_NVspecifies that grid is 2x2 pixel.OPTICAL_FLOW_GRID_SIZE_4X4_BIT_NVspecifies that grid is 4x4 pixel.OPTICAL_FLOW_GRID_SIZE_8X8_BIT_NVspecifies that grid is 8x8 pixel.
See Also
Constructors
| OpticalFlowGridSizeFlagBitsNV Flags |
Bundled Patterns
Instances
newtype OpticalFlowUsageFlagBitsNV Source #
VkOpticalFlowUsageFlagBitsNV - Bits specifying usage for optical flow operations
Description
OPTICAL_FLOW_USAGE_INPUT_BIT_NVspecifies that the image can be used as input or reference frame for an optical flow operation.
OPTICAL_FLOW_USAGE_OUTPUT_BIT_NVspecifies that the image can be used as output flow vector map for an optical flow operation.OPTICAL_FLOW_USAGE_HINT_BIT_NVspecifies that the image can be used as hint flow vector map for an optical flow operation.OPTICAL_FLOW_USAGE_COST_BIT_NVspecifies that the image can be used as output cost map for an optical flow operation.OPTICAL_FLOW_USAGE_GLOBAL_FLOW_BIT_NVspecifies that the image can be used as global flow vector for an optical flow operation.
See Also
Constructors
| OpticalFlowUsageFlagBitsNV Flags |
Bundled Patterns
Instances
newtype OpticalFlowPerformanceLevelNV Source #
VkOpticalFlowPerformanceLevelNV - Optical flow performance level types
Description
OPTICAL_FLOW_PERFORMANCE_LEVEL_SLOW_NVis a level with slower performance but higher quality.
OPTICAL_FLOW_PERFORMANCE_LEVEL_MEDIUM_NVis a level with medium performance and medium quality.OPTICAL_FLOW_PERFORMANCE_LEVEL_FAST_NVis a preset with higher performance but lower quality.
See Also
Constructors
| OpticalFlowPerformanceLevelNV Int32 |
Bundled Patterns
Instances
newtype OpticalFlowSessionBindingPointNV Source #
VkOpticalFlowSessionBindingPointNV - Binding points of an optical flow session
Description
OPTICAL_FLOW_SESSION_BINDING_POINT_INPUT_NVspecifies the binding point for the input frame.
OPTICAL_FLOW_SESSION_BINDING_POINT_REFERENCE_NVspecifies the binding point for the input reference frame.OPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NVspecifies the binding point for the optional external hint flow vectors.OPTICAL_FLOW_SESSION_BINDING_POINT_FLOW_VECTOR_NVspecifies the binding point for output flow vectors of default forward flow calculation.OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_FLOW_VECTOR_NVspecifies the binding point for the optional output flow vector map of optional backward flow calculation.OPTICAL_FLOW_SESSION_BINDING_POINT_COST_NVspecifies the binding point for the optional output cost map of default forward flow calculation.OPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NVspecifies the binding point for the optional output cost map of optional backward flow calculation.OPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NVspecifies the binding point for the optional global flow value of default forward flow calculation.
See Also
Constructors
| OpticalFlowSessionBindingPointNV Int32 |
Bundled Patterns
Instances
newtype OpticalFlowSessionCreateFlagBitsNV Source #
VkOpticalFlowSessionCreateFlagBitsNV - Bits specifying flags for optical flow session
Description
OPTICAL_FLOW_SESSION_CREATE_ENABLE_HINT_BIT_NVspecifies that aImageViewwith external flow vectors will be used as hints in performing the motion search and must be bound toOPTICAL_FLOW_SESSION_BINDING_POINT_HINT_NV.
OPTICAL_FLOW_SESSION_CREATE_ENABLE_COST_BIT_NVspecifies that the cost for the forward flow is generated in aImageViewwhich must be bound toOPTICAL_FLOW_SESSION_BINDING_POINT_COST_NV. Additionally, ifOPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NVis also set, the cost for backward flow is generated in aImageViewwhich must be bound toOPTICAL_FLOW_SESSION_BINDING_POINT_BACKWARD_COST_NV. The cost is the confidence level of the flow vector for each grid in the frame. The Cost implies how (in)accurate the flow vector is. Higher cost value implies the flow vector to be less accurate and vice-versa.OPTICAL_FLOW_SESSION_CREATE_ENABLE_GLOBAL_FLOW_BIT_NVspecifies that a global flow vector is estimated from forward flow in a single pixelImageViewwhich must be bound toOPTICAL_FLOW_SESSION_BINDING_POINT_GLOBAL_FLOW_NV.OPTICAL_FLOW_SESSION_CREATE_ALLOW_REGIONS_BIT_NVspecifies that regions of interest can be specified inOpticalFlowExecuteInfoNV.OPTICAL_FLOW_SESSION_CREATE_BOTH_DIRECTIONS_BIT_NVspecifies that backward flow is generated in addition to forward flow which is always generated.
See Also
Constructors
| OpticalFlowSessionCreateFlagBitsNV Flags |
Bundled Patterns
Instances
newtype OpticalFlowExecuteFlagBitsNV Source #
VkOpticalFlowExecuteFlagBitsNV - Bits specifying flags for an optical flow vector calculation
Description
OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NVspecifies that temporal hints from previously generated flow vectors are not used. If temporal hints are enabled, optical flow vectors from previouscmdOpticalFlowExecuteNVcall are automatically used as hints for the currentcmdOpticalFlowExecuteNVcall, to take advantage of temporal correlation in a video sequence. Temporal hints should be disabled if there is a-priori knowledge of no temporal correlation (e.g. a scene change, independent successive frame pairs).
See Also
Constructors
| OpticalFlowExecuteFlagBitsNV Flags |
Bundled Patterns
| pattern OPTICAL_FLOW_EXECUTE_DISABLE_TEMPORAL_HINTS_BIT_NV :: OpticalFlowExecuteFlagBitsNV |
Instances
type NV_OPTICAL_FLOW_SPEC_VERSION = 1 Source #
pattern NV_OPTICAL_FLOW_SPEC_VERSION :: Integral a => a Source #
type NV_OPTICAL_FLOW_EXTENSION_NAME = "VK_NV_optical_flow" Source #
pattern NV_OPTICAL_FLOW_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
newtype OpticalFlowSessionNV Source #
VkOpticalFlowSessionNV - Opaque handle to an optical flow session object
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_NV_optical_flow,
bindOpticalFlowSessionImageNV,
cmdOpticalFlowExecuteNV,
createOpticalFlowSessionNV,
destroyOpticalFlowSessionNV
Constructors
| OpticalFlowSessionNV Word64 |