libvpl icon indicating copy to clipboard operation
libvpl copied to clipboard

AI frame interpolation produces corrupted output

Open chainikdn opened this issue 11 months ago • 13 comments

Windows 11, A380 card, latest drivers .6458.

Software works with in-memory frames in YV12, with NV12 output after VPP.

Attached source frame and the one generated by VPL. The image is somehow stretched and squeezed, plus overlaid with something that looks like a mask in a blocks 4x4 (or 8x8?).

I'm pretty sure my code is ok, because it works correctly after replacing mfxExtVPPAIFrameInterpolation with simple mfxExtVPPFrameRateConversion.

Image Image

My init code:

    mfxVideoParam VPPParams = {};

    _fillFrameInfo(&VPPParams.vpp.In, MFX_FOURCC_YV12, width, height, 24, 1);
    _fillFrameInfo(&VPPParams.vpp.Out, MFX_FOURCC_NV12, width, height, 24*mul, div);

    VPPParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY | MFX_IOPATTERN_OUT_SYSTEM_MEMORY;

    mfxExtVPPAIFrameInterpolation aiFrameInterpolation = {};
    aiFrameInterpolation.Header.BufferId      = MFX_EXTBUFF_VPP_AI_FRAME_INTERPOLATION;
    aiFrameInterpolation.Header.BufferSz      = sizeof(mfxExtVPPAIFrameInterpolation);
    aiFrameInterpolation.FIMode               = MFX_AI_FRAME_INTERPOLATION_MODE_DEFAULT; 
    aiFrameInterpolation.EnableScd            = 1;

    mfxExtBuffer *ExtParam[] = { (mfxExtBuffer *)&aiFrameInterpolation };

    VPPParams.NumExtParam   = 1;
    VPPParams.ExtParam      = ExtParam;

    MFXVideoVPP_Init(session, &VPPParams);

chainikdn avatar Jan 21 '25 16:01 chainikdn

This looks like it might be related to the runtime. @FurongZhang what do you think?

mav-intel avatar Jan 22 '25 18:01 mav-intel

Any update on this @mav-intel ?

Usulyre avatar Jan 28 '25 22:01 Usulyre

@Usulyre I think @FurongZhang is probably the best person to look at this but is out, probably will be able to look at in the 2nd week in February

mav-intel avatar Jan 29 '25 15:01 mav-intel

We will check that and give an update.

FurongZhang avatar Feb 05 '25 02:02 FurongZhang

We will check that and give an update.

Hi, is there an update yet?

Usulyre avatar Feb 17 '25 21:02 Usulyre

We have already fixed an similar corruption. The fix will be released 1-2 months in gfx official release. But I am not quite sure if the fix can resolve your issue. Is it possible for you to share you clips and let us try if our fix can resolve your issue?

FurongZhang avatar Feb 18 '25 01:02 FurongZhang

dunno, this happens with any source frames, any resolution if this matters, I'm using YV12 input and NV12 output

chainikdn avatar Feb 18 '25 10:02 chainikdn

@chainikdn Hi I'm trying to use this frame interpolation recently. I'm new to this vpl framework. This might be a stupid question. What is the div parameter in your code? I keep getting MFX_ERR_INVALID_VIDEO_PARAM error. Not sure if I missed some parameters. Thanks

roycezjq avatar Feb 27 '25 08:02 roycezjq

We fixed one corruption issue, I will let you know once the new driver release.

FurongZhang avatar Feb 27 '25 13:02 FurongZhang

We fixed one corruption issue, I will let you know once the new driver release.

Any new updates?

Usulyre avatar Jun 19 '25 04:06 Usulyre

I think the latest driver could have the fix.

FurongZhang avatar Jun 19 '25 05:06 FurongZhang

I'm having the same issue with the latest release. Are there any updates on this?

aschuch1 avatar Jul 22 '25 20:07 aschuch1

I'm having the same issue with the latest release. Are there any updates on this?

@aschuch1 Have you specified -iopattern d3d_to_d3d in your command? It fixed my problem.

roycezjq avatar Jul 24 '25 02:07 roycezjq