34 Commits

Author SHA1 Message Date
ql 17c0115f3c ASTC-encoder update to 4.7.0
Signed-off-by: zhaonan287 <zhaonan34@huawei.com>
2024-05-16 10:11:13 +08:00
pete ae8d772bf2 Expose -j option for test runner to allow scaling tests 2022-01-12 11:08:30 +00:00
pete ce2bdf7a6a Increase test runner info log precision 2021-10-01 07:28:59 +01:00
pete a2085a8b1e Update test references for 2.5 release 2021-03-20 20:02:28 +00:00
pete c679aead6d Add absolute scores to test image runner 2021-02-22 08:08:42 +00:00
pete c503cde3a5 Cleanup from main branch rename 2021-02-19 13:53:23 +00:00
pete 1603cb026b Update test and ref data for 2.3 release 2021-01-31 11:45:49 +00:00
pete 6f97c66ab9 Add 2.2 support to reporting scripts 2021-01-06 08:11:58 +00:00
Peter Harris f47e50a9bf Accept UTF-8 output from IM 2021-01-02 00:26:04 +00:00
Pete Harris fb388737fb Add Arm aarch64 builds and NEON acceleration (#191)
This PR adds support for Arm aarch64 builds, including the corresponding NEON accelerated vector library.

As part of this work I also improved testing:

- Native C++ unit tests support using `googletest` integrated into CMake/CTest. 
- First unit test suite added, for 4-wide SIMD implementations.
- Command line functional tests can target any build, not just AVX2.
2021-01-01 23:27:18 +00:00
Pete Harris f9c6c1b69a Port builds to use CMake (#186)
* Unified build to maintain for all target platforms
* Allows packaging directly out of the build using CPack
2020-12-15 17:29:56 +00:00
pete 678e2d647c Update latest test refs 2020-11-02 20:00:06 +00:00
pete 271faab6a1 Add parser for MT/s data to archive
Note rebuilding reference data for older encoders now needs a
modified encoder which emits a version 2.1 performance metric
field, so we get consistent data from all of them.
2020-11-01 12:01:32 +00:00
pete 24d0089fc3 Change perf suite to discard images by deafult 2020-10-31 21:53:11 +00:00
Pete Harris d47fdaed0c Remove the scratch copy of the original data. (#171)
The current code makes a copy of the original data (imageblock.orig_data), transferring into working buffers (imageblock.data_[rgba]) for each encoding trial. The working buffer is overwritten by each trial, so we have to repopulate the working buffer after each trial which is a significant (10-15%) overhead for the fast searches. In reality the output of the decompression is never really used - we only need to compute RMS error for the trial (which can be done inline) and throw the output away.

This patch removes the orig_data copy of the data, and uses only the data_[rgba] fields. Data encoding transforms at the start/end of the block are done in-place, and the data is no longer overwritten during each trial. Some parts of the code needed to be adapted to the fact that the "working" encoding of the data is not the original encoding.

PSNR is identical for LDR images, but has minor changes for HDR images. This is because we now compute derivatives on a converted form of the modified data, so we have an additional conversion round-trip which can add some rounding. On our test set this actually slightly improves PSNR, but I suspect this is just luck.
2020-10-30 13:51:12 +00:00
pete 21a2e2c5c9 Increase precision of time reporting for tests 2020-10-07 12:24:49 +01:00
Pete Harris 74980f05c0 Update normal map test images to be unit length (#155)
* Ensure normal map tests are normalized

* Cleanly handle entrily skipped test sets
2020-09-18 23:13:43 +01:00
Pete Harris 05c62b1d60 Improvements to image test suite execution (#151)
* Input images can now include jpg files
* Output images are stored for all quality levels, not just the last one run
* Baseline reference for comparison is configurable (defaults to last stable release).
* Baseline reference can now include a "last known good" master result set.
2020-09-11 10:58:25 +01:00
Pete Harris 5b86b2fc70 Optimize trials of using 2/3 partitions and two planes of weights (#147)
In the original code running trials for 2 or 3 partitions using two planes of weights, two different color components were tested as candidates for the second weight plane. The second component is rarely a good candidate, so the IQ benefits of this are tiny given the processing cost.

For the Kodak test set with -medium compression we get an average of 8% performance improvement, for negligible quality loss (< 0.01 dB).

Coding time:    Mean: +1.08x    Std: 0.03x
Image quality:  Mean: -0.00 dB  Std: 0.00 dB

There is a larger quality impact for -through and -exhaustive - although it is still very small (0.03 dB) - in particular for normal maps. However, in reality no developers are really using those search modes in production as they are far too slow so this seems acceptable.
2020-09-10 16:32:55 +01:00
Peter Harris 198414f532 Allow test suite to run fast/medium/thorough
Includes:

* Test suite update
* Test reference CSV update
2020-09-08 09:31:36 +01:00
Peter Harris 2ee5d682c7 Add summary perforamnce reports to test runs 2020-09-06 22:38:38 +01:00
Peter Harris 24277e2ff7 Split -perceptual into a stanalone option 2020-07-07 23:02:55 +01:00
Peter Harris 89fee2def0 Fix deblock init 2020-07-05 23:50:35 +01:00
Pete Harris 2b8fd08fc7 First phase of the front-end to codec API split (#125)
This phase introduces the first phase of the API split between the API front-end and the CODEC backed. However, some aspects of the final design are not yet supported:

This build only only supports automatic multi-threading; no user owned thread pools are supported.

Some memory allocations still tied to the compression pass, not the context, so reusing the context will have higher than planned CPU overhead due to the repeated memory allocation (although the impact is probably small unless compression small image).

The input image layout is still the legacy format and must be pre-padded by the caller for any pass using the area-based perceptual metrics.
2020-07-02 21:17:21 +01:00
Peter Harris 97fe404558 Fix support for ref-prototype test runs 2020-05-09 14:22:26 +01:00
Peter Harris 60cd3acccf Allow the test runner to select a single image from a test set 2020-05-09 14:22:26 +01:00
Peter Harris f1601d5c5f Add more CLI functional tests
* All CLI options now have at least some positive coverage
  that the option is accepted and used.
* All CLI options that accept additonal arguments now have
  full truncated command line negative test coverage.
* Tests for esw/dsw swizzle validity have been added.
2020-04-20 00:34:01 +01:00
Pete Harris d07c3d8d7f Add command line functional test suite (#103)
This PR adds the beginnings of a command line functional test suite, ensuring that command line options are correctly wired up and processed. For this first PR not every option is tested, but this suite includes positive tests and negative tests for all of the common operations. See the testing documentation page for more details on how to run these tests.

Some negative tests are currently marked as skipped pending bug fix (notably, the code is intolerant of missing input files, or output directories), so the test suite does currently pass on both Windows and Linux (macOS should pass, but is not tested).

In addition this commit increases the astcenc stack size on Windows to 4MB. We have had persistent problem with stack space on Windows builds, which only have 1MB stacks by default compared to Linux which reserves 8MB. Something in a recent VS2019 upgrade make the build use more stack space which just pushed us over the 1MB limit, so bumped these up to 4MB which should be more than enough.
2020-04-13 00:44:30 +01:00
Peter Harris c5bb4bbe09 Standardize Return: -> Returns: in test script autodoc 2020-03-25 01:00:01 +00:00
Pete Harris c1a4bc6674 Rework image and file I/O (#98) 2020-03-22 23:48:46 +00:00
Peter Harris 7cc80e08d6 Rationalize HDR RGB+A and RGBA handling in CLI 2020-03-11 22:38:17 +00:00
Peter Harris 8a485297f6 Test: Remove -warmpups (not used) and add ISPC 2020-03-05 22:41:54 +00:00
Peter Harris b49a3f8baa Enable test suite on Windows builds 2020-03-01 01:22:44 +00:00
Peter Harris 95d2d6b863 Modularize system test framework
- Break up Python into reusable modules
- Add support for testing SIMD variants
- Add standard test images for CI
2020-03-01 00:25:11 +00:00