Hi,
In tegra_multimedia_api, we support lossless encoding in YUV444 input frames. Please refer to 01_video_encode and try:
$ gst-launch-1.0 videotestsrc num-buffers=60 ! 'video/x-raw, width=(int)1280, height=(int)720, format=(string)Y444' ! filesink location=origin.yuv
$ video_encode origin.yuv 1280 720 H264 out.264 --elossless