d3d12: Use pipe_h264_enc_seq_param.max_num_ref_frames instead of pipe_video_codec.max_references in SPS
Reviewed-By: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31017>
This commit is contained in:
@@ -1130,7 +1130,6 @@ d3d12_video_encoder_build_codec_headers_h264(struct d3d12_video_encoder *pD3D12E
|
||||
|
||||
auto levelDesc = d3d12_video_encoder_get_current_level_desc(pD3D12Enc);
|
||||
auto codecConfigDesc = d3d12_video_encoder_get_current_codec_config_desc(pD3D12Enc);
|
||||
auto MaxDPBCapacity = d3d12_video_encoder_get_current_max_dpb_capacity(pD3D12Enc);
|
||||
|
||||
d3d12_video_bitstream_builder_h264 *pH264BitstreamBuilder =
|
||||
static_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
|
||||
@@ -1164,7 +1163,6 @@ d3d12_video_encoder_build_codec_headers_h264(struct d3d12_video_encoder *pD3D12E
|
||||
*codecConfigDesc.pH264Config,
|
||||
pD3D12Enc->m_currentEncodeConfig.m_encoderGOPConfigDesc.m_H264GroupOfPictures,
|
||||
active_seq_parameter_set_id,
|
||||
MaxDPBCapacity, // max_num_ref_frames
|
||||
pD3D12Enc->m_currentEncodeConfig.m_currentResolution,
|
||||
pD3D12Enc->m_currentEncodeConfig.m_FrameCroppingCodecConfig,
|
||||
pD3D12Enc->m_BitstreamHeadersBuffer,
|
||||
|
@@ -61,7 +61,6 @@ d3d12_video_bitstream_builder_h264::build_sps(const struct pipe_h264_enc_seq_par
|
||||
const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264 & codecConfig,
|
||||
const D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_H264 &gopConfig,
|
||||
uint32_t seq_parameter_set_id,
|
||||
uint32_t max_num_ref_frames,
|
||||
D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC sequenceTargetResolution,
|
||||
D3D12_BOX frame_cropping_codec_config,
|
||||
std::vector<uint8_t> & headerBitstream,
|
||||
@@ -110,7 +109,7 @@ d3d12_video_bitstream_builder_h264::build_sps(const struct pipe_h264_enc_seq_par
|
||||
gopConfig.log2_max_frame_num_minus4,
|
||||
gopConfig.pic_order_cnt_type,
|
||||
gopConfig.log2_max_pic_order_cnt_lsb_minus4,
|
||||
max_num_ref_frames,
|
||||
seqData.max_num_ref_frames,
|
||||
0, // gaps_in_frame_num_value_allowed_flag
|
||||
pic_width_in_mbs_minus1,
|
||||
pic_height_in_map_units_minus1,
|
||||
|
@@ -41,7 +41,6 @@ class d3d12_video_bitstream_builder_h264 : public d3d12_video_bitstream_builder_
|
||||
const D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_H264 & codecConfig,
|
||||
const D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_H264 &gopConfig,
|
||||
uint32_t seq_parameter_set_id,
|
||||
uint32_t max_num_ref_frames,
|
||||
D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC sequenceTargetResolution,
|
||||
D3D12_BOX frame_cropping_codec_config,
|
||||
std::vector<uint8_t> & headerBitstream,
|
||||
|
Reference in New Issue
Block a user