mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 00:28:20 +00:00
[obs] added RGBA16F support
This commit is contained in:
parent
919b77df71
commit
a78d9c2b90
10
obs/lg.c
10
obs/lg.c
@ -31,6 +31,7 @@ typedef struct
|
|||||||
char * shmFile;
|
char * shmFile;
|
||||||
uint32_t width, height;
|
uint32_t width, height;
|
||||||
FrameType type;
|
FrameType type;
|
||||||
|
int bpp;
|
||||||
struct IVSHMEM shmDev;
|
struct IVSHMEM shmDev;
|
||||||
PLGMPClient lgmp;
|
PLGMPClient lgmp;
|
||||||
PLGMPClientQueue frameQueue, pointerQueue;
|
PLGMPClientQueue frameQueue, pointerQueue;
|
||||||
@ -474,11 +475,18 @@ static void lgVideoTick(void * data, float seconds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum gs_color_format format;
|
enum gs_color_format format;
|
||||||
|
this->bpp = 4;
|
||||||
switch(this->type)
|
switch(this->type)
|
||||||
{
|
{
|
||||||
case FRAME_TYPE_BGRA : format = GS_BGRA ; break;
|
case FRAME_TYPE_BGRA : format = GS_BGRA ; break;
|
||||||
case FRAME_TYPE_RGBA : format = GS_RGBA ; break;
|
case FRAME_TYPE_RGBA : format = GS_RGBA ; break;
|
||||||
case FRAME_TYPE_RGBA10 : format = GS_R10G10B10A2; break;
|
case FRAME_TYPE_RGBA10 : format = GS_R10G10B10A2; break;
|
||||||
|
|
||||||
|
case FRAME_TYPE_RGBA16F:
|
||||||
|
this->bpp = 8;
|
||||||
|
format = GS_RGBA16F;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("invalid type %d\n", this->type);
|
printf("invalid type %d\n", this->type);
|
||||||
os_sem_post(this->frameSem);
|
os_sem_post(this->frameSem);
|
||||||
@ -508,7 +516,7 @@ static void lgVideoTick(void * data, float seconds)
|
|||||||
this->linesize, // dstpitch
|
this->linesize, // dstpitch
|
||||||
frame->height, // height
|
frame->height, // height
|
||||||
frame->width, // width
|
frame->width, // width
|
||||||
4, // bpp
|
this->bpp, // bpp
|
||||||
frame->pitch // linepitch
|
frame->pitch // linepitch
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user