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.

memory leak of intel media sdk transcode

yiling_w_1
Beginner
497 Views

system: win8.1 x64

hardware: i5-6400 2.7GHZ     HD Graphics 530

video driver: 20.19.15.4463

Intel Media Sdk and 265 plugin: MediaServerStudioProfessionalEvaluation2016

demo: sample_multi_transcode of Intel Media SDK Samples 2016 6.0.0.142

I'm used this demo for 265 to 264 transcoding, I'm setting HW and used api 1.19. I have used transcoding for 15 hours and four tasks togethor, it makes the memory increase 1.3G. then, if I call the delete all of the CTranscodingPipeline objects, the memory will reduce to more than 60MB.

I also tried to use this demo for 264 to 264 transcoding,but the result is same as above..

0 Kudos
3 Replies
Surbhi_M_Intel
Employee
497 Views

Hi yiing, 

I have similar issue with 2 more customers who are seeing memory leak, see here - https://software.intel.com/en-us/forums/intel-media-sdk/topic/670446
So far I have not been able to reproduce the issue. Can you please send the cmd line and snapshot of the memory leak - memory at start of the session, at mid some point and before the session ends. 

Thanks,
Surbhi

0 Kudos
yiling_w_1
Beginner
497 Views

Hi Surbhi,

Thank you for your replay,I have upload tow pictures to the baidu cloud, url:http://yun.baidu.com/share/link?shareid=702743705&uk=3627248114#render-type=grid-view, I'm not sure you can see it, but if you can see it, you can find the memory increase 250MB in 1.5hours through system time.

My transcodes cmd is : -par aa.par -p 1.perf

the aa.par file content:

-i::h265 output0.h265 -o::h264 output0.h264 -f 30 -gop_size 30 -dist 1 -hw
-i::h265 output1.h265 -o::h264 output1.h264 -f 30 -gop_size 30 -dist 1 -hw
-i::h265 output2.h265 -o::h264 output2.h264 -f 30 -gop_size 30 -dist 1 -hw
-i::h265 output3.h265 -o::h264 output3.h264 -f 30 -gop_size 30 -dist 1 -hw

the source of sample_multi_transcode.exe, I hava changed two places.

1、file: sample_utils.cpp                     function: mfxStatus CSmplBitstreamWriter::WriteNextFrame(mfxBitstream *pMfxBitstream, bool isPrint)

    //mfxU32 nBytesWritten = 0;


    //nBytesWritten = (mfxU32)fwrite(pMfxBitstream->Data + pMfxBitstream->DataOffset, 1, pMfxBitstream->DataLength, m_fSource);
    //MSDK_CHECK_NOT_EQUAL(nBytesWritten, pMfxBitstream->DataLength, MFX_ERR_UNDEFINED_BEHAVIOR);

I modify it to make sure enough disk space

2、file: sample_utils.cpp 

function:mfxStatus CSmplBitstreamReader::ReadNextFrame(mfxBitstream *pBS)

 if (0 == nBytesRead)
    {
    
    fseek(m_fSource, 0, SEEK_SET); //liy add
nBytesRead = (mfxU32)fread(pBS->Data + pBS->DataLength, 1, pBS->MaxLength - pBS->DataLength, m_fSource); //liy add
        //return MFX_ERR_MORE_DATA;
    }
 
I modify it  is to read data to cycle
0 Kudos
Surbhi_M_Intel
Employee
497 Views

Hi Yiling, 

We were able to reproduce the issue at our end, thanks for sending the reproducer. Discussing this with the driver team and we are able to see improvements in the next driver release on limited scenarios. Will update as we make progress. 

Thanks,
Surbhi

0 Kudos
Reply