Примечание.
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
The sample ProcAmpControlQueryCaps function allows the VMR to query the driver to determine input requirements of the ProcAmp control device and additional video processing operations that might be supported. The query can occur at the same time that the ProcAmp adjustments operation is being performed.
Syntax
HRESULT ProcAmpControlQueryCaps(
[in] DXVA_VideoDesc *lpVideoDescription,
[out] DXVA_ProcAmpControlCaps *lpProcAmpCaps
);
Parameters
lpVideoDescription [in] Supplies a pointer to a DXVA_VideoDesc structure that defines the ProcAmp control parameters for the video to be processed.
lpProcAmpCaps [out] Receives a pointer to a DXVA_ProcAmpControlCaps structure that contains the driver capabilities for ProcAmp control operations.
Return value
Returns zero (S_OK or DD_OK) if successful; otherwise, returns an error code. Refer to ddraw.h for a complete list of error codes.
Remarks
The driver reports its capabilities to a user-mode component for the ProcAmp control mode in the DXVA_ProcAmpControlCaps structure pointed to by lpProcAmpCaps.
The sample ProcAmpControlQueryCaps function maps directly to a call to the RenderMoComp member of the DD_MOTIONCOMPCALLBACKS structure. The RenderMoComp function points to the driver-supplied DdMoCompRender callback that references the DD_RENDERMOCOMPDATA structure. The DD_RENDERMOCOMPDATA structure is filled as follows.
| Member | Value |
|---|---|
dwNumBuffers |
Zero |
lpBufferInfo |
NULL |
dwFunction |
DXVA_ProcAmpControlQueryCapsFnCode constant (defined in dxva.h) |
lpInputData |
Pointer to a filled DXVA_VideoDesc structure. |
lpOutputData |
Pointer to a DXVA_ProcAmpControlCaps structure. |
Note that the RenderMoComp function will be called without the display driver-supplied BeginMoCompFrame or EndMoCompFrame function being called first.
Example Code
The following code provides an example of how you can implement your ProcAmpControlQueryCaps function:
HRESULT
DXVA_DeinterlaceContainerDeviceClass::ProcAmpControlQueryCaps(
LPDXVA_VideoDesc lpVideoDesc,
LPDXVA_ProcAmpControlCaps lpProcAmpControlCaps
)
{
// only the YUY2 and YV12 formats can be operated on
if (lpVideoDesc->d3dFormat != '2YUY' &&
lpVideoDesc->d3dFormat != '21VY') {
return E_INVALIDARG;
}
lpProcAmpControlCaps->InputPool = D3DPOOL_DEFAULT;
lpProcAmpControlCaps->d3dOutputFormat = lpVideoDesc->d3dFormat;
lpProcAmpControlCaps->ProcAmpControlProps =
DXVA_ProcAmp_Brightness |
DXVA_ProcAmp_Contrast |
DXVA_ProcAmp_Hue |
DXVA_ProcAmp_Saturation;
lpProcAmpControlCaps->VideoProcessingCaps = DXVA_VideoProcess_None;
return S_OK;
}
Requirements
Target platform |
Desktop |
Header |
N/A (Declared in a driver-supplied header file.) |