You can add some post-processing before wrapping it to NvBuffer format.
For example, we apply the below conversion before exporting the disparity to Y8.
Yes, I could do that but if I use Y8 then I lose the subpixel information from disparity. I need to either store it as floating point, or 16 bit to keep the subpixel information.
Disparity from VPI is scaled by 32, as there are 32 subdivisions per pixel. That means the output range of the disparity is 32*max_disp, which is greater than can be saved in 8 bits