How convert NV12 to a planar format

how to use nvjpeg encode nv12 image,is the nvjpegimage_t reverse right,


and now my jpeg image is white and black
hope all one help thanks!!!