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

Questions about use MFX_RATECONTROL_QVBR in sample_encode

I use MFX_RATECONTROL_QVBR in the SDK demo of sample_encode and  have a question:

m_pmfxENC->Init(&m_mfxEncParams) error code is MFX_ERR_INVALID_VIDEO_PARAM

Do I need other initial parameters

My initial parameters as follow:

mfxStatus CEncodingPipeline::InitMfxEncParams(sInputParams *pInParams)
{
    m_MfxEncParams.mfx->FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
    m_MfxEncParams.mfx->RateControlMethod = MFX_RATECONTROL_QVBR;
    m_MfxEncParams.mfx->TargetKbps = 1000;
    m_MfxEncParams.mfx->CodecId = MFX_CODEC_AVC;
    m_MfxEncParams.mfx->FrameInfo.FrameRateExtN = 30;
    m_MfxEncParams.mfx->FrameInfo.FrameRateExtD = 1;
    m_MfxEncParams.mfx->EncodedOrder  = 0;
    m_MfxEncParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;
    m_MfxEncParams.mfx->FrameInfo.FourCC = MFX_FOURCC_NV12;
    m_MfxEncParams.mfx->FrameInfo.ChromaFormat= MFX_CHROMAFORMAT_YUV420;
    m_MfxEncParams.mfx->FrameInfo.Width  = 1280;
    m_MfxEncParams.mfx->FrameInfo.Height = 720;
    m_MfxEncParams.mfx->FrameInfo.CropX = 0;
    m_MfxEncParams.mfx->FrameInfo.CropY = 0;
    m_MfxEncParams.mfx->FrameInfo.CropW = 1280;
    m_MfxEncParams.mfx->FrameInfo.CropH = 720;

    if( m_MfxEncParams.mfx->RateControlMethod == MFX_RATECONTROL_QVBR )
    {
        MSDK_ZERO_MEMORY(m_CodingOption3);
        m_CodingOption3.Header.BufferId = MFX_EXTBUFF_CODING_OPTION3;
        m_CodingOption3.Header.BufferSz = sizeof(m_CodingOption3);
        m_CodingOption3.QVBRQuality = 30;
        m_EncExtParams.push_back((mfxExtBuffer *)&m_CodingOption3);
    }
    if (!m_EncExtParams.empty())
    {
        m_MfxEncParams.ExtParam = &m_EncExtParams[0];
        m_MfxEncParams.NumExtParam = (mfxU16)m_EncExtParams.size();
    }
    m_MfxEncParams.AsyncDepth = pInParams->nAsyncDepth;
    return MFX_ERR_NONE;
}

0 Kudos
8 Replies
Surbhi_M_Intel
Employee
30 Views

Hi Seven, 

Can you send us the o/p of the media sdk system analyzer tool present in the installed directory under tools? That will tell us the information of your system like CPU, GPU and drivers installed. 
Other than that, can you confirm if by default sample is working on your system and you are seeing Initialization failure only after choosing QVBR bitrate control method?

Thanks,
Surbhi
 

seven_w_
Beginner
30 Views

Firstly, I couldn't find any MediaSDK System Analyzer tool for linux.this link https://software.intel.com/en-us/articles/media-sdk-tools is for windows,Is there any updated MediaSDK System Analyzer that I could download ?

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

Secondly, I use MFX_RATECONTROL_VBR in the SDK demo of sample_encode is ok.

     Thanks!

Surbhi_M_Intel
Employee
30 Views

Hi Seven, 

It wasn't clear from your first post that whether you had windows or Linux. No, there is no analyzer tool for Linux. Thanks for sending details and confirming the result with VBR control method. Your system and the configuration is supported by Media Server Studio. 
I am able to reproduce your issue, from my experiments quality param is not working but I don't believe QVBR method is supported on Linux. I am confirming with architect, will update you soon on this. 

Thanks,
Surbhi
 

 

 

Surbhi_M_Intel
Employee
30 Views

Hi Seven, 

I got the confirmation from the expert that  H264 encoder on Linux OS doesn't support QVBR method, the only BRC modes on Linux we support are Constant Bit Rate Control(CBR), variable Bitrate Control(VBR), Look Ahead(LA), Constant QP (CQP).  Also, mentioned in Linux OS release notes

Please let us know if you have any other questions. 

Thanks,
Surbhi

 

david123456
Beginner
30 Views

Why LINUX backward Windows for MSDK?

Surbhi_M_Intel
Employee
30 Views

Hi David,

I am not sure if I got your comment. can you please reword it or explain what you mean by "LINUX backward Windows" ?

-Surbhi

david123456
Beginner
30 Views

Hi Surbhi,

1.  Bit Rate Control algrithms supported by LINUX is less than Windows

2. Skylake Hevc HW encoder for LINUX is not availble now

 

Surbhi_M_Intel
Employee
30 Views

Hi David, 

BRC support on Linux is limited to 4 rate control algorithms as compared to windows, where there are around 8-9 options to choose from. We are hoping to add couple more options in Linux in future but concrete plans to share yet. 

No Media Server Studio support for SKL platform, hence no HEVC fully hw accelerated encoder and decoder support. SKL platform support is available for windows OS through Media Client. 

Hope that answers your question.

Thanks,
Surbhi