mirror of
https://github.com/sheumann/VNCviewGS.git
synced 2024-06-10 11:29:29 +00:00
Optimize the core loops for decoding raw pixels a little, in particular deferring increments to the end.
This commit is contained in:
parent
59a3bf938c
commit
f810cb3799
1
README
1
README
|
@ -64,6 +64,7 @@ First open source release
|
||||||
Can display the mouse cursor from the server locally on the IIgs
|
Can display the mouse cursor from the server locally on the IIgs
|
||||||
Detects some errors more quickly, avoiding long periods of unresponsiveness
|
Detects some errors more quickly, avoiding long periods of unresponsiveness
|
||||||
Mapping of OA and Option keys reversed to match Mac VNC implementations
|
Mapping of OA and Option keys reversed to match Mac VNC implementations
|
||||||
|
Raw pixel decoding performance improved slightly
|
||||||
|
|
||||||
1.0b1
|
1.0b1
|
||||||
Faster display updates when using Raw encoding
|
Faster display updates when using Raw encoding
|
||||||
|
|
74
raw.cc
74
raw.cc
|
@ -108,34 +108,28 @@ void RawDraw (void) {
|
||||||
if (hRez == 640) {
|
if (hRez == 640) {
|
||||||
initialLineDataPtr = lineDataPtr;
|
initialLineDataPtr = lineDataPtr;
|
||||||
while (destPtr + 7 < finalDestPtr) { /* Unrolled loop */
|
while (destPtr + 7 < finalDestPtr) { /* Unrolled loop */
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
*destPtr = bigcoltab640a[*(unsigned int*)lineDataPtr]
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[1]];
|
||||||
lineDataPtr += 4;
|
destPtr[1] = bigcoltab640a[((unsigned int*)lineDataPtr)[2]]
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[3]];
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
destPtr[2] = bigcoltab640a[((unsigned int*)lineDataPtr)[4]]
|
||||||
lineDataPtr += 4;
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[5]];
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
destPtr[3] = bigcoltab640a[((unsigned int*)lineDataPtr)[6]]
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[7]];
|
||||||
lineDataPtr += 4;
|
destPtr[4] = bigcoltab640a[((unsigned int*)lineDataPtr)[8]]
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[9]];
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
destPtr[5] = bigcoltab640a[((unsigned int*)lineDataPtr)[10]]
|
||||||
lineDataPtr += 4;
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[11]];
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
destPtr[6] = bigcoltab640a[((unsigned int*)lineDataPtr)[12]]
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[13]];
|
||||||
lineDataPtr += 4;
|
destPtr[7] = bigcoltab640a[((unsigned int*)lineDataPtr)[14]]
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[15]];
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
destPtr += 8;
|
||||||
lineDataPtr += 4;
|
lineDataPtr += 32;
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
|
||||||
lineDataPtr += 4;
|
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
|
||||||
lineDataPtr += 4;
|
|
||||||
}
|
}
|
||||||
while (destPtr < finalDestPtr) {
|
while (destPtr < finalDestPtr) {
|
||||||
*(destPtr++) = bigcoltab640a[*(unsigned int*)(void*)lineDataPtr]
|
*(destPtr++) = bigcoltab640a[*(unsigned int*)lineDataPtr]
|
||||||
+ bigcoltab640b[*(unsigned int*)(void*)(lineDataPtr+2)];
|
+ bigcoltab640b[((unsigned int*)lineDataPtr)[1]];
|
||||||
lineDataPtr += 4;
|
lineDataPtr += 4;
|
||||||
}
|
}
|
||||||
/* Final byte to produce */
|
/* Final byte to produce */
|
||||||
|
@ -155,25 +149,19 @@ void RawDraw (void) {
|
||||||
}
|
}
|
||||||
else { /* 320 mode */
|
else { /* 320 mode */
|
||||||
while (destPtr + 7 < finalDestPtr) { /* Unrolled loop */
|
while (destPtr + 7 < finalDestPtr) { /* Unrolled loop */
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
*destPtr = bigcoltab320[*(unsigned int*)lineDataPtr];
|
||||||
lineDataPtr += 2;
|
destPtr[1] = bigcoltab320[((unsigned int*)lineDataPtr)[1]];
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
destPtr[2] = bigcoltab320[((unsigned int*)lineDataPtr)[2]];
|
||||||
lineDataPtr += 2;
|
destPtr[3] = bigcoltab320[((unsigned int*)lineDataPtr)[3]];
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
destPtr[4] = bigcoltab320[((unsigned int*)lineDataPtr)[4]];
|
||||||
lineDataPtr += 2;
|
destPtr[5] = bigcoltab320[((unsigned int*)lineDataPtr)[5]];
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
destPtr[6] = bigcoltab320[((unsigned int*)lineDataPtr)[6]];
|
||||||
lineDataPtr += 2;
|
destPtr[7] = bigcoltab320[((unsigned int*)lineDataPtr)[7]];
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
destPtr += 8;
|
||||||
lineDataPtr += 2;
|
lineDataPtr += 16;
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
|
||||||
lineDataPtr += 2;
|
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
|
||||||
lineDataPtr += 2;
|
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
|
||||||
lineDataPtr += 2;
|
|
||||||
}
|
}
|
||||||
while (destPtr < finalDestPtr) {
|
while (destPtr < finalDestPtr) {
|
||||||
*(destPtr++) = bigcoltab320[*(unsigned int*)(void*)lineDataPtr];
|
*(destPtr++) = bigcoltab320[*(unsigned int*)lineDataPtr];
|
||||||
lineDataPtr += 2;
|
lineDataPtr += 2;
|
||||||
}
|
}
|
||||||
/* Final byte to produce */
|
/* Final byte to produce */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user