// d3d12umddi.h
typedef struct D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_0082_0 {
D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS_0080 Flags;
D3D12DDI_VIDEO_ENCODER_FRAME_TYPE_H264_0080 FrameType;
UINT pic_parameter_set_id;
UINT idr_pic_id;
UINT PictureOrderCountNumber;
UINT FrameDecodingOrderNumber;
UINT TemporalLayerIndex;
UINT List0ReferenceFramesCount;
UINT *pList0ReferenceFrames;
UINT List1ReferenceFramesCount;
UINT *pList1ReferenceFrames;
UINT ReferenceFramesReconPictureDescriptorsCount;
D3D12DDI_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_H264_0080 *pReferenceFramesReconPictureDescriptors;
UCHAR adaptive_ref_pic_marking_mode_flag;
UINT RefPicMarkingOperationsCommandsCount;
D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_MARKING_OPERATION_0082_0 *pRefPicMarkingOperationsCommands;
UINT List0RefPicModificationsCount;
D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION_0082_0 *pList0RefPicModifications;
UINT List1RefPicModificationsCount;
D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION_0082_0 *pList1RefPicModifications;
UINT QPMapValuesCount;
INT8 *pRateControlQPMap;
} D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_0082_0;
View the official Windows Driver Kit DDI referenceNo description available.
The D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_0082_0 structure describes the picture-level control elements for the associated EncodeFrame command for H.264 encoding.
FlagsA D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_FLAGS_0080 value that specifies the configuration flags for this frame that is to be encoded. Flags can be combined.
FrameTypeA D3D12DDI_VIDEO_ENCODER_FRAME_TYPE_H264_0080 value that sets the picture type. Check that the codec-specific flags support the type before selecting a value.
[!NOTE]
FrameType must be kept in sync with the group of pictures (GOP) structure configuration set by the host. The GOP is defined in display order. The picture type selection must follow the GOP but in encode order.
pic_parameter_set_idValue used in the slice headers of the current frame to reference the picture parameter set (PPS).
idr_pic_idWhen the frame is of type D3D12DDI_VIDEO_ENCODER_FRAME_TYPE_H264_0080_IDR_FRAME, idr_pic_id identifies the Instantaneous Decoder Refresh (IDR) frame to be used in all the slices headers present in the frame.
PictureOrderCountNumberThe current frame display order.
FrameDecodingOrderNumberThe frame decode order with semantics indicated by the slice header frame_num element that increments after each reference picture.
TemporalLayerIndexThe picture layer number in temporal hierarchy. Check D3D12DDI_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_0082_0 for the maximum number of layers.
List0ReferenceFramesCountThe number of past frame references to be used for this frame. This value should be coherent with what was exposed in D3D12DDI_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_0082_0.
pList0ReferenceFramesPointer to the list of past frame reference frames to be used for this frame. Each integer value in this array indexes into pReferenceFramesReconPictureDescriptors to reference pictures kept in the decoded picture buffer (DPB).
List1ReferenceFramesCountThe number of future frame references to be used for this frame. This value should be coherent with what was exposed in D3D12DDI_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_H264_0082_0.
pList1ReferenceFramesPointer to the list of future frame reference frames to be used for this frame. Each integer value in this array indexes into pReferenceFramesReconPictureDescriptors to reference pictures kept in the DPB.
ReferenceFramesReconPictureDescriptorsCountThe number of entries in pReferenceFramesReconPictureDescriptors.
pReferenceFramesReconPictureDescriptorsPointer to a D3D12DDI_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_H264_0080 structure that describes the current state of the DPB buffer kept in D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_DESC_0082_0.ReferenceFrames. The L0/L1 lists indices map from past/future references into this descriptors array.
In turn, this array of descriptors maps a reference picture for this frame into a resource index in the D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_DESC_0082_0.ReferenceFrames reconstructed pictures array. Additionally, for each reference picture it indicates the encode and display order number and whether it is a long term reference.
The size of this array matches D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_DESC_0082_0.ReferenceFrames.NumTextures for the associated EncodeFrame command.
adaptive_ref_pic_marking_mode_flagDefines a semantic mode for the frame reference handling. This flag can be one of the following values.
| Value | Reference picture marking mode |
|---|---|
| 0 | Sliding window reference picture marking mode: A marking mode providing a first-in first-out mechanism for short-term reference pictures. |
| 1 | Adaptive reference picture marking mode: A reference picture marking mode providing syntax elements to specify marking of reference pictures as "unused for reference" and to assign long-term frame indices. |
RefPicMarkingOperationsCommandsCountNumber of reference pictures marking operations associated with the current frame. This member requires that adaptive_ref_pic_marking_mode_flag be set to 1.
pRefPicMarkingOperationsCommandsPointer to D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_MARKING_OPERATION_0082_0 structure that contains a list of RefPicMarkingOperationsCommandsCount reference pictures marking operations associated with the current frame. This member requires that adaptive_ref_pic_marking_mode_flag be set to 1.
The operations described by this list must be reflected in the DPB descriptors accordingly during the encoding session.
List0RefPicModificationsCountThe number of list modifications for the L0 list.
pList0RefPicModificationsPointer to a D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION_0082_0 structure that contains List0RefPicModificationsCount modification commands for the L0 list.
List1RefPicModificationsCountThe number of list modifications for the L1 list.
pList1RefPicModificationsPointer to a D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_H264_REFERENCE_PICTURE_LIST_MODIFICATION_OPERATION_0082_0 structure that contains List1RefPicModificationsCount modification commands for the L1 list.
QPMapValuesCountThe number of elements present in the array that pRateControlQPMap points to. This value should match the number of coding blocks in the frame, rounding up the frame resolution to the closest aligned values.
pRateControlQPMapPointer to an array that contains, in row/column scan order, the quantization parameter (QP) map values to use on each squared region for this frame. The QP map dimensions can be calculated using the current resolution and D3D12DDI_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS_0080_2.QPMapRegionPixelsSize conveying the squared region sizes.
If the current frame is marked as a reference picture, the output must contain the reconstructed picture along with the bitstream for the host to place it in future commands in the reconstructed pictures reference list. Note that there might be limitations for some frame types to be marked as references, so check feature support before setting those values.
See D3D12 video encoding for general information.
D3D12DDI_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_0082_0