The systems and methods described herein are directed at accelerating
video encoding using a graphics processing unit. In one aspect, a video
encoding system uses both a central processing unit (CPU) and a graphics
processing unit (GPU) to perform video encoding. The system implements a
technique that enables the GPU to perform motion estimation for video
encoding. The technique allows the GPU to perform a motion estimation
process in parallel with the video encoding process performed by the CPU.
The performance of video encoding using such a system is greatly
accelerated as compared to encoding using just the CPU.In another aspect,
data related to motion estimation is arranged and provided to the GPU in
a way that utilizes the capabilities of the GPU. Data about video frames
may be collocated to enable multiple channels of the GPU to process tasks
in parallel. The depth buffer of the GPU may be used to consolidate
repeated calculations and searching tasks during the motion estimation
process. The use of frame collocation and depth buffer enables the GPU to
be better utilized and to further accelerate video encoding.