mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Provide valid default preferred formats for YUV444
This commit is contained in:
@@ -228,12 +228,14 @@ public:
|
|||||||
|
|
||||||
virtual AVPixelFormat getPreferredPixelFormat(int videoFormat) {
|
virtual AVPixelFormat getPreferredPixelFormat(int videoFormat) {
|
||||||
if (videoFormat & VIDEO_FORMAT_MASK_10BIT) {
|
if (videoFormat & VIDEO_FORMAT_MASK_10BIT) {
|
||||||
// 10-bit YUV 4:2:0
|
return (videoFormat & VIDEO_FORMAT_MASK_YUV444) ?
|
||||||
return AV_PIX_FMT_P010;
|
AV_PIX_FMT_YUV444P10 : // 10-bit 3-plane YUV 4:4:4
|
||||||
|
AV_PIX_FMT_P010; // 10-bit 2-plane YUV 4:2:0
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Planar YUV 4:2:0
|
return (videoFormat & VIDEO_FORMAT_MASK_YUV444) ?
|
||||||
return AV_PIX_FMT_YUV420P;
|
AV_PIX_FMT_YUV444P : // 8-bit 3-plane YUV 4:4:4
|
||||||
|
AV_PIX_FMT_YUV420P; // 8-bit 3-plane YUV 4:2:0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user