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
Announcements
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.
3075 Discussions

On the issue of setting BRefType in sample_multi_transcode

seven_w_
Beginner
623 Views

      I set the BRefType in mfxStatus CTranscodingPipeline::InitEncMfxParams(sInputParams *pInParams), and m_mfxEncParams.mfx.GopRefDist =6, but the video showed blurred screen after transcoding. but when m_mfxEncParams.mfx.GopRefDist = 4, the video is ok

mfxStatus CTranscodingPipeline::InitEncMfxParams(sInputParams *pInParams)
{
    MSDK_CHECK_POINTER(pInParams,  MFX_ERR_NULL_PTR);
    MSDK_MEMCPY_VAR(m_mfxEncParams.mfx.FrameInfo, &m_mfxDecParams.mfx.FrameInfo, sizeof(mfxFrameInfo));

    m_mfxEncParams.mfx.RateControlMethod = MFX_RATECONTROL_CQP;
    m_mfxEncParams.mfx.QPI = 25;
    m_mfxEncParams.mfx.QPP = 28;
    m_mfxEncParams.mfx.QPB = 37;

    m_mfxEncParams.mfx.CodecId   = MFX_CODEC_AVC;
    m_mfxEncParams.mfx.TargetUsage = 1;
    m_mfxEncParams.AsyncDepth = 1;
    m_mfxEncParams.mfx.CodecProfile = 100;
    m_mfxEncParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
    m_mfxEncParams.mfx.GopPicSize = 48;
    m_mfxEncParams.mfx.GopRefDist = 6;
    m_mfxEncParams.mfx.GopOptFlag = 1;
    m_mfxEncParams.mfx.CodecId = MFX_CODEC_AVC;
    m_mfxEncParams.mfx.FrameInfo.FrameRateExtN = 25;
    m_mfxEncParams.mfx.FrameInfo.FrameRateExtD = 1;
    m_mfxEncParams.mfx.EncodedOrder  = 0;
    m_mfxEncParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
    m_mfxEncParams.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
    m_mfxEncParams.mfx.NumSlice = 1;

    // leave PAR unset to avoid MPEG2 encoder rejecting streams with unsupported DAR
    m_mfxEncParams.mfx.FrameInfo.AspectRatioW = m_mfxEncParams.mfx.FrameInfo.AspectRatioH = 0;


    m_mfxEncParams.mfx.FrameInfo.CropX = 0;
    m_mfxEncParams.mfx.FrameInfo.CropY = 0;

    m_mfxEncParams.IOPattern = MFX_IOPATTERN_IN_OPAQUE_MEMORY;

    
        m_CodingOption2.LookAheadDepth = 48;//pInParams->nLADepth;
        m_CodingOption2.MaxSliceSize = pInParams->nMaxSliceSize;
        m_CodingOption2.BRefType = MFX_B_REF_PYRAMID;
        m_CodingOption2.Trellis = MFX_TRELLIS_P;
        m_EncExtParams.push_back((mfxExtBuffer *)&m_CodingOption2);
       

    if (m_bUseOpaqueMemory)
        m_EncExtParams.push_back((mfxExtBuffer *)&m_EncOpaqueAlloc);

    if (!m_EncExtParams.empty())
    {
        m_mfxEncParams.ExtParam = &m_EncExtParams[0]; // vector is stored linearly in memory
        m_mfxEncParams.NumExtParam = (mfxU16)m_EncExtParams.size();
    }
    if (m_pParentPipeline)
    {
        m_pParentPipeline->AddLaStreams(m_mfxEncParams.mfx.FrameInfo.Width,m_mfxEncParams.mfx.FrameInfo.Height);
    }
    return MFX_ERR_NONE;
}

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
0 Replies
Reply