4 ms·
It's a hardware decoder.
by ahupp 6y ago
It's a hardware decoder.
- octoberfranklin 6y agoQuestion is valid. Hardware 3D graphics acceleration is driven almost entirely by userspace libraries (libGL) rather than in the kernel. In what way is video different from graphics to justify this change?
- kelnos 6y ago3D accel is not driven by userspace libraries. libGL (and others) provide a stable userspace interface, which, under the covers, communicates with a kernel driver. Think of it in a similar way as how libc provides userspace interfaces (like open(), read(), write(), close()) that translates to kernel syscalls to get the work done. Obviously OpenGL is a lot more complex than the syscall example I gave, but the principle is similar.
- octoberfranklin 6y ago> 3D accel is not driven by userspace libraries. Of course it is. The kernel knows absolutely nothing about the hardware shaders' instruction set or machine code format. The userspace libraries have an entire compiler in them. The kernel just forwards the output of this compiler to the hardware.
- ahupp 6y agoSure, but the point is that there's a necessary kernel component to provide access control, mediate between different users, abstract across different hardware, etc. I don't know exactly what's in this patch set, but in general I'd be surprised to see hardware that didn't require some kind of kernel interface to access it.
- octoberfranklin 6y agoSo, we appear to be drifting off topic here. The root-level comment is basically asking why the kernel needs to know anything at all about H.264, rather than just shuffling bytes back and forth between a hardware accelerator and a userspace library (which has a gigantic complex H.264 protocol encoder/decoder in it). I pointed out that in the 3D acceleration world, the kernel doesn't know anything at all about shader ISAs, and just shuffles bytes back and forth between a hardware 3D accelerator and a userspace library (which has a gigantic complex compiler in it). I still don't feel the question has been addressed. H.264 is hideously complicated, like shader ISAs. Why don't we move all that hideous complexity out of the kernel for H.264 the way we have for shader ISAs?
- lunixuser 6y agoA lot of the OpenGL driver seems to be at the userspace level: https://commons.wikimedia.org/wiki/File:Linux_kernel_and_OpenGL_video_games.svg https://commons.wikimedia.org/wiki/File:Linux_kernel_and_Ope...