Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3042 Discussions

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++)

        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);
        m_pPreEncAuxPool.encOutput.NumExtParam = 1;
        m_pPreEncAuxPool.encOutput.ExtParam = m_pPreEncAuxPool.encCtrl.ExtParam;
    return MFX_ERR_NONE;

secondly,run  perl --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-

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

0 Kudos
2 Replies

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

0 Kudos

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

0 Kudos