Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
5 Views

How to get the value of FrameStat in sample_multi_transcode

firstly, I add printf in mfxStatus CTranscodingPipeline::AllocPreEncAuxPool() as follow:

mfxStatus CTranscodingPipeline::AllocPreEncAuxPool()
{
    if (!m_pmfxPreENC.get()) return MFX_ERR_NONE;

    mfxU16 num_resolutions = m_ExtLAControl.NumOutStream;
    int buff_size = sizeof(mfxExtLAFrameStatistics) + sizeof(mfxLAFrameInfo)*num_resolutions*m_ExtLAControl.LookAheadDepth;

    for (size_t i = 0; i < m_pPreEncAuxPool.size(); i++)
    {
        memset(&m_pPreEncAuxPool,0,sizeof(m_pPreEncAuxPool));

        m_pPreEncAuxPool.encCtrl.NumExtParam = 1;
        m_pPreEncAuxPool.encCtrl.ExtParam = new mfxExtBuffer*[1];

        char *pBuff = new char[buff_size];
        memset(pBuff,0, buff_size);

        m_pPreEncAuxPool.encCtrl.ExtParam[0] = (mfxExtBuffer *)pBuff;
        mfxExtLAFrameStatistics *pExtBuffer = (mfxExtLAFrameStatistics *)pBuff;

        pExtBuffer = (mfxExtLAFrameStatistics*) pBuff;
        pExtBuffer->Header.BufferId = MFX_EXTBUFF_LOOKAHEAD_STAT;
        pExtBuffer->Header.BufferSz = buff_size;
        pExtBuffer->NumAlloc = num_resolutions*m_ExtLAControl.LookAheadDepth;
        pExtBuffer->FrameStat = (mfxLAFrameInfo *)(pBuff + sizeof(mfxExtLAFrameStatistics));
        for( int j=0; j<52; j++)
              printf("%llu", pExtBuffer->FrameStat->EstimatedRate);
        printf(" Width= %u",pExtBuffer->FrameStat->Width);
        printf(" Height= %u",pExtBuffer->FrameStat->Height);
        printf(" FrameType= %u",pExtBuffer->FrameStat->FrameType);
        printf(" FrameDisplayOrder= %u",pExtBuffer->FrameStat->FrameDisplayOrder);
        printf(" FrameEncodeOrder= %u",pExtBuffer->FrameStat->FrameEncodeOrder);
        printf(" IntraCost= %u",pExtBuffer->FrameStat->IntraCost);
        printf(" InterCost= %u",pExtBuffer->FrameStat->InterCost);
        printf(" DependencyCost= %u",pExtBuffer->FrameStat->DependencyCost);
        printf("\n");
        m_pPreEncAuxPool.encOutput.NumExtParam = 1;
        m_pPreEncAuxPool.encOutput.ExtParam = m_pPreEncAuxPool.encCtrl.ExtParam;
    }
    return MFX_ERR_NONE;
}

secondly,run  perl build.pl --cmake=intel64.make.debug --build --clean,

thirdly, run  sample_multi_transcode_drm –par 1.par -p 1.perf , and the 1.par as follow:

-hw -i::h264 cctv.h264 -w 480 -h 270 -la_ext -o::sink -join
-hw -o::h264 output1.h264 -b 2000 -i::source -join
-hw -o::h264 output2.h264 -b 1000 -i::source -join
-hw -o::h264 output3.h264 -b 500 -i::source -join

but, the result of all my printf value are 0, How to get the value of FrameStat in the struct mfxExtLAFrameStatistics?

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

0 Kudos
2 Replies
Highlighted
Beginner
5 Views

sorry, the print of my add is error,I known where i can get the value! thanks

0 Kudos
Highlighted
Beginner
5 Views

Sorry, could you please tell me where can get the correct value on your example. Thanks

0 Kudos