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 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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue