Hardware conversion video file in YUV

Hi, all
in the case of video conversion using GPU, source file for CUDA must be in YUV (NV12) format. Big advantage will be possibility using hardware decoding (for exmple on integrated graphic card) in to YUV and then translate stream in to CUDA. Maybe somebody can help in question to obtain YUV stream or file from hardware resources??