In short, hardware acceleration replaces software with hardware modules.AlgorithmTo make full use of the inherent fast features of hardware. The computer displays that hardware acceleration is faster, but the display area is black on the projector or when it is found. In this case, hardware acceleration is disabled (in the opposite direction of hardware acceleration ).
How does the system work when hardware decoding takes effect? Now we have threeProcessor, CPU, GPU, and APU (not a accelerator processor, but a sound processor ). They exchange data through the PCI/AGP/PCIe bus.
1. CPU fromFile SystemRead the original data (Source Filter of DirectShow), and extract the compressed video data (splitter ). In the system memory. GPU and APU in a daze
2. the CPU handed over the compressed audio and video data to the GPU and APU, and the bus started to get busy, the compressed data is copied from the system memory to the video memory on the video card and the audio memory on the card (if any ).
3. the cpu requires GPU and APU to start hardware decoding. Now the CPU is in a daze And the GPU and APU are busy. Of course, the CPU regularly queries how the GPU and APU are busy.
4. GPU and APU start to use their own circuit to decode the video data (already in the display and sound storage), and the decompressed data is still in the video and sound storage. The CPU continues to be in a daze.
5. audio and video data cannot be played immediately after decoding, because it still needs to be processed later, such as deinterlace, 3: 2 pulldown, Doppler effect, and so on. GPU and APU use their own post-processing circuit for processing. CPU is still in a daze.
6. uncompressed data after processing is played, and GPU is busy with video scaling, brightness, gamma, and other things. CPU is idle.
7. The GPU and APU are busy. Where is the video data below? CPU notification. GPU and APU will be paused first. The CPU is busy again. Go back to step 1.