- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
I have implemented an encoding product with Intel Media SDK 2016 R2 and sample codes.
So I have met an encoding problem in a sample code.
[Issue 1]
It is occurred an INIFINITE loop at GetFreeSurface() in sample_utils.cpp with a relatively low frequency
which is located the loop calling at GetFreeSurfaceIndex() and MSDK_SLEEP() alternately.
In this case, I have inserted a work arround as follows;
Add a number of two allocation frames at CEncodingPipeline::AllocFrames() in pipeline_encode.cpp.
nEncSurfNum = EncRequest.NumFrameSuggested; nEncSurfNum += 2;
And then, I met a different problem as follows;
[Issue 2]
An error MFX_ERR_UNKNOWN is returned from SyncOperation() at CEncTaskPool::SynchronizeFirstTask() in pipeline_encode.cpp.
which is occurred with low frequency same as Issue 1.
How can I resolve the problem with what fix I should make?
Best regards,
Mitsuteru Watanabe
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition, I have tested any number of times executing the sample encode with Intel Media SDK 2017 R1, then I have the same result.
In this case, I did not modify the sample codes.
The error messages as follows:
[ERROR], sts=MFX_ERR_UNKNOWN(-1), CEncodingPipeline::GetFreeTask, m_TaskPool.SynchronizeFirstTask failed at src\pipeline_encode.cpp:1445[ERROR], sts=MFX_ERR_UNKNOWN(-1), CEncodingPipeline::Run, m_pmfxENC->EncodeFrameAsync failed at src\pipeline_encode.cpp:1649[ERROR], sts=MFX_ERR_UNKNOWN(-1), wmain, pPipeline->Run failed at src\sample_encode.cpp:1027Encoding Sample Version 1.0.0.0Input file format YUV420Output video AVCSource picture:Resolution 720x480Crop X,Y,W,H 0,0,720,480Destination picture:Resolution 720x480Crop X,Y,W,H 0,0,720,480Frame rate 29.97Bit rate(Kbps) 2395Gop size 30Ref dist 0Ref number 0Idr Interval 0Target usage balancedMemory type systemMedia SDK impl swMedia SDK version 1.19Processing startedFrame number: 1Frame number: 100Frame number: 200Frame number: 258
In this case, MFX_ERR_UNKNOWN is returned from SyncOperation() at 136 line in pipeline_encode.cpp
sts = m_pmfxSession->SyncOperation(m_pTasks[m_nTaskBufferStart].EncSyncP, MSDK_WAIT_INTERVAL);
However I can not the reason why the error code is returned in this situation.
Does anyone have some information as same as this issue?
Best regards,
Mitsuteru Watanabe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Mitsuteru.
Could you provide full command line an full output log (the log you'v posted in previous message seems to be partial) ? Also, please write what version of samples you're using (what is samples' package name).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Fedor,
The frequency of occurrence of this bug is very low.
Sometimes occurring within 1 hour, sometimes it doesn't occur for more than 24 hours.
Full command line:
sample_encode.exe -sw -b 2395 -tff -f 29.97 -g 30 -idr_interval 0 -w 720 -h 480 -CodecProfile 100 -CodecLevel 32 -i city_720_480_2997fps.yuv -o city_720_480_2997fps.264 > stdout_stderr_%LOOP_CNT%.txt 2>&1
%LOOP_CNT% is loop counter incremented in bat file.
Full output log:
The log I have posted is full output log containing messages from stdout and stderr.
Version of samples:
IntelMSDK Samples R2 for Intel(R) Media Server Studio 2017
It was downloaded from
https://github.com/Intel-Media-SDK/samples
About intput movie file:
Download city_4cif_30fps.y4m from
https://media.xiph.org/video/derf/y4m/
Convert file format y4m to yuv.
Convert width and height 704x576 to 720x480.
Best regards,
Mitsuteru Watanabe
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page