mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-16 00:07:58 +00:00
Re-add comment on color_range comparison
This commit is contained in:
parent
2959faca0c
commit
1193943228
1 changed files with 6 additions and 0 deletions
|
@ -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 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;
|
||||
}
|
||||
|
||||
|
@ -664,6 +667,9 @@ const float *EGLRenderer::getColorMatrix(const AVFrame* frame) {
|
|||
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);
|
||||
switch (frame->colorspace) {
|
||||
case AVCOL_SPC_SMPTE170M:
|
||||
|
|
Loading…
Reference in a new issue