I am writing an app that takes the camera feed, converts it to rgb, in order to do some processing.
It works fine on the old camera implementation which uses NV21 Y
Have you tried using this script? It's an answer posted by yydcdut on this question
https://github.com/pinguo-yuyidong/Camera2/blob/master/camera2/src/main/rs/yuv2rgb.rs