So I have a raw video in yuv420p format - input.yuv, and I know its frame size. I execute 2 commands:
ffmpeg -pix_fmt yuv420p -s 352x288 -i input.yuv -pix_fmt yuv422p input_yuv422p.yuv
and then
ffmpeg -pix_fmt yuv422p -s 352x288 -i input_yuv422p.yuv -pix_fmt yuv420p input_decoded.yuv
The problem is that files input.yuv and input_decoded.yuv differ. My understanding is that when we convert to yuv422p from yuv420p - we should essentially copy existing U and V components to produce more samples to fill in; then, when converting back - we should simply drop these samples, and receive the original file back, but that's not what I see. Am I doing something wrong here, and is it possible to receive original yuv420p back?