mfplat: Add MFConvertColorInfoToDXVA().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6aeb891d52
commit
1614769407
|
@ -23,6 +23,7 @@
|
|||
#include "initguid.h"
|
||||
#include "ks.h"
|
||||
#include "ksmedia.h"
|
||||
#include "dxva2api.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -2748,3 +2749,36 @@ HRESULT WINAPI MFCreateMFVideoFormatFromMFMediaType(IMFMediaType *media_type, MF
|
|||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MFConvertColorInfoToDXVA (mfplat.@)
|
||||
*/
|
||||
HRESULT WINAPI MFConvertColorInfoToDXVA(DWORD *dxva_info, const MFVIDEOFORMAT *format)
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT SampleFormat : 8;
|
||||
UINT VideoChromaSubsampling : 4;
|
||||
UINT NominalRange : 3;
|
||||
UINT VideoTransferMatrix : 3;
|
||||
UINT VideoLighting : 4;
|
||||
UINT VideoPrimaries : 5;
|
||||
UINT VideoTransferFunction : 5;
|
||||
} *dxva_format = (void *)dxva_info;
|
||||
|
||||
TRACE("%p, %p.\n", dxva_info, format);
|
||||
|
||||
if (format->videoInfo.InterlaceMode == MFVideoInterlace_MixedInterlaceOrProgressive)
|
||||
dxva_format->SampleFormat = DXVA2_SampleFieldInterleavedEvenFirst;
|
||||
else
|
||||
dxva_format->SampleFormat = format->videoInfo.InterlaceMode;
|
||||
|
||||
dxva_format->VideoChromaSubsampling = format->videoInfo.SourceChromaSubsampling;
|
||||
dxva_format->NominalRange = format->videoInfo.NominalRange;
|
||||
dxva_format->VideoTransferMatrix = format->videoInfo.TransferMatrix;
|
||||
dxva_format->VideoLighting = format->videoInfo.SourceLighting;
|
||||
dxva_format->VideoPrimaries = format->videoInfo.ColorPrimaries;
|
||||
dxva_format->VideoTransferFunction = format->videoInfo.TransferFunction;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
@ stdcall MFCompareFullToPartialMediaType(ptr ptr)
|
||||
@ stub MFCompareSockaddrAddresses
|
||||
@ stub MFConvertColorInfoFromDXVA
|
||||
@ stub MFConvertColorInfoToDXVA
|
||||
@ stdcall MFConvertColorInfoToDXVA(ptr ptr)
|
||||
@ stub MFConvertFromFP16Array
|
||||
@ stub MFConvertToFP16Array
|
||||
@ stdcall MFCopyImage(ptr long ptr long long long)
|
||||
|
|
|
@ -494,6 +494,7 @@ HRESULT WINAPI MFCalculateImageSize(REFGUID subtype, UINT32 width, UINT32 height
|
|||
HRESULT WINAPI MFCancelCreateFile(IUnknown *cancel_cookie);
|
||||
HRESULT WINAPI MFCancelWorkItem(MFWORKITEM_KEY key);
|
||||
BOOL WINAPI MFCompareFullToPartialMediaType(IMFMediaType *full_type, IMFMediaType *partial_type);
|
||||
HRESULT WINAPI MFConvertColorInfoToDXVA(DWORD *dxva_info, const MFVIDEOFORMAT *format);
|
||||
HRESULT WINAPI MFCopyImage(BYTE *dest, LONG deststride, const BYTE *src, LONG srcstride, DWORD width, DWORD lines);
|
||||
HRESULT WINAPI MFCreate2DMediaBuffer(DWORD width, DWORD height, DWORD fourcc, BOOL bottom_up, IMFMediaBuffer **buffer);
|
||||
HRESULT WINAPI MFCreateAlignedMemoryBuffer(DWORD max_length, DWORD alignment, IMFMediaBuffer **buffer);
|
||||
|
|
Loading…
Reference in New Issue