[client] implement support for RGB24 packed data

This commit is contained in:
Geoffrey McRae
2023-11-03 07:03:32 +11:00
parent 578d98fd22
commit c665044bfa
30 changed files with 548 additions and 151 deletions

View File

@@ -625,6 +625,8 @@ int main_frameThread(void * unused)
lgrFormat.type = frame->type;
lgrFormat.screenWidth = frame->screenWidth;
lgrFormat.screenHeight = frame->screenHeight;
lgrFormat.dataWidth = frame->dataWidth;
lgrFormat.dataHeight = frame->dataHeight;
lgrFormat.frameWidth = frame->frameWidth;
lgrFormat.frameHeight = frame->frameHeight;
lgrFormat.stride = frame->stride;
@@ -664,21 +666,25 @@ int main_frameThread(void * unused)
}
g_state.rotate = lgrFormat.rotate;
dataSize = lgrFormat.dataHeight * lgrFormat.pitch;
bool error = false;
switch(frame->type)
{
case FRAME_TYPE_RGBA:
case FRAME_TYPE_BGRA:
case FRAME_TYPE_RGBA10:
dataSize = lgrFormat.frameHeight * lgrFormat.pitch;
lgrFormat.bpp = 32;
break;
case FRAME_TYPE_RGBA16F:
dataSize = lgrFormat.frameHeight * lgrFormat.pitch;
lgrFormat.bpp = 64;
break;
case FRAME_TYPE_BGR:
lgrFormat.bpp = 24;
break;
default:
DEBUG_ERROR("Unsupported frameType");
error = true;
@@ -695,9 +701,10 @@ int main_frameThread(void * unused)
g_state.formatValid = true;
formatVer = frame->formatVer;
DEBUG_INFO("Format: %s %ux%u stride:%u pitch:%u rotation:%d hdr:%d pq:%d",
DEBUG_INFO("Format: %s %ux%u (%ux%u) stride:%u pitch:%u rotation:%d hdr:%d pq:%d",
FrameTypeStr[frame->type],
frame->frameWidth, frame->frameHeight,
frame->dataWidth , frame->dataHeight ,
frame->stride, frame->pitch,
frame->rotation,
frame->flags & FRAME_FLAG_HDR ? 1 : 0,