Motion Estimation on H264 encoding.

Hi! I’m new at this forum and i’m learning CUDA programming.
I saw many posts about motion estimation, some with code examples.
My question is, there is some working motion estimation algorithm for h264 using CUDA?
How can we use the Optical Flow example to write code for the motion estimation on h264 encoding?

Thanks for your time.