Community
cancel
Showing results for 
Search instead for 
Did you mean: 
seven_w_
Beginner
50 Views

How to use mfxExtVPPFrameRateConversion for frame rate conversion

I want to use mfxExtVPPFrameRateConversion for frame rate conversion in sample_encode, when it run, m_pMfxVPP->Init(&m_mfxVppParams) return MFX_ERR_INVALID_VIDEO_PARAM

the parameters set as follows:

    mfxExtVPPDoUse m_extDoUse;
    mfxExtVPPFrameRateConversion m_FrameRateConversion;

    MSDK_ZERO_MEMORY(m_extDoUse);
    m_extDoUse.Header.BufferId = MFX_EXTBUFF_VPP_DOUSE;
    m_extDoUse.Header.BufferSz = sizeof(mfxExtVPPDoUse);
    m_extDoUse.NumAlg = 1;
    m_extDoUse.AlgList = new mfxU32 [m_extDoUse.NumAlg];
    if( NULL == m_extDoUse.AlgList )
        return;
    m_extDoUse.AlgList[0] = MFX_EXTBUFF_VPP_FRAME_RATE_CONVERSION;

    MSDK_ZERO_MEMORY(m_FrameRateConversion);
    m_FrameRateConversion.Header.BufferId = MFX_EXTBUFF_VPP_FRAME_RATE_CONVERSION;
    m_FrameRateConversion.Header.BufferSz = sizeof(mfxExtVPPFrameRateConversion);
    m_FrameRateConversion.Algorithm = MFX_FRCALGM_PRESERVE_TIMESTAMP;

   m_VppExtParams.push_back((mfxExtBuffer *)&m_extDoUse);
   m_VppExtParams.push_back((mfxExtBuffer *)&m_FrameRateConversion);

and my system informations as follow:

CPU: 4  Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz

GPU: 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

Operating System:CentOS Linux release 7.0.1406 (Core)

Kernel information : Linux version 3.10.0-123.9.3.29404.MSSr3.el7.x86_64

Software Products:  Intel Media Server Studio Essentials 2015 and SDK API version is 1.13

Thanks!

0 Kudos
1 Reply
Surbhi_M_Intel
Employee
50 Views

Hi Seven, 

Thanks for providing details! Few questions after looking at your code and trying the above code on my end -
1. Where are you defining m_extDoUse and m_FrameRateConversion, make sure you define them in pipeline_encode header file.
2. where are you initializing the vpp.out.framerate? You can add a condition that if vpp.in.frame rate != vpp.out.framerate then 

    if (pParams->nWidth  != pParams->nDstWidth ||
        pParams->nHeight != pParams->nDstHeight ||
		m_mfxVppParams.vpp.In.FourCC != m_mfxVppParams.vpp.Out.FourCC || m_mfxVppParams.vpp.In.FrameRateExtN != m_mfxVppParams.vpp.Out.FrameRateExtN)
    {
        m_pmfxVPP = new MFXVideoVPP(m_mfxSession);
        MSDK_CHECK_POINTER(m_pmfxVPP, MFX_ERR_MEMORY_ALLOC);
    }


3. If you are doing above two suggestions and still facing problem, then can you change the FRC Algorithm and check if you still see the same issue. 

You can look at sample_vpp to see how to configure for FRC. If you still see issue after following above suggestions, please send us your code and cmd line to take a look at. 

Thanks,
Surbhi