mediafoundation: rename VideoEncodeReconstructedPicture to VideoEncodeD3D12ReconstructedPicture
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39273>
This commit is contained in:
Pohsiang (John) Hsu 2026-01-09 14:33:08 -08:00 committed by Marge Bot
parent 5a476e232c
commit 2eb3b397bf
4 changed files with 38 additions and 18 deletions

View file

@ -266,9 +266,9 @@ StringFromCodecAPI( const GUID *Api )
{
return "CODECAPI_AVEncVideoSatdMapBlockSize";
}
else if( *Api == CODECAPI_AVEncVideoReconstructedPictureOutputMode )
else if( *Api == CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode )
{
return "CODECAPI_AVEncVideoReconstructedPictureOutputMode";
return "CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode";
}
else if( *Api == CODECAPI_AVEncVideoRateControlFramePreAnalysis )
{
@ -450,7 +450,7 @@ CDX12EncHMFT::IsSupported( const GUID *Api )
if( m_EncoderCapabilities.m_bHWSupportReadableReconstructedPicture )
{
if( *Api == CODECAPI_AVEncVideoReconstructedPictureOutputMode )
if( *Api == CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode )
{
hr = S_OK;
return hr;
@ -919,7 +919,7 @@ CDX12EncHMFT::GetValue( const GUID *Api, VARIANT *Value )
Value->vt = VT_UI4;
Value->ulVal = m_bVideoEnableFramePsnrYuv;
}
else if( *Api == CODECAPI_AVEncVideoReconstructedPictureOutputMode )
else if( *Api == CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode )
{
Value->vt = VT_UI4;
Value->ulVal = (UINT32) m_VideoReconstructedPictureMode;
@ -1688,7 +1688,7 @@ CDX12EncHMFT::SetValue( const GUID *Api, VARIANT *Value )
}
m_bVideoEnableFramePsnrYuv = Value->ulVal ? TRUE : FALSE;
}
else if( *Api == CODECAPI_AVEncVideoReconstructedPictureOutputMode )
else if( *Api == CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode )
{
debug_printf( "[dx12 hmft 0x%p] SET CODECAPI_AVEncVideoReconstructedPictureOutputMode - %u\n", this, Value->ulVal );
if( Value->vt != VT_UI4 )

View file

@ -548,7 +548,7 @@ CDX12EncHMFT::PrepareForEncode( IMFSample *pSample, LPDX12EncodeContext *ppDX12E
{
CHECKHR_GOTO( stats_buffer_manager::Create( this,
m_spDevice.Get(),
MFSampleExtension_VideoEncodeReconstructedPicture,
MFSampleExtension_VideoEncodeD3D12ReconstructedPicture,
pDX12EncodeContext->pPipeVideoBuffer->width,
static_cast<uint16_t>( pDX12EncodeContext->pPipeVideoBuffer->height ),
pDX12EncodeContext->pPipeVideoBuffer->buffer_format,

View file

@ -350,17 +350,37 @@ DEFINE_GUID( MFSampleExtension_VideoEncodeSatdMap, 0xadf61d96, 0xc2d3, 0x4b57, 0
#endif
// MFSampleExtension_VideoEncodeReconstructedPicture {3E8A1B7F-5C92-4D6E-B834-F0A729E65C48}
// Type: IMFMediaBuffer
// The reconstructed picture data of an encoded video frame (Experimental).
DEFINE_GUID(
MFSampleExtension_VideoEncodeReconstructedPicture, 0x3e8a1b7f, 0x5c92, 0x4d6e, 0xb8, 0x34, 0xf0, 0xa7, 0x29, 0xe6, 0x5c, 0x48 );
#ifndef CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode
#ifndef CODECAPI_AVEncVideoReconstructedPictureOutputMode
// AVEncVideoReconstructedPictureOutputMode (VT_UI4) (Experimental, Testing only)
// Specifies the reconstructed picture output mode for video encoding.
// 0: disable; 1: blit copy; 2: read-only shared resource
DEFINE_CODECAPI_GUID( AVEncVideoReconstructedPictureOutputMode,
// MFSampleExtension_VideoEncodeD3D12ReconstructedPicture {3E8A1B7F-5C92-4D6E-B834-F0A729E65C48}
// Type: IMFMediaBuffer
// The reconstructed picture data of an encoded video frame from a D3D12-based MFT (Experimental).
DEFINE_GUID( MFSampleExtension_VideoEncodeD3D12ReconstructedPicture,
0x3e8a1b7f,
0x5c92,
0x4d6e,
0xb8,
0x34,
0xf0,
0xa7,
0x29,
0xe6,
0x5c,
0x48 );
enum eAVEncVideoD3D12ReconstructedPictureOutputMode
{
eAVEncVideoEncodeD3D12ReconstructedPictureMode_None = 0, // Does not return a D3D12 reconstructed buffer.
eAVEncVideoEncodeD3D12ReconstructedPictureMode_Copy =
1, // Returns a copy of the D3D12 reconstructed buffer used by the encoder.
eAVEncVideoEncodeD3D12ReconstructedPictureMode_Shared =
2 // Returns the D3D12 reconstructed buffer written by the encoder without a copy.
};
// AVEncVideoD3D12ReconstructedPictureOutputMode (VT_UI4) (Experimental, Testing only)
// This property controls the output of D3D12 reconstructed picture data from a D3D12-based encoder.
// ulVal must be a value from the eAVEncVideoD3D12ReconstructedPictureOutputMode enumeration.
DEFINE_CODECAPI_GUID( AVEncVideoD3D12ReconstructedPictureOutputMode,
"4A7B2E8F-1D93-4C6A-B548-91E2F8C5A7D3",
0x4a7b2e8f,
0x1d93,
@ -373,7 +393,7 @@ DEFINE_CODECAPI_GUID( AVEncVideoReconstructedPictureOutputMode,
0xc5,
0xa7,
0xd3 )
#define CODECAPI_AVEncVideoReconstructedPictureOutputMode DEFINE_CODECAPI_GUIDNAMED( AVEncVideoReconstructedPictureOutputMode )
#define CODECAPI_AVEncVideoD3D12ReconstructedPictureOutputMode DEFINE_CODECAPI_GUIDNAMED( AVEncVideoD3D12ReconstructedPictureOutputMode )
#endif

View file

@ -1225,7 +1225,7 @@ CDX12EncHMFT::ConfigureAsyncStatsMetadataOutputSampleAttributes( IMFSample *pSam
pPipeResourceReconstructedPicture,
PipeResourceReconstructedPictureSubresource,
pSyncObjectQueue,
MFSampleExtension_VideoEncodeReconstructedPicture,
MFSampleExtension_VideoEncodeD3D12ReconstructedPicture,
pSample ),
done );
}