Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/zlib/deflate.h

Issue 552123005: Integrate SIMD optimisations for zlib (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix crc_fold_copy to work with inputs where len % 16 > 0 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/zlib/deflate.h
diff --git a/third_party/zlib/deflate.h b/third_party/zlib/deflate.h
index 2fe6fd6670f5f6742655c736d08fd2c89b58dc6c..f5c7a8ba5b6059b494a660e9ab0622cf911094b5 100644
--- a/third_party/zlib/deflate.h
+++ b/third_party/zlib/deflate.h
@@ -107,6 +107,8 @@ typedef struct internal_state {
Byte method; /* STORED (for zip only) or DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
+ unsigned zalign(16) crc0[4 * 5];
+
/* used by deflate.c: */
uInt w_size; /* LZ77 window size (32K by default) */
@@ -344,4 +346,15 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
flush = _tr_tally(s, distance, length)
#endif
+/* Functions that are SIMD optimised on x86 */
+void ZLIB_INTERNAL crc_fold_init(deflate_state* const s);
+void ZLIB_INTERNAL crc_fold_copy(deflate_state* const s,
+ unsigned char* dst,
+ const unsigned char* src,
+ long len);
+unsigned ZLIB_INTERNAL crc_fold_512to32(deflate_state* const s);
+
+Pos ZLIB_INTERNAL insert_string_sse(deflate_state* const s, const Pos str);
+void ZLIB_INTERNAL fill_window_sse(deflate_state* s);
+
#endif /* DEFLATE_H */

Powered by Google App Engine
This is Rietveld 408576698