This program is part of Netpbm.
yuy2topam reads raw YUY2 bytes as input and produces a PAM image as output. The input file is just YUY2 bytes. You have to specify the width and height on the command line, since the program obviously can't get them from the file. The output image has maxval 255.