else b = max - a; \
double_b = (1.0 * b * (max - a)/(max*1.0)); \
total_alpha = a + double_b; \
- px = *op; *op++ = (a*in_r + double_b*px) / total_alpha; \
- px = *op; *op++ = (a*(in_g-ofs) + double_b*(px-ofs)) / total_alpha + ofs; \
- px = *op; *op++ = (a*(in_b-ofs) + double_b*(px-ofs)) / total_alpha + ofs; \
- if( comps == 4 ) { b = *op; *op++ = a + b - a*b / max; } \
+ if (total_alpha > 0.00000001) { \
+ px = *op; *op++ = (a*in_r + double_b*px) / total_alpha; \
+ px = *op; *op++ = (a*(in_g-ofs) + double_b*(px-ofs)) / total_alpha + ofs; \
+ px = *op; *op++ = (a*(in_b-ofs) + double_b*(px-ofs)) / total_alpha + ofs; \
+ if( comps == 4 ) { b = *op; *op++ = a + b - a*b / max; } \
+ } \
} \
} \
}
opencv.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF
openexr.cfg_vars?=true; \#
openexr.mak_vars?=true; \#
+opus.cfg_params?= --disable-extra-programs
speech_tools.mak_params?=-j1
tiff.cfg_vars+=LIBS+=" -lpthread"
tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\