Commit Graph

335 Commits

Author SHA1 Message Date
Roy Oursler
18fd996588 igzip: Add flush type performance testing to igzip_perf
Change-Id: I66de7fa27de43ada1930475aafd1558f09d32ea9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-10-17 13:51:09 -07:00
Roy Oursler
71a76468d6 igzip: Setup wrapper_hdr_test to use isal_gzip_hdr_init
Change-Id: I42c6ff0375b87d892bfebf28853403adef0a68c7
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-10-16 18:36:05 -07:00
Greg Tucker
41fc273c43 igzip: Add missing files for distcheck
Change-Id: Ic6acd926c19113ecfa4233ca8d0a658e1a10ecd8
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-09-21 16:13:17 -07:00
Roy Oursler
a570a3e5d4 igzip: Limit max compare_large to limit redundant matching
Change-Id: I989c9b805700fdced4624fb5f4b4c19cce389448
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
906e5d213b igzip: Test swap flush for all levels
Change-Id: I889af775ba3474cf802e2bcb85f82d39d60ee518
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
9689ba7e13 igzip: Remove igzip copy of crc32_gzip
Change-Id: I859ed904effa0a8bd7462b77b13e359014912639
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
7205c23647 igzip: Improve optional compile options for wrapper_hdr_test
Change TEST_SEED and RANDOMS to be set only when they
are not already defined.

Change-Id: Ib101be4a1726875372eb7b19cd1bcdae90c9267d
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
c19657241a igzip: Setup optimized static header table to be default
Change-Id: Ia54682f7e1e321a26f941da8f884f385cfd42ad9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
a673395ac0 igzip: Improve test to test create_hufftables_subset
Change-Id: Ibefb5daa37050e6739f7004ff6e2004c342dd422
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
b9a546058f igzip: Add gzip/zlib wrapper testing to large test
Change-Id: I656c29f123692d2b29d70cb3c6711b49aafb1dc9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
f1f8d0917d igzip: Modify stateless to limit max compression size
Change-Id: Ic2fcbe8fe643bcbd00bdc13e649e42b639098dad
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
49e3329729 igzip: Fix Stateless Full Flush type0 block bugs
Prevent type 0 block in stateless full flush from attempting to write a trailer
when it not the end of the stream and fix the values of block_start and
block_end.

Change-Id: Ia8beac20fc244b1b3e5690cbc15d4d4bb8ada68e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
a1f8e55d11 igzip: Remove movnti instructions
Change-Id: I760b737bb5b138de4d62d841e2f24bc41c6a8b68
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
7345490999 igzip: Modify igzip_body assembly to run to last 16 bytes.
Change-Id: Ib2c688d0b2d7ff5d4fd7b14bb6eea72a7f689cd3
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
52d974762b igzip: Create precomputed static inflate_huff_code
Change-Id: I94a2de2b5e5bebc37e30f5d597a95c493da504c0
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
8387b65800 igzip: Modify hash table size based on input size
Change-Id: Ieeddb36ef8cd9615011876e4d8dc941a06622d1b
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
8e4f1a1a38 igzip: Create generic deflate performance utility
Change-Id: Idf180660797f97a492550fb557652f036cd55509
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
991fd252f1 igzip: Remove igzip_perf.c
Compression is too data dependent for igzip_perf.c to give any meaninful result.

Change-Id: I6d22cb5eb959404807b9c83de38e06d46c3ede76
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
ff1928e8ec igzip: Create functions to write gzip/zlib headers
Change-Id: If5aaa277a01214bd36406ee11680df0904ad12f7
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
43374f6776 igzip: Implement gzip/zlib header/trailer parsing
Change-Id: I3fe8653f2286212a9d6c6ecfa3b78752b2cac8ef
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
aa8b51930f igzip: Add variable history window to perf test
Change-Id: Ia5eb10094e8c84778ed6cf3a51ddade9a19103b5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
1409f70c7e igzip: Modify test to check validity of window bits
Change-Id: Id198bb019057e54226a90c3d82d00746df04da63
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
11542000f0 igzip: Implement limited window size for inflate
Change-Id: Ib7fce6a51db99fc7e11f06f5916c2b755bfc5c67
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-20 11:12:02 -07:00
Roy Oursler
03bef684a4 igzip: Setup for variable hash mask
Change-Id: I3be94dbc40c2e02dcff4f89e5a9df8ed1f744f02
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-18 14:27:25 -07:00
Roy Oursler
6317ce2b78 igzip: Setup for variable lookback distance
Change-Id: Idd52c9392113dfc54feea3c66916a7f5aa128bef
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-09-18 14:27:25 -07:00
Roy Oursler
f421ea8d7a igzip: Modify isal_deflate buffer management
Change-Id: I2f12a0acf8ceeffb7328093e25205a6e73484159
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:30 -07:00
Roy Oursler
c1876a1221 igzip: Fixup level 3 first byte handling
Change-Id: Id9f59934d43b09af3c2ec722f5a825aa9b02e2dc
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:30 -07:00
Roy Oursler
cd7b70dd41 igzip: Fix level 3 gen_map end of buffer handling
Change-Id: I3ed75b0ade5af23a98d916e867bb93ee9ad3a992
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:30 -07:00
Roy Oursler
bca564035a igzip: Move stream off the stack in test_compres_multi_pass
Change-Id: Iac7e48d52159936b6623542a118227d4aa63c8e0
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:30 -07:00
Roy Oursler
a6f438f935 igzip: Make igzip_rand_test exit when an error happens
Change-Id: I35249618dad9668b361a87ee827820e977148a7c
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:30 -07:00
Roy Oursler
649ad89cdf igzip: Fix large buffer bug due to promoting total_in to uint64_t
Change-Id: Ibf7af1695d3d04a30c09f8bf2b444e4a5b87971a
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 16:35:23 -07:00
Roy Oursler
fac7e7ce18 igzip: Pass writeable buffer to test_compress
The function test_compress in igzip_rand_test modifies the input buffer as part
of the test, passing in a read only buffer can cause issues.

Change-Id: Ib1e67ec72d9c95ea983b5f7550deb3d56cde4260
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 13:18:05 -07:00
Roy Oursler
bb3c6c28c8 igzip: Remove need for total_in_start
Change-Id: Ie9ab3e702ce07a5ba8d6fb3275da98e03c25822b
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-21 13:18:05 -07:00
Roy Oursler
64aefbfcba igzip: Fix level 3 compression drop
Change-Id: I67d66323850d1e42ab1c38b212f4cb5ad8699920
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-15 11:19:28 -07:00
Roy Oursler
a32245b97b igzip: Fix underflow bug in total_in in isal_deflate()
Fix bug introduced by patch 2a292689e.

Change-Id: If53af716d546e9430eb8aaae32c2f6133aba21a2
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-15 11:18:33 -07:00
Roy Oursler
2a292689ec igzip: Fix deflate for large buffers
Change-Id: I1993e0a6d3aa36c68af80229329316b2e0616a09
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-07 09:52:55 -07:00
Roy Oursler
995d420c6b igzip: Fix inflate for large output files
Change-Id: I3d3532100f8d60e0b446f5c90fc820cbfd2df1ec
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-08-03 12:54:05 -07:00
Roy Oursler
7da82d555f igzip: Add missing USE_HSWNI defines
Change-Id: Ic3f2e1dada0c61e7b78068131fbea37023215844
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-07-26 11:10:13 -07:00
Roy Oursler
cfa1400557 igzip: Add zlib inflate perf testing
Change-Id: Ida40fbeb4dae15c1fd85ae23644b6c08efe79182
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-07-12 13:42:39 -07:00
Greg Tucker
c66302370e igzip: Fix for inflate perf test stateless
Test was missing reset of inbuf for each iteration and not checking fopen.
Also redid the loop a bit.

Change-Id: Ia55e80e2ba79b14c26d0db6d722eebc2e6f14cc5
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-28 13:55:57 -07:00
Greg Tucker
b1c4517557 igzip: Add a few missing asm copyright headers
Change-Id: Iddcfbd357efa17dbbd32acacac952579fc052756
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-21 14:50:40 -07:00
Greg Tucker
e8d15527fb igzip: Remove igzip_sync_flush_file_perf
Performance test had limited functionality.

Change-Id: I5abc839fafc1351de7543531e7770b6add0bcb1d
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-21 14:39:08 -07:00
Greg Tucker
da1aee8714 igzip: Remove references to types.h
Previously included just for struct alignment but all restrictions
have been removed.

Change-Id: I3fa7cbab86fce419b3b3bfccb48d9129bd77cf64
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-21 14:39:08 -07:00
Greg Tucker
d30b45ffbe igzip: Remove unused initialization in inflate expand huffcode
Change-Id: Ia9732fc4a2acc9990e3b2b77bc604f740ce6be30
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-06-21 14:39:08 -07:00
Roy Oursler
e8ca21baf4 igzip: Fix update_histogram_base buffer finish
Change-Id: Ib74988a79baca7f5095447458d7374f834d1c138
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:35:14 -07:00
Roy Oursler
31204ae96e igzip: Reduce igzip_gen_icf_map_lh1_04 data usage
Change-Id: Ida538675ef0ffe0e3d65e1aed382b2e04ed83baf
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
ff00a0f927 igzip: Reduce data usage in igzip_gen_icf_map_lh1_06
Change-Id: I453f6c6e71f236145c1e79493710c85847ed8c70
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
d389b8d6f8 igzip: Move COMPARE_TYPES usage
Change-Id: I87d88618b6f86c1f9618ba9cea132153a8ef2fa5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
21e78d5aa3 igzip: improve igzip_body_compilations
Change-Id: I7ad859a986c643336be8824f6400b266ff140dcd
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
14ba3747b5 igzip: Optimize multibyte for small files
Change-Id: I8400e0be07da75fd549724147ab06aa71f7cc9df
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
5d6d9a21eb igzip: Optimize bit reverse
Change-Id: I45244b8c2f07fab0f237b11b92fa5f557aff878b
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
7faedc71bd igzip: Rename tzcnt to more accurate tzbytecnt
Change-Id: Ifc0b828f50e4c1feaf141e0164749eca3b227996
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
3732485914 igzip: Accept multiple inflate codes for matches of 258
Allow inflate to accept code 284 with extra bits 0x1f to be accepted
as a match of length 258. This matches zlib's behaviour.

Change-Id: Id85052ceea2b23d3db9c147672dd7996a4c66786
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
a778455448 igzip: Fix bug in create_rand_repeat_data
Change-Id: Ib3ab731ea9a96cdbd0380d6a88b3837ae0de0815
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
054758ea63 igzip: Add back inflate std vectors test with updated errors
Change-Id: I5e46fa028baec8b8b0a3435b5d1cc11303e39abd
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
a61e035445 igzip: Improve inflate invalid block identification
Change-Id: I31ab9fa641e448c643ff4c6e606837c07ec2b14f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
b3ddaff6c5 igzip: Create flag to determine maximum symbols decoded
Change-Id: I94c185bf10662931248ccae07aa5659626f1deb2
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
2de5a0fd88 igzip: Swap length code lookup with length lookup
Change-Id: I9f1c3ea5353f2c2fa98bab1d0cb1eb3c7b7397f6
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
ec6169ac3b igzip: Combine distance code and extra bit count lookup
Change-Id: I12dca7126313406afd6ccbbaa91e7a1cc4a91bc0
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
16f32e179c igzip: Reoptimize decode_stateless due to multibyte decode
Change-Id: I1479772062be584f5087bf2999ba4500a340ca51
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
abd1963a22 igzip: Allow decoding symbol triples
Change-Id: I82e088b65a37adb1853ce2525dafafec06586a0f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
bf4c2dab27 igzip: Allow decoding symbol pairs
Change-Id: I306404d7821cf4e43c28ae6477038b17a29b0c47
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
021afc5911 igzip: Remove inflate standard vectors
Change-Id: Ib7a5e8e8d63bc895eddc85c1eb1f5ab2edd56515
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
3d1b5b40d3 igzip: Rearrangement of make_inflate_huff_code
Change-Id: Ieff4a7c03827ff6a41b2e8e7316b239b94343c1a
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
222a68f760 igzip: Implement multibyte decode
Change-Id: I923a57a01f696f2082945fafcc2773655b9a5beb
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
0b8fe87648 igzip: Verbose printing for multi_pass inflate
Change-Id: Iea1ebf1f185bf90da441d27df479e164d21fb74c
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
7a1dc55c27 igzip: Increase size of large short code lookup
Change-Id: I05a564d1759ae417a966f3a12621799db0edf80a
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Roy Oursler
fbeb7c83c4 igzip: Some general cleanup of the decode_block assembly
Change-Id: Ie30955fcb47ffc9b23f0c50f520cbd9973b2b315
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-06-14 15:30:14 -07:00
Konstantine Kharlamov
19f2c46d1b igzip: fix build failure for CPUs with BMI capability
…also makes use of an optimized algorithm for x86_64 CPUs without the BMI.

v2: use "defined()" macro

igzip: s/__bsfq/__builtin_ctzll

Per discussion at https://github.com/01org/isa-l/pull/38 __bsfq isn't
defined on clang, but __builtin_ctzll should work same way.

Also, refactor the code a bit.

Change-Id: I1a251abe1fab1be1cbdc2c042298d0b500068c68
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
2018-05-25 10:27:50 -07:00
Greg Tucker
951ec3198f test: Fix clang warning in inflate perf test
Change-Id: I4bd30057a9a6f508af871b0828193004e405daa7
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2018-05-08 11:31:21 -07:00
Roy Oursler
7274d27ff6 igzip: Implement stateful blocks perf testing
Change-Id: I2a1baa2d3c09d894dee54d5be8c1e9aa2ed434af
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-04-24 10:09:45 -07:00
Roy Oursler
83c2ec02cc igzip: Add runtime options to inflate perf
Change-Id: If520c1d499d49779f35dffc550b5612dab6839c7
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-04-13 13:20:57 -07:00
Daniel Verkamp
6e9f576bff igzip: remove detect_repeated_char()
This was replaced with detect_repeated_char_length(), but the
implementation of the old function was never removed.

Change-Id: I55485cec324dce01033b73f24474f1aca2a31bd3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-29 09:33:04 -07:00
Daniel Verkamp
f9a61187c5 igzip: remove stray duplicate semicolon
Change-Id: I0df14600e2f49dd04d3e94bdfe2c155faa9ac2ee
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-29 09:31:40 -07:00
Roy Oursler
bb05f0fcdb igzip: Fix sizeof(void *) in isal_create_hufftables
Fixes #33

Change-Id: I43640b4ccdf165c84757ea7b3ace80f3dc4aafde
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-22 13:19:30 -07:00
Roy Oursler
4734834501 igzip: Fix uninitialized used of bl_count[0]
Fixes #34

Change-Id: I489b1ae24212d81875b96f687f3543ac548e2278
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-22 13:05:56 -07:00
Daniel Verkamp
bcde6e410b igzip: mark huff_codes.c internal functions static
Remove declarations from huff_codes.h (preserving doc comments where
applicable) and mark functions that are only called within huff_codes.c
as static.

Change-Id: Idc0113d4eca9e97347def86a502073ef7126114b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-15 12:34:46 -07:00
Daniel Verkamp
a301835e06 igzip: mark proc_heap_base.c internal function static
heapify() is only used within proc_heap_base.c.

Change-Id: I68cc11c2a82fa7f6a989a1838c0e744c0c23feb3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-15 12:34:33 -07:00
Daniel Verkamp
69176f5428 igzip: mark igzip_icf_body.c internal function static
compress_icf_map_g() is only used within igzip_icf_body.c.

Change-Id: Id488d6721c60c1909c922a5e0bd162b1542e71ca
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-15 12:34:12 -07:00
Daniel Verkamp
575664e78b igzip: mark internal igzip.c function static
detect_repeated_char_length() is only used within igzip.c.

Change-Id: I77ee5422e2cb58d81b9705ebcfad68f3a7017d6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-15 12:33:49 -07:00
Daniel Verkamp
bc78944634 igzip: drop declarations of non-existent functions
valid_lit_huff_table() and valid_dist_huff_table() were declared in an
internal header, but they were never defined or called anywhere.

Change-Id: I59ddf35f161276fca6d6b58081cf640bbea41252
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-12 09:08:06 -07:00
Daniel Verkamp
e815371be7 igzip: remove unused hash_section() function
This isn't referenced anywhere and isn't part of the public API.

Change-Id: I1e4809c8cc4ac64310fa151425e710abb7351079
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-12 08:47:49 -07:00
Daniel Verkamp
07eac8fc12 igzip: mark private data as static
These globals are only used within huff_codes.c, so they don't need to
be globally visible.

Change-Id: I1e118b3a95cfb7d21bf33c66559362483e460d58
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-12 08:28:10 -07:00
Roy Oursler
4b45beff4f igzip: Avoid some nested multibinary calls in deflate_body
Change-Id: I2b433f63664ffa27fc125a6a859a1b8053212d7f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-01 13:27:48 -07:00
Roy Oursler
47e914f98f igzip: Fix Windows prologue for avx 512 gen_map and set_long
Change-Id: I8e326dc7fb67f30101d03dc364ffba25242e1f67
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-01 13:27:48 -07:00
Roy Oursler
aedf4f8cff igzip: create optimized set_long_icf_fg for avx2
Change-Id: I027e73eaa908ca69a5c1af5a52b464f1963fd2da
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-01 13:27:48 -07:00
Roy Oursler
9acc3ed2ac igzip: Create AVX2 optimized version of level 3
Change-Id: Icfdb67445ee5afff85441cfee23beb66bfe15d5e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-03-01 13:27:38 -07:00
Jean-Yves VET
52bb322912 build: fix compilation with CPU not supporting SSE
This patch makes the project compile and run (tests and
performance tests as well) with CPUs which are not
supporting SSE instructions.

Signed-off-by: Jean-Yves Vet <jyvet@ddn.com>
2018-02-23 06:13:10 -05:00
Roy Oursler
148898c6ba igizp: Print error when test_compress_file fails in igzip_rand_test
Change-Id: I5b03b006708778cb61edb3d456d22d08f1169309
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2018-01-04 09:13:59 -07:00
Greg Tucker
22ec5c7469 igzip: Fix igzip fuzz test for lev2-3 buf size
Also remove unnecessary deps in igzip makefile.

Change-Id: I1ff79461df6d60bfc52c99b574c39098f1fe238a
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-12-19 11:01:46 -07:00
Greg Tucker
6b1c9a95c8 igzip: Fix syntax for win yasm for when avx512 is supported
Currently can't test because yasm doesn't support avx512 but should
get the syntax correct for when it does.

Change-Id: I672b47b83b96861d8b9bfb0af02e726a1949aca0
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-12-19 10:33:53 -07:00
Roy Oursler
48119c5c87 igzip: Increase long_code_lookup struct size to fix buffer overflow
Change-Id: I6546dcb7ffcd5895292d06fdc748c3cf279a4542
2017-12-19 10:24:23 -07:00
Roy Oursler
e3fad7c45a igzip: Fix out buffer overflow in write_type0_header
Fix a possible 1 byte overflow by creating a combined write_bits and flush.

Change-Id: I2d2455e9e32a820522ff1d89d016db72a82baed9
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
5d413c8b12 igzip: Use full 32 bits histogram elements in igizp_icf_body/finish
This fix prevents possible histogram overflow in compression.

Change-Id: Ie5f25d1bace7f443f432678fcfbd9050ac65113f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
8965584ae3 igzip: Implement large hash table method as level 2
Move current level 2 compression to be level 3 and create a level 2
compression which is the same algorithm as level 1 but with a larger
hashtable.

Change-Id: I398a6017c2ff218dded24e229fb51c23ea69f314
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
7a12bcb2a8 igzip: Separate concept of level and compression method
Change-Id: I82a5fbeb93adc77057893c643e044e311e4f393c
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
fe68f02dac igzip: Move hash_table and symbol histogram for icf compression
Change-Id: I50df9c8915ff3e1af450aeb8e4c0cc3baf9624ae
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
2573f3cd87 igzip: Create defines for lvl1 hash table and histogram
Change-Id: I4cdf7af4e482b8105aef024085323d0b1cd622ef
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
06cd70481c igzip: Separate defines for LVL1 and LVL0 hash tables
Change-Id: I19bdec8d2d0c74083bc1695763c9630516995885
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
9203f96c2a igzip: Change inputs to deflate_hash functions
Change-Id: I9ffff9aee82d5d1ece51853b4709f13ccd80c8ad
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
fe90c14bc3 igzip: Fix issues for large file inputs to igzip_rand_test
Change-Id: Ic77834d771b2eebdfb7eeed782ee0d69e7905fa5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
b4ebd1c6e7 igzip: Fix bug in igzip_rand_test where invalid flag is set
Change-Id: I0d9418bcb48bd40e2fb8bb9105f38cffe77ba33d
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
4ae2d1be29 igzip: Implement optimized level 2 compression
Change-Id: I8cf5bcd56f290d17205ac36dc2828c8acfc66947
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
3c62216aa1 igzip: Remove some uneccessary random data generation from igzip_rand_test
Change-Id: I7c10c95549b9d825360d8f033f8dc3d8546d4d4c
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
4de751f35a igzip: Improve VERBOSE printing in igzip_rand_test
Change-Id: Ib04361d0980920e81f901da3df234f9299669a98
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
864634a62b igzip: Modify rand_test to not call rand() within VERBOSE blocks
Change-Id: Ice907a9eae72662a741d3d02a3926683e65c173d
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
a7d474a55c igzip: Fix rand_test_bug where invalid flush case can have a valid flush
Change-Id: I6459432cb14b0c91f07b87a54c224f71ee03a05a
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
49156c3568 igzip: Implement block buffer
Change-Id: I9d7942740557e4ffaf8e223e190f4bd4e4f47b1e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
6049ce3ca7 igzip: Modify state to record total_in on deflate call
Change-Id: I13e5878a227732545aee5a762bf5a9a75ce73f02
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Roy Oursler
59b9990a39 igzip: Remove file_start from zstate
Change-Id: Ia4cb6dc86da54cc771f25a6d958bea730caa4801
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-12-15 14:27:14 -07:00
Greg Tucker
4f59eeda90 test: Add llvm fuzz testing
Moved the afl fuzz test and added llvm fuzz tests including inflate
and round trip compress and inflate.  Currently only works with clang,
std makefile and libFuzzer installed.  Need to add checking and
support later when libfuzzer is more tightly integrated into the
compiler.

Change-Id: I2db9ad2335d6c5ed846886703b58225f67bcc935
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-11-17 17:28:27 -07:00
Roy Oursler
f7b6e73146 igzip: Improve igzip_rand_test compress_multi_pass by modifying in buffer
Modify igzip_rand_test to test that data after next_in can be modified without
producing incorrect compressed data.

Change-Id: Ic6b62f269c6783407fbec7222ae73f24d3735717
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-10-20 15:29:39 -07:00
Greg Tucker
48d74d6e51 igzip: Fix perf test to only open dictionary if specified
Change-Id: Idf5048589af5b61da5ccccf25c575dfc05ea15ec
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-10-11 15:57:41 -07:00
Roy Oursler
e79c57c7e3 igzip: Fix issue with isal_create_hufftables_subset
isal_create_hufftables_subset failed to generate length symbols, but should
generate those symbols as a histogram does not guarantee finding all lengths
found in compression

Change-Id: I880210fe1b1078de8617cab0ecb93c9810b9c9de
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-09-21 17:24:56 -07:00
Greg Tucker
f78601adb9 igzip: Pick faster crc32 gzip function for sse4.2 machines
For machines with sse4.2 but not avx we can choose a faster version of
crc32_gzip. For highly compressible files using gzip format (rfc 1952) this can
be a significant advantage.

Change-Id: Ib699a68999290eed4b83f9bbf54dc6c304a5c445
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-09-20 10:50:16 -07:00
Peng Xiao
9099918dcb fixing huff_codes.c's compiling problem on CentOS 6.5 as gcc 4.4.7 only support C89
Signed-off-by: Peng Xiao <xiao.peng61@zte.com.cn>
2017-08-25 11:07:23 +00:00
Roy Oursler
aff6555226 igzip: Optimized deflate_hash
Optimize deflate hash by unrolling crc calculations.

Change-Id: Ief882910619a2cc3b052416d30499f6226e47419
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:42:37 -07:00
Roy Oursler
cf936f0d84 igzip: Remove igzip_sync_flush_perf
Remove igzip_sync_flush perf because the perf test does not give any new
information, and the data used does is not a representative work load.

Change-Id: I7b68f8b7c6da0944ace5a2a9e31db378135689ff
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:39:14 -07:00
Roy Oursler
80bfbb33df igzip: Remove DECLARE_ALIGNED and optimize structure layout
Change-Id: I95bc3b8e2e30aff0d596c743158337400c4eb486
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:35:44 -07:00
Greg Tucker
a7fad4b9d2 igzip: Change a few conflicting functions to static
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-08-18 14:34:14 -07:00
Roy Oursler
48d7def5d9 igzip: Fix inflate total_out behavior to align with expected behavior
Modify total_out to be total data decompressed into user supplied buffers,
rather than to user supplied and internal buffers.

Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-08-18 14:28:10 -07:00
Xiaodong Liu
3ab8239097 multibinary: move WRT_OPT macro to common header
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
2017-08-18 14:24:57 -07:00
Roy Oursler
34c341db35 igzip: Add reset functions for both deflate and inflate.
Change-Id: I8677a4365ac5c2343751660176f3b2eb4746ddfe
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:14:44 -04:00
Xiaodong Liu
39ce870235 igzip: slver typo fix
Change-Id: I13e6d150d0c661ee6dda9c25162c9ade5136d367
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
2017-06-26 04:12:19 -04:00
Roy Oursler
ed15402f5b igzip: Add stateful dictionary support
Change-Id: I75dbac947787bc0041674468c88d0aa41b8b082f
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:11:48 -04:00
Roy Oursler
1a7c640ef9 igzip: Fix 0 length file and looping errors in igzip_inflate_test
Change-Id: I328f241ba07d8a0ae4fbc4c7de2ea8913912a188
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-26 04:11:03 -04:00
Greg Tucker
a8966b6709 igzip: Add unit tests for adler and crc32_gzip
Also renamed test helper function, fixed clang warnings and adler usage.

Change-Id: I4ad22d046809483456608be1f4fdc4adbf0e09e4
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 04:03:35 -04:00
Greg Tucker
e1f5284ff8 igzip: Add sse optimized adler32 checksum
Change-Id: Id07727b8a8da4b41aa983b487ca881552d5190ee
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 04:01:29 -04:00
Greg Tucker
3025e83b91 igzip: Add avx2 optimized adler32 checksum
Change-Id: I019a38cf98836e3e6c7215a6914b85abb9399e33
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-06-26 03:56:49 -04:00
Roy Oursler
f4a5b303e2 igzip: Remove BITBUF8 and BITBUF_ELSE compile options
Change-Id: Iad3b2e6f9a32473b6e59910494c75d82558fc28e
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 06:03:51 -04:00
Roy Oursler
edacadc8fb igzip: Modify encode_df_04 to behave more like encode_df_06 algorithm
Change-Id: I39c5d0d8182efb0fe8aa6bea97d9361df4ee8ddf
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 06:02:13 -04:00
Roy Oursler
5a55e3096c igzip: Avx512 version for encdode_df
Change-Id: I1625a3d7e016805791cfd09e31909562f432fd71
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:56:05 -04:00
Roy Oursler
b3c09b9b7c igzip: Improve random data generation in igzip-rand_test
Change-Id: I4835a9e376b4fa24080d765255703a959389487d
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:47:04 -04:00
Roy Oursler
64143a741e igzip: Implement type 0 blocks for level 1 compress
Change-Id: If55ab161623d29fa6fb08df3bc813e654918e592
2017-06-21 05:46:38 -04:00
Roy Oursler
87652b4489 igzip: Modify inflate to optionally calculate adler32 hash
Change-Id: I314617b89b59d53608e464c7d2cf299faa3528b5
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:42:12 -04:00
Roy Oursler
0cc3d93758 igzip: Modify test to test zlib compression
Change-Id: I52979c9e572ef9703995adf8d2163ba1797b8f53
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:41:47 -04:00
Roy Oursler
4259169107 igzip: Implement zlib compression format
Change-Id: I3d3cca425a494ac629cea230de74e3d32fcaea79
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-06-21 05:41:05 -04:00
Hailiang Wang
52f644d3ff igzip:use fgetpos() to replace ftell() to get file's length.
Change-Id: Ia1f3c06e92c01da9d22b3d70b2b05fe4808c9f2c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
2017-06-21 05:22:07 -04:00
Hailiang Wang
ff9c0c1842 igzip:change the default max file size for 32-bit builds.
Change-Id: Ifab108250cfd06211843b5eccb1f1f0482669426
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
2017-06-21 05:13:24 -04:00
Greg Tucker
7e1a337433 igzip: Fix warnings from nasm 2.13
A few legitimate warnings got masked by previous nasm bugs.  This cleans last as
of nasm 2.13rc20.

Change-Id: Iaa7e6148e0e506222cc207685263103d62bdd015
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-04-19 10:17:24 -07:00
Greg Tucker
c28be0d306 igzip: Remove unnecessary casts causing warnings in 32bit build
Change-Id: I9fb85c097c9ade8fdc7907e9d6533d1997ccd406
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 20:22:36 -07:00
Greg Tucker
8270237457 igzip: Add decode_huffman_code_block_stateless to base aliases
Change-Id: I60558f5c09df354a1e7608fe479182ca4e10efb6
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:23:55 -07:00
Greg Tucker
dbab2ddad7 igzip: Make crc32_gzip_base standalone c function
Change-Id: Iffb55919fb51e9e3d74c5c5cb06a3011bd19e99b
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:22:20 -07:00
Greg Tucker
ec6e5de665 igzip: Move build_heap base functions to own file
Change-Id: I0161cd65c71df00fadad9dd69e207e9fb29a54ef
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:20:09 -07:00
Roy Oursler
f80a1ed62b igzip: Create base functions for build_heap and build_huff_tree
Change-Id: I19c2d7bbf1ac8270458b165a385c385a60f1cadc
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 18:18:14 -07:00
Greg Tucker
f316e96217 igzip: Add base function aliases and group src by arch
Change-Id: I4b6c8f62a09545d1ed4f48dc16b3fe8c8a5c72ea
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 18:16:36 -07:00
Roy Oursler
871ad43fad igzip: Fix bug in isal_deflate where processed is not calculated correctly.
Change-Id: I61e15a18ebe3130e73010337d2d41f59e2227f08
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:20:32 -07:00
Roy Oursler
be09e56b36 igzip: Modify igzip_example to provide example of higher compression levels
Change-Id: Iccd0528ac088e1eec3921aa5fde99769d75e3334
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:19:54 -07:00
Roy Oursler
13692d61a3 igzip: Fix bug when 0 length buffer is passed
Avoid unsigned addition overflow when avail_in = 0 and next_in = -1 causing a
comparison to be correct when it should not be.

Change-Id: I3ff7123a89867317f383931cc95c8738ba2f8d56
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
2017-03-30 17:17:04 -07:00
Greg Tucker
de7d639ab1 igzip: Change zero length array and typos found in windows build
Change-Id: Ia185b600af3c5f3b34bb9411daae6877f99b05d7
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
2017-03-30 17:15:57 -07:00