mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Re-add comment on color_range comparison
This commit is contained in:
@@ -626,6 +626,9 @@ const float *EGLRenderer::getColorOffsets(const AVFrame* frame) {
|
|||||||
static const float limitedOffsets[] = { 16.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f };
|
static const float limitedOffsets[] = { 16.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f };
|
||||||
static const float fullOffsets[] = { 0.0f, 128.0f / 255.0f, 128.0f / 255.0f };
|
static const float fullOffsets[] = { 0.0f, 128.0f / 255.0f, 128.0f / 255.0f };
|
||||||
|
|
||||||
|
// This handles the case where the color range is unknown,
|
||||||
|
// so that we use Limited color range which is the default
|
||||||
|
// behavior for Moonlight.
|
||||||
return (frame->color_range == AVCOL_RANGE_JPEG) ? fullOffsets : limitedOffsets;
|
return (frame->color_range == AVCOL_RANGE_JPEG) ? fullOffsets : limitedOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -664,6 +667,9 @@ const float *EGLRenderer::getColorMatrix(const AVFrame* frame) {
|
|||||||
1.4746f, -0.5714f, 0.0f
|
1.4746f, -0.5714f, 0.0f
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This handles the case where the color range is unknown,
|
||||||
|
// so that we use Limited color range which is the default
|
||||||
|
// behavior for Moonlight.
|
||||||
bool fullRange = (frame->color_range == AVCOL_RANGE_JPEG);
|
bool fullRange = (frame->color_range == AVCOL_RANGE_JPEG);
|
||||||
switch (frame->colorspace) {
|
switch (frame->colorspace) {
|
||||||
case AVCOL_SPC_SMPTE170M:
|
case AVCOL_SPC_SMPTE170M:
|
||||||
|
|||||||
Reference in New Issue
Block a user