I logged a ticket on JIRA a few days ago regarding video latency on windows which seems to be related to scaling. The ticket URL is below:-
Since logging the ticket I have grabbed the source snapshot, eclipse and had a little dig around. The problem appears to be in how the JNawtrenderer is constructed.
First removing the native dll completely on my system improved performance by around 50%. I presume this just falls back to the default AWT renderer. It did mess up the scaling in full screen mode however.
Next I found if I replaced the following code in d3d_surface.cpp:-
ret = D3DXLoadSurfaceFromMemory(m_surface, NULL, &rect, data,
D3DFMT_A8R8G8B8, width * 4, NULL, &rect, D3DX_FILTER_NONE, NULL);
/* load image from memory */
ret = m_surface->LockRect(&lockrect, &rect, 0);
memcpy(lockrect.pBits, data, width*height*4);
ret = m_surface->UnlockRect();
Performance was improved significantly again - down from around 15-20% cpu in full screen to 4-6%. However on less powerful machines full screen still seems to present an issue.
So I have dug further and discovered that I cannot do hardware scaling as the source data is already scaled when sent to the renderer.
My knowledge of Java is rusty and I have never worked extensively with either AWT or the Jitsi codebase. I am wondering if anyone can point me to which files I would need to goto to disable the scaling of the image which I believe is done with FFMPEG currently. I would like to try using Direct3d's own hw scaling as I think this would improve matters again.
James M. Martin
Director of Development
ESP Technologies Limited - Delivering Total IT Solutions to Government
+353 (0) 87 777 6422
Auburn House, Ard na Greine, Ennis, Co. Clare, Ireland
Phoenix Centre, Block 6, Broomhall Business Park,
Rathnew, Co. Wicklow, Ireland.
ESP Technologies Limited is registered with the Registrar of Companies, Dublin - No. 367933
Registered Address: Auburn House, Ard na Greine, Ennis, Co. Clare, Ireland
This email is intended for the addressees named above and any other use is prohibited. It may contain confidential information. If you received this email in error, please contact the sender by return email. ESP does not accept legal responsibility for the contents of this message if it has reached you via the Internet, as Internet communications are not secure. Any opinions expressed are those of the author and are not necessarily endorsed by ESP. All ESP communications are scanned for malware & virus infection using the latest anti-viral utilities.