mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 18:09:11 +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
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/* chunkset.c -- inline functions to copy small data chunks.
|
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
|
*/
|
|
|
|
#include "zbuild.h"
|
|
|
|
typedef uint64_t chunk_t;
|
|
|
|
#define CHUNK_SIZE 8
|
|
|
|
#define HAVE_CHUNKMEMSET_4
|
|
#define HAVE_CHUNKMEMSET_8
|
|
|
|
static inline void chunkmemset_4(uint8_t *from, chunk_t *chunk) {
|
|
uint8_t *dest = (uint8_t *)chunk;
|
|
memcpy(dest, from, sizeof(uint32_t));
|
|
memcpy(dest+4, from, sizeof(uint32_t));
|
|
}
|
|
|
|
static inline void chunkmemset_8(uint8_t *from, chunk_t *chunk) {
|
|
memcpy(chunk, from, sizeof(uint64_t));
|
|
}
|
|
|
|
static inline void loadchunk(uint8_t const *s, chunk_t *chunk) {
|
|
memcpy(chunk, (uint8_t *)s, sizeof(uint64_t));
|
|
}
|
|
|
|
static inline void storechunk(uint8_t *out, chunk_t *chunk) {
|
|
memcpy(out, chunk, sizeof(uint64_t));
|
|
}
|
|
|
|
#define CHUNKSIZE chunksize_c
|
|
#define CHUNKCOPY chunkcopy_c
|
|
#define CHUNKUNROLL chunkunroll_c
|
|
#define CHUNKMEMSET chunkmemset_c
|
|
#define CHUNKMEMSET_SAFE chunkmemset_safe_c
|
|
|
|
#include "chunkset_tpl.h"
|
|
|
|
#define INFLATE_FAST inflate_fast_c
|
|
|
|
#include "inffast_tpl.h"
|