|
|
|
@ -31,112 +31,128 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities |
|
|
|
(VideoFormat.H264, "baseline" or "66") => false, |
|
|
|
(VideoFormat.H264, "baseline" or "66") => false, |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "main" or "77") => |
|
|
|
(VideoFormat.H264, "main" or "77") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.H264Main, |
|
|
|
VaapiProfile: VaapiProfile.H264Main, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "high" or "100") => |
|
|
|
(VideoFormat.H264, "high" or "100") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "high 10" or "110") => |
|
|
|
(VideoFormat.H264, "high 10" or "110") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "baseline constrained" or "578") => |
|
|
|
(VideoFormat.H264, "baseline constrained" or "578") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.H264ConstrainedBaseline, |
|
|
|
VaapiProfile: VaapiProfile.H264ConstrainedBaseline, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Mpeg2Video, "main" or "4") => |
|
|
|
(VideoFormat.Mpeg2Video, "main" or "4") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Main, |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Main, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Mpeg2Video, "simple" or "5") => |
|
|
|
(VideoFormat.Mpeg2Video, "simple" or "5") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Simple, |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Simple, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "simple" or "0") => |
|
|
|
(VideoFormat.Vc1, "simple" or "0") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vc1Simple, |
|
|
|
VaapiProfile: VaapiProfile.Vc1Simple, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "main" or "1") => |
|
|
|
(VideoFormat.Vc1, "main" or "1") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vc1Main, |
|
|
|
VaapiProfile: VaapiProfile.Vc1Main, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "advanced" or "3") => |
|
|
|
(VideoFormat.Vc1, "advanced" or "3") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vc1Advanced, |
|
|
|
VaapiProfile: VaapiProfile.Vc1Advanced, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Hevc, "main" or "1") => |
|
|
|
(VideoFormat.Hevc, "main" or "1") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.HevcMain, |
|
|
|
VaapiProfile: VaapiProfile.HevcMain, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Hevc, "main 10" or "2") => |
|
|
|
(VideoFormat.Hevc, "main 10" or "2") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.HevcMain10, |
|
|
|
VaapiProfile: VaapiProfile.HevcMain10, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 0" or "0") => |
|
|
|
(VideoFormat.Vp9, "profile 0" or "0") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile0, |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile0, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 1" or "1") => |
|
|
|
(VideoFormat.Vp9, "profile 1" or "1") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile1, |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile1, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 2" or "2") => |
|
|
|
(VideoFormat.Vp9, "profile 2" or "2") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile2, |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile2, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 3" or "3") => |
|
|
|
(VideoFormat.Vp9, "profile 3" or "3") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile3, |
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile3, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Av1, "main" or "0") => |
|
|
|
(VideoFormat.Av1, "main" or "0") => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Av1Profile0, |
|
|
|
VaapiProfile: VaapiProfile.Av1Profile0, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
@ -170,28 +186,32 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities |
|
|
|
VideoFormat.H264 when bitDepth == 10 => false, |
|
|
|
VideoFormat.H264 when bitDepth == 10 => false, |
|
|
|
|
|
|
|
|
|
|
|
VideoFormat.H264 => |
|
|
|
VideoFormat.H264 => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.H264Main, |
|
|
|
VaapiProfile: VaapiProfile.H264Main, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
VideoFormat.Hevc when bitDepth == 10 => |
|
|
|
VideoFormat.Hevc when bitDepth == 10 => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.HevcMain10, |
|
|
|
VaapiProfile: VaapiProfile.HevcMain10, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
VideoFormat.Hevc => |
|
|
|
VideoFormat.Hevc => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.HevcMain, |
|
|
|
VaapiProfile: VaapiProfile.HevcMain, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
VideoFormat.Mpeg2Video => |
|
|
|
VideoFormat.Mpeg2Video => |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
_profileEntrypoints.Any( |
|
|
|
|
|
|
|
e => e is |
|
|
|
{ |
|
|
|
{ |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Main, |
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Main, |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Encode or VaapiEntrypoint.EncodeLowPower |
|
|
|
|