WIP: round-trip test for the hardware encoders (interrupted by a session limit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
312f97dd63
commit
847b55fafb
2 files changed
+29
No files matched your search
Generated
+1
@@ -9188,6 +9188,7 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
"voelin-stream",
|
||||||
"wasapi",
|
"wasapi",
|
||||||
"wayland-client",
|
"wayland-client",
|
||||||
"wayland-protocols",
|
"wayland-protocols",
|
||||||
|
|||||||
@@ -148,6 +148,34 @@ fn software_encoders_roundtrip() {
|
|||||||
eprintln!("tested: {tested:?}");
|
eprintln!("tested: {tested:?}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// What the GPU encoders produce, through the same round-trip as the
|
||||||
|
/// software ones: our own decoders have to decode it (OpenH264 for H.264 with
|
||||||
|
/// `VOELIN_OPENH264_LIB`, dav1d for AV1 with `--features av1`), keyframes
|
||||||
|
/// where asked, timestamps kept, PSNR above 28 dB.
|
||||||
|
///
|
||||||
|
/// Whatever hardware the machine has; skipped where none of it works. HEVC is
|
||||||
|
/// left out, having no decoder here.
|
||||||
|
#[test]
|
||||||
|
fn hardware_encoders_roundtrip() {
|
||||||
|
if ffmpeg().is_none() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let names: Vec<&'static str> = BACKENDS
|
||||||
|
.iter()
|
||||||
|
.filter(|b| b.is_hardware() && matches!(b.codec, Codec::H264 | Codec::Av1))
|
||||||
|
.map(|b| b.name)
|
||||||
|
.filter(|name| available(name))
|
||||||
|
.collect();
|
||||||
|
if names.is_empty() {
|
||||||
|
eprintln!("no usable hardware encoder, skipped");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for name in &names {
|
||||||
|
roundtrip(name);
|
||||||
|
}
|
||||||
|
eprintln!("tested: {names:?}");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn x264_is_constrained_high_and_changes_size() {
|
fn x264_is_constrained_high_and_changes_size() {
|
||||||
if ffmpeg().is_none() || !available("libx264") {
|
if ffmpeg().is_none() || !available("libx264") {
|
||||||
|
|||||||
Reference in new issue
Block a user