Community
cancel
Showing results for 
Search instead for 
Did you mean: 
channon__nigel
Beginner
244 Views

VPP Composite with more than 8 surfaces getting corrupted

Hi can anyone help me out im having difficulty understanding why when I use 8 surface with VPP my output is perfect but if I add one extra surface my output becomes corrupted. I am using the standard sample_VPP from the media SDK and I am passing a .par file.

Here is the print out of my system 

Intel(R) Media Server Studio 2017 - System Analyzer (64-bit)


The following versions of Media SDK API are supported by platform/driver
[opportunistic detection of MSDK API > 1.20]:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.2     HW      Yes             X       X
        1.2     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      Yes             X       X
        1.5     HW      Yes             X       X
        1.5     SW      Yes             X       X
        1.6     HW      Yes             X       X
        1.6     SW      Yes             X       X
        1.7     HW      Yes             X       X
        1.7     SW      Yes             X       X
        1.8     HW      Yes             X       X
        1.8     SW      Yes             X       X
        1.9     HW      Yes             X       X
        1.9     SW      Yes             X       X
        1.10    HW      Yes             X       X
        1.10    SW      Yes             X       X
        1.11    HW      Yes             X       X
        1.11    SW      Yes             X       X
        1.12    HW      Yes             X       X
        1.12    SW      Yes             X       X
        1.13    HW      Yes             X       X
        1.13    SW      Yes             X       X
        1.14    HW      Yes             X       X
        1.14    SW      Yes             X       X
        1.15    HW      Yes             X       X
        1.15    SW      Yes             X       X
        1.16    HW      Yes             X       X
        1.16    SW      Yes             X       X
        1.17    HW      Yes             X       X
        1.17    SW      Yes             X       X
        1.18    HW      Yes             X       X
        1.18    SW      Yes             X       X
        1.19    HW      Yes             X       X
        1.19    SW      Yes             X       X
        1.20    HW      Yes             X       X
        1.20    SW      Yes             X       X
        1.21    HW      Yes             X       X
        1.21    SW      Yes             X       X
        1.22    HW      Yes             X       X
        1.22    SW      Yes             X       X
        1.23    HW      Yes             X       X
        1.23    SW      Yes             X       X
        1.24    HW      Yes             X       X
        1.24    SW      Yes             X       X
        1.25    HW      Yes             X       X
        1.25    SW      Yes             X       X
        1.26    HW      Yes             X       X
        1.26    SW      Yes             X       X
        1.27    SW      Yes             X       X
        1.28    SW      Yes             X       X

Graphics Devices:
        Name                                         Version             State
        Intel(R) UHD Graphics 620                    23.20.16.5018       Running / Full Power

System info:
        CPU:    Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
        OS:     Microsoft Windows 10 Enterprise
        Arch:   64-bit
 

Here are the NV12 files i am using as samples and the par files if anyone can test on there own system I have also included a text file with the command line for samples_vpp.

I have saved the two outputs for quick reference as to what my outputs are doing from 8 surfaces then 9 surfaces

Thanks

Regards

Nigel

 

0 Kudos
11 Replies
channon__nigel
Beginner
244 Views

Hi dose anyone have any idea why I am experiencing the current problem I posted. I have found a workaround by creating another VPP session using d3d11 but i can not work out the best approach to copy the output surface in GPU memory from session 1 to the input surface in GPU memory for session 2. I currently am doing it by coping the output surface to a BYTE * using memcpy() and then loading the BYTE array back to the  input stream in session two but this is a large overhead for the GPU any suggestions would be very help full.

Thanks Nigel

Ramashankar
New Contributor III
244 Views

Hi Nigel,

Though I have no clue about your original problem why it is behaving so or how it can be fixed, but the work around you mentioned (copying from one session surface to other session using memcpy) I believe it may be optimized by joining these two sessions. You may refer MFXJoinSession() in sdk manual.

 

 

channon__nigel
Beginner
244 Views

Hi Ramashankar,

 Thank you for responding back to me Did you have a chance to see if you experience the same problem I supplied all the required files in the zip file to use with sample_vpp from the SDK. It would be good to know if you also get the same problem as I believe this should not be happening and maybe its a bug it would be good to get to the bottom of why this is happening.

Im going to try MFXJoinSession() to my understanding of this function if I join session one with session two am I correct to say that session two will have access to the output surface of session one?. Do I have to UnJoin session two from session one if I want to then join session two with session three as if I keep the input surfaces below eight in each session I do not get the leak from the first surface as you can see in the samples I supplied. What im trying to achieve is if I then copy session two output surface to session three's first input surface I can then process seven more surfaces to session three's output surface without the leak and so on with any other sessions.

Will session three have access to the output surface of session two and session one if session two is still joined to session one as session one would still be the parent session or will I just have access to the output surface of session one only.

Regards

Nigel

Mark_L_Intel1
Moderator
244 Views

Hi Nigel,

I can reproduce with your samples, I am doing some research. From the documentation below, I can see there are other argument in the composition file, I think the possibilities:

  1. The argument dependency
  2. A bug.

I want more research on #1 before I submit a bug, could you tell me what else you did except 2 VPP session you mentioned?

Mark

channon__nigel
Beginner
244 Views

Hi Mark,

 Thanks for taking a look and that you also can also reproduce the same problem, Joining the sessions didn't achieve what outcome I was expecting what I ended up doing was processing the first seven composite images to an output surface from the first VPP session I then created a second VPP session and for the first input surface I used the output surface from the first VPP session and then processed the remainder surfaces from the the second VPP session to a new output surface this worked. I did not join the two sessions in this instance. Im still trying different approach's to the problem. I dont think joining the sessions will work the way joining was intended to work in my situation as I am streaming multiple RTSP streams from IP cameras at once some cameras are streaming using H264 and some using H265 in the same VPP session so I must set different sessions for the decoders as each instance of the decoder needs to know what codec it need to use I have this working fine and can stream and display the video stream to my overlay window. My application knows which rtsp stream belongs to each decoder session so I then copy the decoded NV12 buffer to each assigned composite input surface, im still working on this as each time I try to reset VPP or close and init VPP again dynamically im getting a crash from VPP but I think it might be an issue with visual studio 2017 as its intermittent and dosn't happen all the time I get this error  from delete_scalar_size.cpp

_CRT_SECURITYCRITICAL_ATTRIBUTE
void __CRTDECL operator delete(void* const block, size_t const) noexcept
{
    operator delete(block);
}

This is triggered from this line sts = pAllocator->Alloc(pAllocator->pthis, pRequest, &response) when setting the input surfaces but its intermittent and only dose it from the current VS project the same code in other VS projects are not doing it calling the same code so from what others have experienced its pointing to a corrupt VS project file so ill fix this first and if I find any other solutions that work ill let you know.

I am not sure what you mean by 1: The argument dependency. are you referring to maybe filters or different values in the composite parameters?

Look forward to any advise or options you may suggest I can try

Regards

Nigel

Mark_L_Intel1
Moderator
244 Views

Hi Nigel,

I didn't find any clue yet so I have submitted a bug while I will continue investigating.

Mark

channon__nigel
Beginner
244 Views

Hi Mark thanks for the update I found the problem causing the error 

_CRT_SECURITYCRITICAL_ATTRIBUTE
 void __CRTDECL operator delete(void* const block, size_t const) noexcept {
 operator delete(block); 
}

it was a miss configuration in VPP but still this dosnt fix the original problem any idea how long it will take to resolve the bug?

Regards

Nigel

Mark_L_Intel1
Moderator
244 Views

Hi Nigel,

I just submitted it so not sure how long it would take, and I will keep you updated.

But if you can reproduce the same issue in Linux, you can also submit it at our GitHub site:

https://github.com/Intel-Media-SDK/MediaSDK/issues

Mark

channon__nigel
Beginner
244 Views

Hi Mark I just received an email from the forum saying there was an update to this post but there doesn't seem to be any new posts, do you have any further information on the bug

Regards

Nigel

Mark_L_Intel1
Moderator
244 Views

Hi Nigel,

Sorry for the late response.

I got very little bit progress: the issue was assigned to dev team and I am waiting for their investigation result.

Mark

channon__nigel
Beginner
197 Views

Hi Mark,

I setup up a linux ubuntu 20.04 system same i7 CPU as the win10 system and ran the VPP composite sample and there is no issues with the images like there is with windows 10. Under windows 10 I ended up creating a separate instance for each session - decoder - vpp which works fine no image issues like what happens with using vpp composite, I have tested 36 multiple h264 rtsp/rtp streams using a i7 9th gen with only 3% CPU usage and 98% GPU usage problem with the approach I've used is there's a large memory consumption decoding and VPP this many cameras at once, I have no lag with the streams just a large memory consumption and no apparent leaks.

The fact that the overlay view using VPP composite under linux is ok it seems there might be an issue with the windows driver. Do you have any further update to resolve the problem under win10.

Regards

Nigel