mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-17 14:43:09 +00:00
Use colorspace helper with VAAPI direct rendering
This commit is contained in:
parent
8a224fbae4
commit
84fc5f3008
1 changed files with 4 additions and 8 deletions
|
@ -632,19 +632,15 @@ VAAPIRenderer::renderFrame(AVFrame* frame)
|
||||||
|
|
||||||
// NB: Not all VAAPI drivers respect these flags. Many drivers
|
// NB: Not all VAAPI drivers respect these flags. Many drivers
|
||||||
// just ignore them and do the color conversion as Rec 601.
|
// just ignore them and do the color conversion as Rec 601.
|
||||||
switch (frame->colorspace) {
|
switch (getFrameColorspace(frame)) {
|
||||||
case AVCOL_SPC_BT709:
|
case COLORSPACE_REC_709:
|
||||||
flags |= VA_SRC_BT709;
|
flags |= VA_SRC_BT709;
|
||||||
break;
|
break;
|
||||||
case AVCOL_SPC_BT470BG:
|
case COLORSPACE_REC_601:
|
||||||
case AVCOL_SPC_SMPTE170M:
|
|
||||||
flags |= VA_SRC_BT601;
|
flags |= VA_SRC_BT601;
|
||||||
break;
|
break;
|
||||||
case AVCOL_SPC_SMPTE240M:
|
|
||||||
flags |= VA_SRC_SMPTE_240;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
// Unknown colorspace
|
// Unsupported colorspace
|
||||||
SDL_assert(false);
|
SDL_assert(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue