EglImage (or CUeglFrame) preprocessing

I saw one way referenced here is convert the EglFrame to opencv first and then process. But it seems this is not optimal. Any other suggestions? For context, I couldn’t use gstreamer and deepstream for legacy issue. Currently our program is a custom c++ program.