Commit Graph

30 Commits

Author SHA1 Message Date
pete b41a0cbf68 Merge compute_partition_ecw and compute_avg_dirs_2/3/4comp 2021-04-29 23:21:55 +01:00
pete 1c684d16f9 Standardize on function postifx 2021-04-28 00:22:15 +01:00
pete 8aef238775 Use part_texels in compute_error_squared_rgb_single_partition 2021-04-12 23:37:31 +01:00
pete bdaabcd2e2 Standardize on "plane2_component" name 2021-03-30 09:25:19 +01:00
pete 6a64ee4ebc Standardize on "component" not "channel" 2021-03-30 09:21:07 +01:00
pete 8d44a7e93a Exploit same chroma line.amod always being zero 2021-02-20 23:07:46 +00:00
pete 6280ede7cf Use helper functions for safe normalization 2021-02-20 22:02:10 +00:00
pete ba1debdccb Refactor partition_metrics as AOS 2021-02-20 21:47:15 +00:00
pete 5b744d6114 Make is_lum and is_lumalp HDR safe 2021-02-20 11:31:17 +00:00
pete 90d1735428 Standardize on blk for image block variables 2021-02-20 11:31:17 +00:00
pete 7f4cbb27d5 Standardize on pt for partition table variables 2021-02-20 11:31:17 +00:00
pete 9663c25102 Function rename for consistency 2021-02-17 20:49:56 +00:00
pete c98ed557bf Remove compute_averages_and_directions_rgb
Reducing code size and using the already existing common
compute_averages_and_directions_3_components is slightly
faster ...
2021-02-17 07:45:44 +00:00
pete c1cfc48123 Restructure compute_encoding_choice_errors 2021-02-15 23:57:06 +00:00
pete 665ff737af Merge compute_error_squared_rgb_single_partition checks 2021-02-15 22:55:01 +00:00
pete 9dd689749b Avoid loading alpha channel in c_e_s_rgb 2021-02-14 22:41:14 +00:00
pete 1639c88f49 Use vfloat4 to back float3 types, allowing SIMD 2021-02-14 00:48:08 +00:00
pete 1eaf830675 Vectorize merge_endpoints 2021-02-12 23:22:05 +00:00
pete 10d094fc98 Add accessor for fetching block texels 2021-02-12 21:09:29 +00:00
Pete Harris affbeea396 Migrate to vfloat4 everywhere (#212)
Prior to this PR we had two vec4 implementations for floats, the legacy "float4" and the newer "vfloat4". The newer vfloat4 is a superset of the capabilities of the float4, and using it everywhere would give other opportunities to optimize by e.g. using the conditional select functionality rather than scalarizing chunks of vector code.

This patch is just the basic migration - where possible I've translated the original code without additional refactoring. Further optimizations to make better use of the vfloat4 functionality will come later. Overall this patch has no impact on IQ or performance, but does give a slight reduction in code size.
2021-02-11 09:15:26 +00:00
pete 0fb0f0e88f Syntax tidyup around array initializers 2021-01-29 00:23:23 +00:00
Pete Harris 39f0260928 Implement optimizations for compute_error_squared_rgb/a() (#198)
This implementation alters the algorithm and vectorizes these two functions.

The algorithm change will have a minor image quality impact; it now uses a faster approximation for selecting which component to assign to a second plane when choosing a partition. There is an insignificant IQ hit on -medium (under < 0.01dB), as we rarely use two planes anyway, and a slightly larger one on -thorough (under < -0.05dB). The significant (>10%) performance gain on -thorough is worth the quality loss (i.e. users are more likely to use -thorough if it's faster, and the overall IQ gain vs medium is still net positive).
2021-01-11 22:10:03 +00:00
pete e8510eada4 Add promises for common for loops in hot functions 2021-01-07 21:48:01 +00:00
pete fd8a3660d2 Remove unused rgb_drop_error metric 2021-01-03 00:07:28 +00:00
pete db029c6d4e Move compute_error_squared_rgb_single_partition 2020-11-22 23:07:40 +00:00
pete 810e41925e Use new scalar initializer for template vectors 2020-11-09 00:18:37 +00:00
pete b301e0c78c Vectors are now .rgba, not .xyzw 2020-11-09 00:01:26 +00:00
Pete Harris 9fce19699c Merge increment
* Update test data reference CSV

* Formatting cleanups

* Make image data type flexible
- No new types supported yet, but it's a precursor to just supporting f32 as an interface type.
2020-09-04 22:59:08 +01:00
Peter Harris 51d5963ba8 Allow decompression-only builds 2020-07-19 17:02:22 +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