I would like to use media sdk for encoding. The input data (about 300 frames) is pre-loaded to memory, so There is no bottleneck on loading data from hard disk. by the GPU-z, I could watch the gpu load. The gpu loading is 45%~49%, not 100% at all. (for 720p , 8Mbs the encoding speed is 145 FPS on HD 2000@i5 2410m )
Based on the gpu loading is not full, so there is room for enchaning encoding efficiency.
, what parameter I should use for this target ?
(there is no b frame, and zero-latency):
My current parameter are :
m_mfxEncParams.mfx.CodecId = MFX_CODEC_AVC;
m_mfxEncParams.mfx.TargetUsage = MFX_TARGETUSAGE_BEST_SPEED;
m_mfxEncParams.mfx.TargetKbps = (mfxU16)(8*1024); // in Kbps
m_mfxEncParams.mfx.MaxKbps = (mfxU16)(1.5*(unsigned int)m_mfxEncParams.mfx.TargetKbps);
m_mfxEncParams.mfx.RateControlMethod = MFX_RATECONTROL_VBR;
m_mfxEncParams.mfx.EncodedOrder = 0; // binary flag, 0 signals encoder to take frames in display order
m_mfxEncParams.mfx.GopOptFlag = MFX_GOP_CLOSED;//B-frames of the first B-interval can never reference the previous GOP
m_mfxEncParams.mfx.IdrInterval = 25; //specifies IDR-frame interval in terms of I-frames;
m_mfxEncParams.mfx.GopRefDist = 1; // Distance between I- or P- key frames, 1 :Disable B slices
m_mfxEncParams.mfx.GopPicSize = 1 + 150;
ConvertFrameRate((mfxF64)25, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtN, &m_mfxEncParams.mfx.FrameInfo.FrameRateExtD);
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.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
or othere parameters should be modify ?
thank you lots.
I'm not sure about the reliability of GPU-z. I would instead recommend using Intel Graphics Performance Analyzer (GPA) which can be downloaded from here:http://software.intel.com/en-us/articles/vcsource-tools-intel-gpa/
You should be able to get your GPU loaded to ~100% using Media SDK encode sample by removing file reading of RAW yuv data. I did a quick test using your parameter settings and I see ~300fps and an overall GPU load of 95%.
I suspect your implementation may have additional CPU or file system bottleneck.
Also, for optimal performance please try to use video memory instead of system memory.
As your instruction, I have download the GPA 4.3 for analysis.
I have study it for a few hours, but I still do not know how to measure the GPU usage rate...
my step is :
1. I use GPA monitor to launch my appilcation (AA.exe).
2. when the 1. is running, I excute the GPA system analyzer..
3. there is a list on GPA system analyzer, that is AA.exe.
4. click the AA.exe on the list, there is page for report, I could drag the cpu number on the left to the right, to watch the cpu useage rate...
But there is no GPU usage....
May you help me ?
Another question, how do you do to let the gpu usage rate as 100%?
I just comment out the line
sts = m_FileReader.LoadNextFrame(pSurf); in pipeline_encode.cpp line 901 and line 911.
the gpu usage rate is 75% by gpu-z mesure.
May you tell me the detail ? thank you lots.
to track GPU load using GPA just start the "Intel GPA Monitor". Then go to the taskbar and right click on the "GPA Monitor" task bar icon. From the menu that opens select "Media Performance...".
Yes, the most straightforward way to eliminate reading the raw data from the file system is to just remove LoadNextFrame. Naturally this also means that you will be encoding blank surfaces.
Hope you are doing well can you tell me from Encoder H.264 SD/HD Encoder HVE-02 how i transmit Mpeg 2 and Mpeg 4??
There is any Setting for that i use the Upcom Modulator DVbs&Dvbs2 ..
Can you please explain the problem you are seeing with Media SDK in detail? or If you can explain the use case we might be able to give suggestions related to Media SDK.