|
|
|
@ -31,68 +31,116 @@ 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.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.H264Main, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.H264Main, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "high" or "100") => |
|
|
|
(VideoFormat.H264, "high" or "100") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.H264High, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "high 10" or "110") => |
|
|
|
(VideoFormat.H264, "high 10" or "110") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.H264High, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.H264High, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.H264, "baseline constrained" or "578") => |
|
|
|
(VideoFormat.H264, "baseline constrained" or "578") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.H264ConstrainedBaseline, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.H264ConstrainedBaseline, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Mpeg2Video, "main" or "4") => |
|
|
|
(VideoFormat.Mpeg2Video, "main" or "4") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Mpeg2Main, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Main, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Mpeg2Video, "simple" or "5") => |
|
|
|
(VideoFormat.Mpeg2Video, "simple" or "5") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Mpeg2Simple, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Mpeg2Simple, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "simple" or "0") => |
|
|
|
(VideoFormat.Vc1, "simple" or "0") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vc1Simple, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vc1Simple, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "main" or "1") => |
|
|
|
(VideoFormat.Vc1, "main" or "1") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vc1Main, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vc1Main, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vc1, "advanced" or "3") => |
|
|
|
(VideoFormat.Vc1, "advanced" or "3") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vc1Advanced, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vc1Advanced, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Hevc, "main" or "1") => |
|
|
|
(VideoFormat.Hevc, "main" or "1") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.HevcMain, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.HevcMain, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Hevc, "main 10" or "2") => |
|
|
|
(VideoFormat.Hevc, "main 10" or "2") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.HevcMain10, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.HevcMain10, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 0" or "0") => |
|
|
|
(VideoFormat.Vp9, "profile 0" or "0") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile0, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile0, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 1" or "1") => |
|
|
|
(VideoFormat.Vp9, "profile 1" or "1") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile1, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile1, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 2" or "2") => |
|
|
|
(VideoFormat.Vp9, "profile 2" or "2") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile2, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile2, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Vp9, "profile 3" or "3") => |
|
|
|
(VideoFormat.Vp9, "profile 3" or "3") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile3, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Vp9Profile3, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
(VideoFormat.Av1, "main" or "0") => |
|
|
|
(VideoFormat.Av1, "main" or "0") => |
|
|
|
_profileEntrypoints.Contains( |
|
|
|
_profileEntrypoints.Any(e => e is |
|
|
|
new VaapiProfileEntrypoint(VaapiProfile.Av1Profile0, VaapiEntrypoint.Decode)), |
|
|
|
{ |
|
|
|
|
|
|
|
VaapiProfile: VaapiProfile.Av1Profile0, |
|
|
|
|
|
|
|
VaapiEntrypoint: VaapiEntrypoint.Decode |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
// fall back to software decoder
|
|
|
|
// fall back to software decoder
|
|
|
|
_ => false |
|
|
|
_ => false |
|
|
|
|