none
Degamma video output for use as linear input into a graphics pipeline RRS feed

  • Question

  • Hi,

      Our graphics engine is set up to use a linear workflow so all sRGB colour inputs must be degamma'd, including video.

    It seems this can be achieved in theory by setting

    SetUINT32(MF_MT_TRANSFER_FUNCTION, MFVideoTransFunc_10)

    from Media Foundation. I tried this in our MF presenter & didn't notice a visual effect.

    I had a search around & the closest thread I could find was this :
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/973ff4bd-8141-449b-a06f-b576501487fb/how-to-check-video-transfer-matrix-on-dxva-video-processing?forum=mediafoundationdevelopment

    (which is old & didn't really resolve)

    Please find linked a slightly modified version of DXVA2VP to which I've added an extra mode to - hit F12 then cursor up to toggle between linear & sRGB output. There is no visual effect on my hardware.

    Link: http://advance-software.com/misc/dxva2vp.zip

    I have no idea if I've got this right as the docs are weak in this area and as stated in your link above, not all hardware implements this functionality.

    Please could Microsoft provide sample code demonstrating how to correctly instruct a video decoder to degamma its output and how to query the device as to whether this feature is available.

    When this feature is not available, I can degamma in a pixel shader, but I'd rather not have to if the video decoder can do it as it's a performance hit.

    Best regards,
    Steve.
    Monday, October 14, 2013 6:26 PM