mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
mediafoundation: Cleanup MaxL1References variables
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38057>
This commit is contained in:
parent
4b75fcac47
commit
e873beb33c
6 changed files with 4 additions and 20 deletions
|
|
@ -1083,14 +1083,12 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
{
|
||||
HRESULT hr = S_OK;
|
||||
uint32_t MaxHWL0Ref = m_EncoderCapabilities.m_uiMaxHWSupportedL0References;
|
||||
uint32_t MaxHWL1Ref = m_EncoderCapabilities.m_uiMaxHWSupportedL1References;
|
||||
MaxHWL0Ref = std::min( 1u, MaxHWL0Ref ); // we only support 1
|
||||
MaxHWL1Ref = 0;
|
||||
std::unique_ptr<dpb_buffer_manager> upTwoPassDPBManager;
|
||||
|
||||
SAFE_DELETE( m_pGOPTracker );
|
||||
// B Frame not supported by HW
|
||||
CHECKBOOL_GOTO( ( m_uiBFrameCount == 0 ) || ( MaxHWL1Ref > 0 ), E_INVALIDARG, done );
|
||||
// B Frame not supported
|
||||
CHECKBOOL_GOTO( ( m_uiBFrameCount == 0 ), E_INVALIDARG, done );
|
||||
// Requested number of temporal layers higher than max supported by HW
|
||||
CHECKBOOL_GOTO( m_uiLayerCount <= m_EncoderCapabilities.m_uiMaxTemporalLayers, MF_E_OUT_OF_RANGE, done );
|
||||
// Validate logic expression (m_uiLayerCount > 1) => (m_uiBFrameCount == 0)
|
||||
|
|
@ -1112,7 +1110,6 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
assert( m_uiMaxNumRefFrame == m_pPipeVideoCodec->max_references );
|
||||
assert( 1 + m_uiMaxLongTermReferences <= m_uiMaxNumRefFrame );
|
||||
assert( MaxHWL0Ref <= m_uiMaxNumRefFrame );
|
||||
assert( MaxHWL1Ref <= m_uiMaxNumRefFrame );
|
||||
|
||||
if( m_pPipeVideoCodec->two_pass.enable && ( m_pPipeVideoCodec->two_pass.pow2_downscale_factor > 0 ) )
|
||||
{
|
||||
|
|
@ -1135,7 +1132,6 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
m_uiLayerCount,
|
||||
m_bLowLatency,
|
||||
MaxHWL0Ref,
|
||||
MaxHWL1Ref,
|
||||
m_pPipeVideoCodec->max_references,
|
||||
m_uiMaxLongTermReferences,
|
||||
m_gpuFeatureFlags.m_bH264SendUnwrappedPOC,
|
||||
|
|
|
|||
|
|
@ -924,14 +924,12 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
{
|
||||
HRESULT hr = S_OK;
|
||||
uint32_t MaxHWL0Ref = m_EncoderCapabilities.m_uiMaxHWSupportedL0References;
|
||||
uint32_t MaxHWL1Ref = m_EncoderCapabilities.m_uiMaxHWSupportedL1References;
|
||||
MaxHWL0Ref = std::min( 1u, MaxHWL0Ref ); // we only support 1
|
||||
MaxHWL1Ref = 0;
|
||||
std::unique_ptr<dpb_buffer_manager> upTwoPassDPBManager;
|
||||
|
||||
SAFE_DELETE( m_pGOPTracker );
|
||||
// B Frame not supported by HW
|
||||
CHECKBOOL_GOTO( ( m_uiBFrameCount == 0 ) || ( MaxHWL1Ref > 0 ), E_INVALIDARG, done );
|
||||
// B Frame not supported
|
||||
CHECKBOOL_GOTO( ( m_uiBFrameCount == 0 ), E_INVALIDARG, done );
|
||||
// Requested number of temporal layers higher than max supported by HW
|
||||
CHECKBOOL_GOTO( m_uiLayerCount <= m_EncoderCapabilities.m_uiMaxTemporalLayers, MF_E_OUT_OF_RANGE, done );
|
||||
// Validate logic expression (m_uiLayerCount > 1) => (m_uiBFrameCount == 0)
|
||||
|
|
@ -953,7 +951,6 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
assert( m_uiMaxNumRefFrame == m_pPipeVideoCodec->max_references );
|
||||
assert( 1 + m_uiMaxLongTermReferences <= m_uiMaxNumRefFrame );
|
||||
assert( MaxHWL0Ref <= m_uiMaxNumRefFrame );
|
||||
assert( MaxHWL1Ref <= m_uiMaxNumRefFrame );
|
||||
|
||||
if( m_pPipeVideoCodec->two_pass.enable && ( m_pPipeVideoCodec->two_pass.pow2_downscale_factor > 0 ) )
|
||||
{
|
||||
|
|
@ -976,7 +973,6 @@ CDX12EncHMFT::CreateGOPTracker( uint32_t textureWidth, uint32_t textureHeight )
|
|||
m_uiLayerCount,
|
||||
m_bLowLatency,
|
||||
MaxHWL0Ref,
|
||||
MaxHWL1Ref,
|
||||
m_pPipeVideoCodec->max_references,
|
||||
m_uiMaxLongTermReferences,
|
||||
std::move( upTwoPassDPBManager ) );
|
||||
|
|
|
|||
|
|
@ -41,14 +41,12 @@ reference_frames_tracker_h264::reference_frames_tracker_h264( struct pipe_video_
|
|||
uint32_t layerCount,
|
||||
bool bLowLatency,
|
||||
uint32_t MaxL0References,
|
||||
uint32_t MaxL1References,
|
||||
uint32_t MaxDPBCapacity,
|
||||
uint32_t MaxLongTermReferences,
|
||||
bool bSendUnwrappedPOC,
|
||||
std::unique_ptr<dpb_buffer_manager> upTwoPassDPBManager )
|
||||
: m_codec( codec ),
|
||||
m_MaxL0References( MaxL0References ),
|
||||
m_MaxL1References( MaxL1References ),
|
||||
m_MaxDPBCapacity( MaxDPBCapacity ),
|
||||
m_MaxLongTermReferences( MaxLongTermReferences ),
|
||||
m_bSendUnwrappedPOC( bSendUnwrappedPOC ),
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ class reference_frames_tracker_h264 : public reference_frames_tracker
|
|||
uint32_t layerCount,
|
||||
bool bLowLatency,
|
||||
uint32_t MaxL0References,
|
||||
uint32_t MaxL1References,
|
||||
uint32_t MaxDPBCapacity,
|
||||
uint32_t MaxLongTermReferences,
|
||||
bool bSendUnwrappedPOC,
|
||||
|
|
@ -136,7 +135,6 @@ class reference_frames_tracker_h264 : public reference_frames_tracker
|
|||
reference_frames_tracker_frame_descriptor_h264 m_frame_state_descriptor = {};
|
||||
|
||||
uint32_t m_MaxL0References = 0;
|
||||
uint32_t m_MaxL1References = 0;
|
||||
uint32_t m_MaxDPBCapacity = 0;
|
||||
uint32_t m_MaxLongTermReferences = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,13 +39,11 @@ reference_frames_tracker_hevc::reference_frames_tracker_hevc( struct pipe_video_
|
|||
uint32_t layerCount,
|
||||
bool bLowLatency,
|
||||
uint32_t MaxL0References,
|
||||
uint32_t MaxL1References,
|
||||
uint32_t MaxDPBCapacity,
|
||||
uint32_t MaxLongTermReferences,
|
||||
std::unique_ptr<dpb_buffer_manager> upTwoPassDPBManager )
|
||||
: m_codec( codec ),
|
||||
m_MaxL0References( MaxL0References ),
|
||||
m_MaxL1References( MaxL1References ),
|
||||
m_MaxDPBCapacity( MaxDPBCapacity ),
|
||||
m_MaxLongTermReferences( MaxLongTermReferences ),
|
||||
m_DPBManager(
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ class reference_frames_tracker_hevc : public reference_frames_tracker
|
|||
uint32_t layerCount,
|
||||
bool bLowLatency,
|
||||
uint32_t MaxL0References,
|
||||
uint32_t MaxL1References,
|
||||
uint32_t MaxDPBCapacity,
|
||||
uint32_t MaxLongTermReferences,
|
||||
std::unique_ptr<dpb_buffer_manager> upTwoPassDPBManager = nullptr );
|
||||
|
|
@ -123,7 +122,6 @@ class reference_frames_tracker_hevc : public reference_frames_tracker
|
|||
reference_frames_tracker_frame_descriptor_hevc m_frame_state_descriptor = {};
|
||||
|
||||
uint32_t m_MaxL0References = 0;
|
||||
uint32_t m_MaxL1References = 0;
|
||||
uint32_t m_MaxDPBCapacity = 0;
|
||||
uint32_t m_MaxLongTermReferences = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue