PFND3DWDDM2_0DDI_DECODEJPEG callback function
The pfnDecodeJpeg callback function is used to queue an asynchronous decode to the target texture.
Syntax
PFND3DWDDM2_0DDI_DECODEJPEG pfnDecodeJpeg;
VOID APIENTRY* pfnDecodeJpeg(
D3D10DDI_HDEVICE hDevice,
_In_ const D3DWDDM2_0DDIARG_DECODE_JPEG *pParameters,
D3D10DDI_HRESOURCE DestinationTexture2D,
_In_opt_ const UINT *DestinationSubresources,
_In_opt_ const D3D10_DDI_BOX *DestinationBoxes,
UINT NumDestinations,
D3D10DDI_HRESOURCE ScanDataBuffer,
UINT ScanDataOffset,
UINT CopyFlags
)
{ ... }
Parameters
hDevice
The device handle.pParameters [in]
A populated D3DWDDM2_0DDIARG_DECODE_JPEG decode structure.DestinationTexture2D
The destination 2D output texture. The texture format will match the SourceChromaSubsampling specified in pParameters except when decoding to an RGBA subresource or when decoding to three separate planes in an 8bpc resource.DestinationSubresources [in, optional]
An array of subresource indices indicating which subresource to place the DestinationBoxes output. A destination subresource must be mip level 0 for a given array index. NumDestinations may be 0, 1, or 3. When NumDestinations is 0, the DestinationSubresources will be NULL which indicates subresource 0. Otherwise, NumDestinations is typically 1 except when using a D3DWDDM2_0DDI_JPEG_DECODE_TIER3 feature to decode as three separate planes in an 8bpc subresource.DestinationBoxes [in, optional]
Indicates the 2D destination position and size. A difference between the output width or height and the source width or height implies a scale. The Direct3D runtime validates that the scale factor implied by the destination region is supported and does not call the user mode driver with unsupported scale factors.When NumDestinations is 0, DesinationBoxes will be NULL which indicates the output size is the same as the dimensions of the Destination subresource. With D3DWDDM2_0DDI_JPEG_DECODE_TIER_1 and D3DWDDM2_0DDI_JPEG_DECODE_TIER_2, this parameter is NULL or matches the dimensions of the output texture.
For D3DWDDM2_0DDI_JPEG_DECODE_TIER_3, NumDestinations may be 3 for a YCbCr JPEG which specifies 3 destination boxes within an 8bpc resource to place the 3 planes of Y, Cb, and CR.
NumDestinations
Indicates the number of destination subresources and output boxes are specified.ScanDataBuffer
A buffer containing the compressed JPEG scan data.ScanDataOffset
The BYTE offset within the ScanDataBuffer member to the beginning of the JPEG scan data. Multiple JPEGs may be stored within a single buffer.CopyFlags
D3D11_1_DDI_COPY_FLAGS used for updating the resource.
Return value
This callback function does not return a value.
Requirements
Minimum supported client |
Windows 10 |
Minimum supported server |
Windows Server 2016 |
Target platform |
Desktop |
Header |
D3d10umddi.h (include D3d10umddi.h) |
See also