joachimBurket / esp32-opencv

Shrinked OpenCV for ESP32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

SolomonLeon opened this issue · 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