diff options
author | Pohsiang (John) Hsu <pohhsu@microsoft.com> | 2025-01-07 17:22:54 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2025-01-31 21:36:17 +0000 |
commit | 5b834e1666ab632df5e2828bc460acb79cd21fea (patch) | |
tree | cf07fdcc7cc3c82f84d89b5b7ca4ad83a7239456 | |
parent | 7cd9de460b1393402a78334001d37f873ae3d767 (diff) |
d3d12: use log2_max_pic_order_cnt_lsb_minus from upper layer
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33312>
-rw-r--r-- | src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp index 266fde38a33..5dd3659e3e5 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_enc_hevc.cpp @@ -656,16 +656,12 @@ d3d12_video_encoder_update_hevc_gop_configuration(struct d3d12_video_encoder *pD uint32_t GOPLength = picture->seq.intra_period; uint32_t PPicturePeriod = picture->seq.ip_period; - const uint32_t max_pic_order_cnt_lsb = MAX2(16, util_next_power_of_two(GOPLength)); - double log2_max_pic_order_cnt_lsb_minus4 = std::max(0.0, std::ceil(std::log2(max_pic_order_cnt_lsb)) - 4); - assert(log2_max_pic_order_cnt_lsb_minus4 < UCHAR_MAX); - // Set dirty flag if m_HEVCGroupOfPictures changed auto previousGOPConfig = pD3D12Enc->m_currentEncodeConfig.m_encoderGOPConfigDesc.m_HEVCGroupOfPictures; pD3D12Enc->m_currentEncodeConfig.m_encoderGOPConfigDesc.m_HEVCGroupOfPictures = { GOPLength, PPicturePeriod, - static_cast<uint8_t>(log2_max_pic_order_cnt_lsb_minus4) + picture->seq.log2_max_pic_order_cnt_lsb_minus4 }; if (memcmp(&previousGOPConfig, |