Currently in Remote App mode we have no option to interact with the
remote desktop host before the first RAIL window is created.
In many situations this interaction possibility is absolutely required.
One example is that screen which gets displayed if another user is logged on.
It requires clicking a button in pre-RAIL mode so that the currently logged
on user gets notified to confirm or deny the connection.
Another example is the option to log on graphically (e.g. for hosts that
don't support NLA) without predefined credentials.
Also if the administrator sets the "User must change password at next logon"
option there is currently no way to do this in TS Remote App mode.
This change basically lets xfreerdp create the main window in Remote App mode
like in a normal session and xfi->remote_app is not set to true initially.
As soon as the rail exec result event or the first rail window creation
request is received (whatever comes first) the main window gets destroyed and
xfi->remote_app is set to true.
The second change is to disconnect immediately if the rail exec result event
reports an error, e.g. if the specified app cannot be found or if it is not
in the list of allowed applications.
This fixes FreeRDP github issue #143 and issue #308.
I'm aware that this is not the most elegant solution but it is definitely an
improvement and probably good enough for 1.0.
A nicer solution would be hiding the main window and only displaying it if
no rail exec result or rail window creation event is received after a certain
timeout ...
Replaced the non-accelerated rgb to ycbcr encoder (rfx_encode.c) to use 32-bit
integer multiplication with shifted factors: 2 times faster
The accelerated SSE2 rgb to ycbcr encoder (rfx_sse2.c) was completely changed
and simplified in order to make use of the SSE2 signed 16-bit integer
multiplication: 2 times faster
Also modified the non-accelerated ycbcr to rgb decoder (rfx_encode.c) to use
32-bit integer multiplications with shifted factors instead of floating point
multiplications: 3 times faster
The current ycbcr decoder was loosing some bits because cr/cb was multiplied by
the shifted factors.
Instead one should multiply by the non-shifted factors and shift the result.
The effects of these lost bits are easily seen by comparing the colors of a
RemoteFX session with the colors of a plain RDP session - they are just wrong ;)
I've replaced the bit-magic from the non non-accelerated version (rfx_decode.c)
and replaced it with simple float multiplications using the compiler's implicit
integer conversions. On several test machines this was even a little bit faster.
The accelerated SSE2 ycbcr decoder (rfx_sse2.c) was completely changed in order
to make use of the SSE2 signed 16-bit integer multiplication.
Fortunately the factors in the conversion matrix are so small that we can
easily shift them to the maximum possible 16-bit signed integer value without
loosing any information and use _mm_mulhi_epi16 which takes the upper 16 bits
of the 32-bit result.
The SSE2 ycbcr decoder is now much simpler and about 40 percent faster.