The library also supports the three different YUV (YCrCb to be correct) color spaces that exist (see comments in code), and others can be added simply.
There is a simple test program, that convert a raw YUV file to rgb ppm format, and measure computation time.
To generate the rgb file, you can use the ImageMagick convert program:
convert example.jpg example.ppm
Then, for YUV420 to RGB24 conversion, use the test program like that:
./test_yuv_rgb yuv2rgb image.yuv 4096 2160 image
The second and third parameters are image width and height (that are needed because not available in the raw YUV file), and fourth parameter is the output filename template (several output files will be generated, named for example output_sse.ppm, output_av.ppm, etc.)
Similarly, for RGB24 to YUV420 conversion:
./test_yuv_rgb yuv2rgb image.ppm image
On my computer, the test program on a 4K image give the following for yuv2rgb:
Time will be measured in each configuration for 100 iterations...
Processing time (std) : 2.630193 sec
Processing time (sse2_unaligned) : 0.704394 sec
Processing time (ffmpeg_unaligned) : 1.221432 sec
Processing time (ipp_unaligned) : 0.636274 sec
Processing time (sse2_aligned) : 0.606648 sec
Processing time (ffmpeg_aligned) : 1.227100 sec
Processing time (ipp_aligned) : 0.636951 sec
And for rgb2yuv:
Time will be measured in each configuration for 100 iterations...