mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 02:19:12 +08:00
85923c8f30
Update zlib-ng to 2.2.1 #26113 Release: https://github.com/zlib-ng/zlib-ng/releases/tag/2.2.1 ARM diagnostics patch: https://github.com/zlib-ng/zlib-ng/pull/1774 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
56 lines
2.1 KiB
C
56 lines
2.1 KiB
C
/* functable.h -- Struct containing function pointers to optimized functions
|
|
* Copyright (C) 2017 Hans Kristian Rosbach
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
|
|
#ifndef FUNCTABLE_H_
|
|
#define FUNCTABLE_H_
|
|
|
|
#include "deflate.h"
|
|
#include "crc32.h"
|
|
|
|
#ifdef DISABLE_RUNTIME_CPU_DETECTION
|
|
|
|
# include "arch_functions.h"
|
|
|
|
/* When compiling with native instructions it is not necessary to use functable.
|
|
* Instead we use native_ macro indicating the best available variant of arch-specific
|
|
* functions for the current platform.
|
|
*/
|
|
# define FUNCTABLE_INIT ((void)0)
|
|
# define FUNCTABLE_CALL(name) native_ ## name
|
|
# define FUNCTABLE_FPTR(name) &native_ ## name
|
|
|
|
#else
|
|
|
|
struct functable_s {
|
|
void (* force_init) (void);
|
|
uint32_t (* adler32) (uint32_t adler, const uint8_t *buf, size_t len);
|
|
uint32_t (* adler32_fold_copy) (uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
|
uint8_t* (* chunkmemset_safe) (uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
|
uint32_t (* chunksize) (void);
|
|
uint32_t (* compare256) (const uint8_t *src0, const uint8_t *src1);
|
|
uint32_t (* crc32) (uint32_t crc, const uint8_t *buf, size_t len);
|
|
void (* crc32_fold) (struct crc32_fold_s *crc, const uint8_t *src, size_t len, uint32_t init_crc);
|
|
void (* crc32_fold_copy) (struct crc32_fold_s *crc, uint8_t *dst, const uint8_t *src, size_t len);
|
|
uint32_t (* crc32_fold_final) (struct crc32_fold_s *crc);
|
|
uint32_t (* crc32_fold_reset) (struct crc32_fold_s *crc);
|
|
void (* inflate_fast) (PREFIX3(stream) *strm, uint32_t start);
|
|
uint32_t (* longest_match) (deflate_state *const s, Pos cur_match);
|
|
uint32_t (* longest_match_slow) (deflate_state *const s, Pos cur_match);
|
|
void (* slide_hash) (deflate_state *s);
|
|
};
|
|
|
|
Z_INTERNAL extern struct functable_s functable;
|
|
|
|
|
|
/* Explicitly indicate functions are conditionally dispatched.
|
|
*/
|
|
# define FUNCTABLE_INIT functable.force_init()
|
|
# define FUNCTABLE_CALL(name) functable.name
|
|
# define FUNCTABLE_FPTR(name) functable.name
|
|
|
|
#endif
|
|
|
|
#endif
|