How to check video transfer matrix on DXVA video processing?

How can I confirm that IDirectXVideoProcessor::VideoProcessBlt works correct with video transfer matrix

I use the "DXVA2_VideoProc" sample in the Windows SDKs. I can't see any difference with pressing F1-F4 keys on the sample.

I think the output RGB should change when the VideoTransferMatrix and NominalRange parameter of DXVA2_ExtendedFormat are changed, but the color of output is always below.

(Y,U,V) = (0x51,0x5A,0xF0) (to be red) -> (R, G, B) = (0xF0, 0x10, 0x0F) (Screen captured)

I'm using ATI Radeon X1600 and Beta2 Inboxed driver.

Questions:

1) The output RGB should be changed by changing DXVA2_ExtendedFormat parameters. Is it correct

2) It seem the graphic driver hasn't implemented this feature yet. Should I wait for Vista RC1 for checking



Answer this question

How to check video transfer matrix on DXVA video processing?

  • LDeLeon

    K.K,

    First of all, to determine whether the driver supports extended color information, look for the DXVA2_VideoProcess_YUV2RGBExtended cap that is returned from IDirectXVideoProcessorService::GetVideoProcessorCaps method. If the cap is not present, the driver should not expect to honor the extended color information for the color space conversion operations.

    If the cap is supported, the exended color info needs to be set on both the input parameters (in DXVA2_VideoSample.SampleFormat) as well as the output (DXVA2_VideoProcessBltParams.DestFormat). Currently, it seems that the drivers limit support of extended color info only to "intra-standard" calls - YUV -> RGB conversions are supported as long as the color primaries, transfer matrix and the transfer function (gamma) all match between input and output formats, or when the output color space is sRGB (ie. no BT.601 -> BT.709 or vice-versa processing is supported).

    It seems that the current sample (Beta2 SDK) does not check the presence of the DXVA2_VideoProcess_YUV2RGBExtended or the DXVA2_VideoProcess_SubStreamsExtended caps. However, it's good practice to set the extended color information regardless of the existence of these caps - the EVR, for instance, always does so.

    To answer your second question, we've noticed that, indeed, drivers do not fully support yet extended color information processing, although IHVs are actively working on this matter. While waiting for RC1 drivers, you could also try using the software video processor (DXVA2_VideoProcSoftwareDevice, defined in DXVA2API.h) - it supports the most common video standards. The updated sample that will be available with the RC1 SDK supports the software video processor and the effect of different color settings can be noticed in its output.

    Hope this helps,

    Dragos


  • IIM

    Hello Dragos,

    Thank you for your reply.

    Now I can check the function of extended color info with DXVA2_VideoProcSoftwareDevice.

    I checked the video processor caps of hardware device. The VideoProcessorOperations parameter of the caps has DXVA2_VideoProcess_YUV2RGBExtended bit, but there is no function that software device has.

    HW's caps are:

    DXVA2_VideoProcess_YUV2RGB

    DXVA2_VideoProcess_StretchX

    DXVA2_VideoProcess_StretchY

    DXVA2_VideoProcess_SubRects

    DXVA2_VideoProcess_SubStreams

    DXVA2_VideoProcess_YUV2RGBExtended

    I'll check on RC1 with HW device.

    Thanks!


  • How to check video transfer matrix on DXVA video processing?