Top Description Fields Constructors Methods
org.lwjgl.vulkan

public final Class QCOMImageProcessing2

extends Object
Class Inheritance

This extension enables support for the SPIR-V TextureBlockMatch2QCOM capability. It builds on the functionality of QCOM_image_processing with the addition of 4 new image processing operations.

Each of the above 4 image processing instructions are limited to single-component formats.

Below is the pseudocode for GLSL built-in function textureWindowBlockMatchSADQCOM. The pseudocode for textureWindowBlockMatchSSD is identical other than replacing all instances of "SAD" with "SSD".


vec4 textureBlockMatchWindowSAD( sampler2D target,
                                 uvec2 targetCoord,
                                 samler2D reference,
                                 uvec2 refCoord,
                                 uvec2 blocksize) {
    // compareMode (MIN or MAX) comes from the vkSampler associated with `target`
    // uvec2 window  comes from the vkSampler associated with `target`
    minSAD = INF;
    maxSAD = -INF;
    uvec2 minCoord;
    uvec2 maxCoord;

    for (uint x=0, x < window.width; x++) {
        for (uint y=0; y < window.height; y++) {
            float SAD = textureBlockMatchSAD(target,
                                            targetCoord + uvec2(x, y),
                                            reference,
                                            refCoord,
                                            blocksize).x;
            // Note: the below comparison operator will produce undefined results
            // if SAD is a denorm value.
            if (SAD < minSAD) {
                minSAD = SAD;
                minCoord = uvec2(x,y);
            }
            if (SAD > maxSAD) {
                maxSAD = SAD;
                maxCoord = uvec2(x,y);
            }
        }
    }
    if (compareMode=MIN) {
        return vec4(minSAD, minCoord.x, minCoord.y, 0.0);
    } else {
        return vec4(maxSAD, maxCoord.x, maxCoord.y, 0.0);
    }
}

Below is the pseudocode for textureBlockMatchGatherSADQCOM. The pseudocode for textureBlockMatchGatherSSD follows an identical pattern.


vec4 textureBlockMatchGatherSAD( sampler2D target,
                                 uvec2 targetCoord,
                                 samler2D reference,
                                 uvec2 refCoord,
                                 uvec2 blocksize) {
    vec4 out;
    for (uint x=0, x<4; x++) {
            float SAD = textureBlockMatchSAD(target,
                                            targetCoord + uvec2(x, 0),
                                            reference,
                                            refCoord,
                                            blocksize).x;
            out[x] = SAD;
    }
    return out;
}
VK_QCOM_image_processing2
Name String
VK_QCOM_image_processing2
Extension Type
Device extension
Registered Extension Number
519
Revision
1
Extension and Version Dependencies
VK_QCOM_image_processing
Contact
Other Extension Metadata
Last Modified Date
2023-03-10
Interactions and External Dependencies
Contributors
  • Jeff Leger, Qualcomm Technologies, Inc.

Field Summary

Modifier and TypeField and Description
public static final int
VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM

VkBlockMatchWindowCompareModeQCOM - Block match window compare modes Description

public static final int
VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM

VkBlockMatchWindowCompareModeQCOM - Block match window compare modes Description

public static final String
public static final int
VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION

The extension specification version.

public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOMback to summary
public static final int VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MAX_QCOM

VkBlockMatchWindowCompareModeQCOM - Block match window compare modes

Description
See Also

VkSamplerBlockMatchWindowCreateInfoQCOM

VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOMback to summary
public static final int VK_BLOCK_MATCH_WINDOW_COMPARE_MODE_MIN_QCOM

VkBlockMatchWindowCompareModeQCOM - Block match window compare modes

Description
See Also

VkSamplerBlockMatchWindowCreateInfoQCOM

VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAMEback to summary
public static final String VK_QCOM_IMAGE_PROCESSING_2_EXTENSION_NAME

The extension name.

VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSIONback to summary
public static final int VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOMback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOMback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOMback to summary
public static final int VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM

Extends VkStructureType.

Enum values:

Constructor Detail

QCOMImageProcessing2back to summary
private QCOMImageProcessing2()