During a discussion about the error related to relatively high power consumption compared to Windows on AMD APU with hardware video decoding support, AMD engineer Alex Deucher, the lead developer of the amdgpu driver, acknowledged that video playback in Linux is fundamentally inefficient.
The following chain is currently used for video output in Linux:
- Compressed video stream
- VCN (hardware video decoding module for AMD GPU)
- Raw YUV data
- Palette conversion, scaling on the GFX module (essentially a 3D accelerator in the GPU, causing it to increase core and VRAM frequencies)
- RGB data
- Output to display.
How it should work:
- Compressed video stream
- VCN
- Raw YUV data
- A display controller that will convert the palette, scale, and display.
This could be more efficiently addressed in Wayland compositors, but there is currently no implementation. This issue is resolved in Microsoft Windows and Google Android, as they have full-fledged standalone compositors that provide the necessary capabilities and APIs—something that is still lacking in Linux, since neither X.org nor Wayland can work with YUV streams directly.
Source: opennet.ru
