All of the big three GPU vendors (Intel, AMD, NVIDIA) support hardware video decoding and encoding onboard their GPUs for a very long time.
Intel and NVIDIA generally adds dedicated silicon for these tasks, and AMD prefers to use shaders for video tasks. They started doing shader based video processing in Radeon 8500 days, and they're very experienced in video processing, since they had AiO wonder cards which did also capture and even TV in some models. Trying to render analog signals nicely on a PC screen provided them considerable R&D and know how during that journey.
Correction: AMD has dedicated video encoder DSP called VCE[0].
[0]: https://en.wikipedia.org/wiki/Video_Coding_Engine