I have a YUV 420NV12 image. I'm using ffmpeg to convert the YUV file to PNG and then back again to YUV.
ffmpeg -s 640x480 -pix_fmt nv12 -i testold.yuv test-640x480 test.png ffmpeg -i test.png -s 640x480 -pix_fmt nv12 testnew.yuv
When I compare the two YUV files, there are few differences. I expected PNG to be a lossless compression. What is the reason for difference in two files?