Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes the output buffers and fences used for subregion notification during video encoding.
Syntax
typedef struct D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM {
D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE BufferMode;
UINT ExpectedSubregionCount;
UINT64 *pSubregionBitstreamsBaseOffsets;
ID3D12Resource **ppSubregionBitstreams;
ID3D12Resource **ppSubregionSizes;
ID3D12Resource **ppSubregionOffsets;
ID3D12Fence **ppSubregionFences;
UINT64 *pSubregionFenceValues;
} D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM;
Members
BufferMode
A D3D12_VIDEO_ENCODER_SUBREGION_COMPRESSED_BITSTREAM_BUFFER_MODE value indicating how the output buffers in ppSubregionBitstreams are interpreted and used.
ExpectedSubregionCount
The number of expected subregions. All array members of this struct have this many entries. When the exact number of subregions is not known before execution (for example, max bytes per slice), set this to the maximum number of subregions expected.
pSubregionBitstreamsBaseOffsets
An array of ExpectedSubregionCount UINT64 values indicating base offsets where the driver begins writing at each ppSubregionBitstreams[i]. Values must be aligned to the CompressedBitstreamBufferAccessAlignment value reported in D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS.
ppSubregionBitstreams
An array of ExpectedSubregionCount ID3D12Resource buffers for the driver to write subregion bitstream data into.
ppSubregionSizes
An array of ExpectedSubregionCount ID3D12Resource buffers. On each subregion completion, the driver writes the byte size of the i-th packed subregion as a UINT64.
ppSubregionOffsets
An array of ExpectedSubregionCount ID3D12Resource buffers. On each subregion completion, the driver writes the absolute byte offset into ppSubregionBitstreams[i] as a UINT64, where the i-th subregion first byte starts.
ppSubregionFences
An array of ExpectedSubregionCount ID3D12Fence objects. The driver signals ppSubregionFences[i] when the associated subregion output is complete and accessible.
pSubregionFenceValues
An array of ExpectedSubregionCount UINT64 values. pSubregionFenceValues[i] is the value the driver uses to signal ppSubregionFences[i].
Remarks
When ppSubregionFences[i] is signaled, all pending writes and cache flushes to the associated ppSubregionBitstreams[i], ppSubregionSizes[i], and ppSubregionOffsets[i] are guaranteed to be complete.
The driver may write subregions out of order. The application must wait on fences without assuming a specific notification order.
Requirements
| Requirement | Value |
|---|---|
| Header | d3d12video.h |