esp32-opencv icon indicating copy to clipboard operation
esp32-opencv copied to clipboard

[Fix] Enable JPEG support with `-DBUILD_JPEG_TURBO_DISABLE=ON` command

Open SolomonLeon opened this issue 4 months ago • 0 comments

Reason

Opencv use libjpeg-turbo as the default option of jpeg library. However, according to the official page of libjpeg-turbe project,

libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, AVX2, Neon, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, Arm, and PowerPC systems

The native support for Xtensa platform is not available in libjpeg-turbo, which is why simply enabling -DBUILD_JPEG=ON during compilation may lead to failure

Solution

Use libjpeg instead of libjpeg-turbo. Add -DBUILD_JPEG_TURBO_DISABLE=ON to the cmake command.

Related Links

SolomonLeon avatar Feb 29 '24 10:02 SolomonLeon