mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-20 22:32:01 +00:00
[client] egl: fix messy white level default definition
This commit is contained in:
@@ -180,7 +180,7 @@ bool egl_cursorInit(EGL_Cursor ** cursor)
|
|||||||
atomic_init(&(*cursor)->scale , 1.0f );
|
atomic_init(&(*cursor)->scale , 1.0f );
|
||||||
atomic_init(&(*cursor)->mapSDRtoPQ, false);
|
atomic_init(&(*cursor)->mapSDRtoPQ, false);
|
||||||
atomic_init(&(*cursor)->sdrWhiteLevel,
|
atomic_init(&(*cursor)->sdrWhiteLevel,
|
||||||
(float)KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -446,6 +446,6 @@ void egl_cursorSetHDRState(EGL_Cursor * cursor, bool hdrActive, bool hdrPQ,
|
|||||||
float sdrWhiteLevel)
|
float sdrWhiteLevel)
|
||||||
{
|
{
|
||||||
atomic_store(&cursor->sdrWhiteLevel, sdrWhiteLevel > 0.0f ?
|
atomic_store(&cursor->sdrWhiteLevel, sdrWhiteLevel > 0.0f ?
|
||||||
sdrWhiteLevel : (float)KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
||||||
atomic_store(&cursor->mapSDRtoPQ, hdrActive && hdrPQ);
|
atomic_store(&cursor->mapSDRtoPQ, hdrActive && hdrPQ);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
// Fallback used by producers that cannot report the source display's SDR
|
// Fallback used by producers that cannot report the source display's SDR
|
||||||
// white level. IDD frames override this with IDDCX_METADATA2::SdrWhiteLevel.
|
// white level. IDD frames override this with IDDCX_METADATA2::SdrWhiteLevel.
|
||||||
#define KVMFR_SDR_WHITE_LEVEL_DEFAULT 203u
|
#define KVMFR_SDR_WHITE_LEVEL_DEFAULT 203
|
||||||
|
|
||||||
#define KVMFR_MAX_DAMAGE_RECTS 64
|
#define KVMFR_MAX_DAMAGE_RECTS 64
|
||||||
|
|
||||||
|
|||||||
2
obs/lg.c
2
obs/lg.c
@@ -883,7 +883,7 @@ static void lgFormatInit(LGPlugin * this, const KVMFRFrame * frame,
|
|||||||
this->hdr = frame->flags & FRAME_FLAG_HDR;
|
this->hdr = frame->flags & FRAME_FLAG_HDR;
|
||||||
this->hdrPQ = frame->flags & FRAME_FLAG_HDR_PQ;
|
this->hdrPQ = frame->flags & FRAME_FLAG_HDR_PQ;
|
||||||
this->sdrWhiteLevel = frame->sdrWhiteLevel ?
|
this->sdrWhiteLevel = frame->sdrWhiteLevel ?
|
||||||
(float)frame->sdrWhiteLevel : (float)KVMFR_SDR_WHITE_LEVEL_DEFAULT;
|
frame->sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT;
|
||||||
|
|
||||||
if (this->hdr && this->hdrPQ)
|
if (this->hdr && this->hdrPQ)
|
||||||
lgComputeColorMatrix(this);
|
lgComputeColorMatrix(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user