In the WWDC 2021 video 10047, it was mentioned to look for availability of Lossless CVPixelBuffer format and fallback to normal BGRA32 format if it is not available. But in the updated AVMultiCamPiP sample code, it first looks for Lossy format than the lossless. Why is it so and whats the exact difference it would make if we select lossy vs lossless?
Lossy vs Lossless CVPixelBuffer
Lossy compression would imply that a more aggressive compression is applied, which might result in an even smaller buffer size than lossless compression, but at the cost of some loss in quality compared to the uncompressed data.
You can try out the various formats and then inspect the buffers you receive to see how much data they are carrying. You can also visually inspect the video, you may find lossy compression has acceptable quality for your use case.