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.

MFX_ERR_UNKNOWN is returned from SyncOperation()

Mitsuteru_Watanabe
607 Views

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

0 Kudos
3 Replies
Mitsuteru_Watanabe
607 Views

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:1027
 
Encoding Sample Version 1.0.0.0
 
Input file format YUV420
Output video AVC 
Source picture:
Resolution 720x480
Crop X,Y,W,H 0,0,720,480
Destination picture:
Resolution 720x480
Crop X,Y,W,H 0,0,720,480
Frame rate 29.97
Bit rate(Kbps) 2395
Gop size 30
Ref dist 0
Ref number 0
Idr Interval 0
Target usage balanced
Memory type system
Media SDK impl sw
Media SDK version 1.19
 
Processing started
Frame number: 1
Frame number: 100
Frame number: 200
Frame 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

0 Kudos
Fedor_Z_Intel
Employee
607 Views

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

0 Kudos
Mitsuteru_Watanabe
607 Views

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

0 Kudos
Reply