3 ms·
The VP9 codec I imagine would heavily benefit from SIMD? Just SIMD should massively outperform any advantage gained by putting this into the kernel. Why does th
by vladimirralev 3y ago
The VP9 codec I imagine would heavily benefit from SIMD? Just SIMD should massively outperform any advantage gained by putting this into the kernel. Why does the kernel need an unoptimized codec?
- ZeroCool2u 3y agoSIMD can be pretty architecture specific. For example, does the CPU support AVX-512 or SSE3? So, you have to have a few code paths if you're going to support a wide variety of hardware. I don't have an answer to your question it just occurs to me that maybe the Linux kernel doesn't allow a lot of SIMD for this reason or maybe they require a fall back/slow code path to be available if you're submitting a patch that includes SIMD operations? Curious if anyone knows the answer to this.
- __s 3y agoKernel avoids SIMD because it doesn't have a kernel keeping its registers coherent https://stackoverflow.com/a/46677815 https://stackoverflow.com/a/46677815
- deleted 3y ago[deleted]
- ZeroCool2u 3y agoThank you for the answer! Very interesting.
- brundolf 3y agoFwiw, Rust's standard library has a cross-platform Simd abstraction: https://doc.rust-lang.org/std/simd/index.html https://doc.rust-lang.org/std/simd/index.html It's nightly-only for now, but I've used it and it's lovely. I've added Simd to projects that I never otherwise would have, just because this made it so easy and accessible
- ZeroCool2u 3y agoThat is metal af ;)
- pavon 3y agoI don't think that the driver implements VP9 in software. It uses hardware acceleration to perform the actual encode/decode, but is managing preparing of coefficients and DMA of data buffers in the driver.