|
18 | 18 | #include "session_worker.h"
|
19 | 19 | #include "stream/input/session_virt_mouse.h"
|
20 | 20 |
|
| 21 | +// Expected luminance values in SEI are in units of 0.0001 cd/m2 |
| 22 | +#define LUMINANCE_SCALE 10000 |
| 23 | + |
21 | 24 | int streaming_errno = GS_OK;
|
22 | 25 | char streaming_errmsg[1024];
|
23 | 26 |
|
@@ -192,19 +195,19 @@ void streaming_set_hdr(session_t *session, bool hdr) {
|
192 | 195 | },
|
193 | 196 | .whitePointX = hdr_metadata.whitePoint.x,
|
194 | 197 | .whitePointY = hdr_metadata.whitePoint.y,
|
195 |
| - .maxDisplayMasteringLuminance = hdr_metadata.maxDisplayLuminance, |
| 198 | + .maxDisplayMasteringLuminance = hdr_metadata.maxDisplayLuminance * LUMINANCE_SCALE, |
196 | 199 | .minDisplayMasteringLuminance = hdr_metadata.minDisplayLuminance,
|
197 | 200 | .maxContentLightLevel = hdr_metadata.maxContentLightLevel,
|
198 | 201 | .maxPicAverageLightLevel = hdr_metadata.maxFrameAverageLightLevel,
|
199 | 202 | };
|
200 | 203 | SS4S_PlayerVideoSetHDRInfo(session->player, &info);
|
201 | 204 | } else {
|
202 | 205 | SS4S_VideoHDRInfo info = {
|
203 |
| - .displayPrimariesX = {13250, 7500, 34000}, |
204 |
| - .displayPrimariesY = {34500, 3000, 16000}, |
| 206 | + .displayPrimariesX = {34000, 13250, 7500}, |
| 207 | + .displayPrimariesY = {16000, 34500, 3000}, |
205 | 208 | .whitePointX = 15635,
|
206 | 209 | .whitePointY = 16450,
|
207 |
| - .maxDisplayMasteringLuminance = 1000, |
| 210 | + .maxDisplayMasteringLuminance = 1000 * LUMINANCE_SCALE, |
208 | 211 | .minDisplayMasteringLuminance = 50,
|
209 | 212 | .maxContentLightLevel = 1000,
|
210 | 213 | .maxPicAverageLightLevel = 400,
|
|
0 commit comments