ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.01k stars 407 forks source link

SimdYuv420pSaveAsJpegToMemory #226

Closed mikeversteeg closed 1 year ago

mikeversteeg commented 1 year ago

I'm very impressed by SimdYuv420pSaveAsJpegToMemorybut there is a problem with the colour space conversion. If I go from YUV420P to JPEG and back, the images look washed. Is there a colour space mismatch or is this caused by JPEG compression?

Also please note when choosing SimdPixelFormatNoneI get BGR, not YUV420P.

ermig1979 commented 1 year ago

JPEG is image format with loss (except quality =100) so it can cause wash. As to color space see documetaion of function SimdYuv420pSaveAsJpegToMemory: http://ermig1979.github.io/Simd/help/group__image__io.html#gac0ee5c58a3d4de7540d52e7356d2dbab