I want to create a YUV422 Frame sample on Ubuntu from any image so that I can encode the YUV422 function for RGB888 for the sake of learning. I would really like to have a reliable tool for creating a sample and converting back to jpeg.
I tried ImageMagick, but I am clearly doing something wrong:
convert -size 640x480 -depth 24 test.jpg -colorspace YUV -size 640x480 -depth 16 -sampling-factor 4:2:2 tmp422.yuv

convert -colorspace YUV -size 640x480 -depth 16 -sampling-factor 4:2:2 tmp422.yuv -size 640x480 -depth 24 -colorspace RGB test2.jpg

I also installed the mpegtools package on Ubuntu to use jpeg2yuv:
>> jpeg2yuv -f 1 test.jpg INFO: [jpeg2yuv] Reading jpeg filenames from stdin. INFO: [jpeg2yuv] Parsing & checking input files. **ERROR: [jpeg2yuv] System error while opening: "": No such file or directory
Clearly, something else is wrong. Can anyone shed some light on how I can do this? Thanks -
source share