mirror of
https://github.com/opencv/opencv.git
synced 2024-12-19 20:18:01 +08:00
0de26fd78e
Zlib-ng is zlib replacement with optimizations for "next generation" systems. Its optimization may benifits image library decode and encode speed such as libpng. In our tests, if using zlib-ng and libpng combination on a x86_64 machine with AVX2, the time of `imdecode` amd `imencode` will drop 20% approximately. This patch enables zlib-ng's optimization if `CV_DISABLE_OPTIMIZATION` is OFF. Since Zlib-ng can dispatch intrinsics on the fly, port work is much easier. Related discussion: https://github.com/opencv/opencv/issues/22573
25 lines
558 B
C
25 lines
558 B
C
/* x86_features.h -- check for CPU features
|
|
* Copyright (C) 2013 Intel Corporation Jim Kukunas
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
|
|
#ifndef X86_FEATURES_H_
|
|
#define X86_FEATURES_H_
|
|
|
|
struct x86_cpu_features {
|
|
int has_avx2;
|
|
int has_avx512;
|
|
int has_avx512vnni;
|
|
int has_sse2;
|
|
int has_ssse3;
|
|
int has_sse42;
|
|
int has_pclmulqdq;
|
|
int has_vpclmulqdq;
|
|
int has_os_save_ymm;
|
|
int has_os_save_zmm;
|
|
};
|
|
|
|
void Z_INTERNAL x86_check_features(struct x86_cpu_features *features);
|
|
|
|
#endif /* CPU_H_ */
|