mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
mediafoundation: return adjusted LTR frame (need to remove one for short term)
Reviewed-by: Yubo Xie <yuboxie@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37479>
This commit is contained in:
parent
c3ca12af11
commit
04192362e5
1 changed files with 8 additions and 1 deletions
|
|
@ -675,7 +675,14 @@ CDX12EncHMFT::GetParameterValues( const GUID *Api, VARIANT **Values, ULONG *Valu
|
|||
}
|
||||
else if( *Api == CODECAPI_AVEncVideoLTRBufferControl )
|
||||
{
|
||||
*ValuesCount = m_EncoderCapabilities.m_uiMaxHWSupportedLongTermReferences + 1;
|
||||
// reserve one dpb spot for short term reference frame.
|
||||
// when m_EncoderCapabilities.m_uiMaxHWSupportedLongTermReferences = m_EncoderCapabilities.m_uiMaxHWSupportedDPBCapacity, we subtract one.
|
||||
ULONG numSupportedLTR = m_EncoderCapabilities.m_uiMaxHWSupportedLongTermReferences;
|
||||
if( numSupportedLTR > 0 && numSupportedLTR == m_EncoderCapabilities.m_uiMaxHWSupportedDPBCapacity )
|
||||
{
|
||||
numSupportedLTR -= 1;
|
||||
}
|
||||
*ValuesCount = numSupportedLTR + 1;
|
||||
CHECKNULL_GOTO( *Values = (VARIANT *) CoTaskMemAlloc( ( *ValuesCount ) * sizeof( VARIANT ) ), E_OUTOFMEMORY, done );
|
||||
for( ULONG i = 0; i < *ValuesCount; i++ )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue