Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Donald_G_
Beginner
140 Views

Can't get double-rate deinterlacing to work

I use INDE 2015 Update 1. I have an interlaced AVC stream that I want to double-rate deinterlace. I set the input params for TFF and 29.97 fps and the output params for PROGRESSIVE and 59.94 fps. I provide this extra configuration:

        mfxExtVPPDeinterlacing di;
        memset(&di, 0, sizeof(di));
        di.Header.BufferId = MFX_EXTBUFF_VPP_DEINTERLACING;
        di.Header.BufferSz = sizeof(di);
        di.Mode = MFX_DEINTERLACING_AUTO_DOUBLE;
        mfxExtBuffer* ExtBuffer[1];
        ExtBuffer[0] = (mfxExtBuffer*) &di;
        Pipeline.m_mfxVPPParams.NumExtParam = 1;
        Pipeline.m_mfxVPPParams.ExtParam = (mfxExtBuffer**) &ExtBuffer[0];


When running, I first decode an input frame, then I get MFX_MORE_SURFACE as expected from the first VPP run and sync. Then I run VPP and sync again.

I find that I do get 59.94 fps output, but the second output frame of a pair is always the same as the first one, i.e. I do not get proper bobbing where each input field gets it's own output frame.

I would appreciate any help in getting this working. Perhaps there is some sample code for double-rate deinterlacing. Thank you.

0 Kudos
12 Replies
140 Views

Hi,

Yes, please refer to the video processing sample of MediaSDK from here: https://software.intel.com/en-us/articles/intel-media-client-getting-started-guide (or) https://software.intel.com/en-us/media-client-solutions-support/code-samples.

Also, please refer to the article which explains more on deinterlacing :https://software.intel.com/en-us/forums/topic/530561.

Thanks,

Donald_G_
Beginner
140 Views

Thank you, Harsh, but I have already extensively looked at those things. Can you point me specifically to a sample that performs double-rate deinterlacing?

In the absence of such a sample, can you advise on what may be causing my problem? Thank you.

140 Views

Hi,

We do not have/provide a specific double-rate deinterlacing sample, samples are more like a starting point to build your own application. We generally advise to use our sample and ask you to build the required functionality using them. 

An idea to try, probably you can set the PicStruct to MFX_PICSTRUCT_UNKNOWN for the input format at the intialization and provide the correct input frame picture structure type on every frame. Let me know if that helps!

Thanks,

Surbhi_M_Intel
Employee
140 Views

Hi Donald, 

This is BOB method being used to double the frame rate, which is duplicating the frames. It is not making use of any advance frame rate conversion technique.

-Surbhi

Donald_G_
Beginner
140 Views

Harsh,

"An idea to try, probably you can set the PicStruct to MFX_PICSTRUCT_UNKNOWN for the input format at the intialization and provide the correct input frame picture structure type on every frame. Let me know if that helps!"

It does not help.

Surbhi,

Eric Gur tells me that proper bobbing (no frame duplication) should work fine (and does so in his DirectShow decoder). This contradicts what you tell me. I am asking how to achieve proper bobbing. Are you unable to tell me and continue to say it is not possible? It seems to me that the VPP must somehow be told to use the second input field of the input frame when generating the second output frame. In nVidia land there is a simple flag you set before calling VPP for the second frame. What is the equivalent for Intel?

thank you, Don

140 Views

Hi,

Let me correct that.Yes, We can achieve bobbing using MediaSDK. Let me consult the team and will update you on how to achieve proper bobbing in this particular case. 

It seems to me that the VPP must somehow be told to use the second input field of the input frame when generating the second output frame. In nVidia land there is a simple flag you set before calling VPP for the second frame. What is the equivalent for Intel? -> Will find out and update. 

Thanks,

Surbhi_M_Intel
Employee
140 Views

Hi Don, 

I misunderstood your question, apologies for that. We are working with engineering team to how to achieve feature. We will update you how to implement this feature as soon as we can.
 
-Surbhi

Donald_G_
Beginner
140 Views

Thank you, guys, I appreciate your support.

140 Views

Hi,

I have few updates from our development team and following are there suggestions to achieve double-deinterlacing and proper bobbing. In this special case ADI 60i->60p, in term of sample_vpp it is “-spic 0 -dpic 1” and “-sf 29.97 -df 59.94”. This will work for Win & Linux as well.
 

 To perform this special case of double de-interlacing, Please make following changes to your code.  

        mfxExtVPPDeinterlacing di;
        memset(&di, 0, sizeof(di));
        di.Header.BufferId = MFX_EXTBUFF_VPP_DEINTERLACING;
        di.Header.BufferSz = sizeof(di);
        di.Mode = MFX_DEINTERLACING_AUTO_DOUBLE;

        di.Mode = MFX_DEINTERLACING_ADVANCED;
        mfxExtBuffer* ExtBuffer[1];
        ExtBuffer[0] = (mfxExtBuffer*) &di;
        Pipeline.m_mfxVPPParams.NumExtParam = 1;
        Pipeline.m_mfxVPPParams.ExtParam = (mfxExtBuffer**) &ExtBuffer[0];

        Pipeline.m_mfxVPPParams.vpp.In.FrameRateExtN = <In frame rate>;

        Pipeline.m_mfxVPPParams.vpp.Out.FrameRateExtN = <Out Frame rate>;

Let me know if this solves your issue. 

Thanks,

Donald_G_
Beginner
140 Views

Outstanding, Harsh! That solves the issue for me. Thank you very much.
 

140 Views

Hi, 

Glad, we could help resolve your issue. 

Thanks,

Donald_G_
Beginner
140 Views

Status update...

While this worked for the old decode sample I now find that I cannot enable the deinterlacer using the latest sample_devpp code. I have posted a new thread about it and would appreciate your support. Thank you.

Reply