-
-
Notifications
You must be signed in to change notification settings - Fork 17
Implement support for ASTC compressed KTX textures #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Erik-White
wants to merge
129
commits into
SixLabors:main
Choose a base branch
from
Erik-White:implement-astc-decoding
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
6577b4c
Add ASTC decoding support
Erik-White 6e58d6f
Integrate AstcSharp ASTC decoder
Erik-White 0aba876
Use existing test utils for Astc tests
Erik-White 44599c8
Add HDR support
Erik-White 724bd61
Fix overflow issue
Erik-White abd3b4c
Move KTX1 test images to subdirectories
Erik-White 86ff81a
Remove unused AstcSharp reference
Erik-White 94d0f72
Small fixes and variable naming
Erik-White e7ce5fa
Astc files are little endian
Erik-White 1d3acec
Update shared infra
Erik-White 438959e
Add more defensive checks for ASTC input
Erik-White fd19b63
Remove unused decoder overload
Erik-White 58814e5
Use correct pixel format for VK_FORMAT_R16G16B16A16_SFLOAT
Erik-White ee624ca
Add R16G16_SFLOAT, R16G16B16_SFLOAT, R32_SFLOAT, BC3_UNORM_BLOCK sup…
Erik-White ccc9737
Add cubemap test extension
Erik-White a7a0b55
Use standard library methods for swapping endianess
Erik-White a232b62
Avoid partial reads
Erik-White 42bed20
Guard against malformed cubemaps
Erik-White 3af005b
Tests for new guards
Erik-White 42caec4
Validate block lengths and dimensions
Erik-White 8085dc9
Document sRGB handling
Erik-White aaac865
Add explicit handling for vulkan formats
Erik-White 063f551
Implement support for sfloat block types
Erik-White f426588
Add guards for non seekable streams
Erik-White c9e3014
Avoid boxing conversions in TryGetBits
Erik-White 73424dd
Consolidate overlapping endian handlers
Erik-White 4ca0f94
Prevent buffer corruption in ShiftBuffer
Erik-White 4d393b4
Correctly handle arraypool semantics
Erik-White 734dd5c
Address thread safety in BISD and DecimationTable
Erik-White 1a794cd
Make sure to throw when HDR endpoint is sent to DecodeColorsForMode
Erik-White 17cc728
Don't silently truncate HDR via LDR API
Erik-White f0edcb0
Tighten image comparison tolerances
Erik-White b38bfda
Improve readme
Erik-White cfc8ef9
Major tidy up of minor details
Erik-White f53d718
Fix the astcencodercsharp dependency path
Erik-White 2a3e400
Combine DecodeBiseValues and DecodeBiseWeights
Erik-White af204fd
Combine writer methods for fused LDR/HDR decoders
Erik-White cdf6a9e
Fix benchmarks test data path
Erik-White b9eb410
Clean up and formatting
Erik-White 9ce3e3b
Split out test methods from LogicalBlock
Erik-White 9ba4575
Refactor LogicalBlock tests to remove intrusive, low value tests
Erik-White 6697e13
Move LnsToSf16 out of LogicalBlock
Erik-White db6ae9c
Clean up unused methods in Partition
Erik-White a6307c6
Refactor decoder to simplify where possible
Erik-White 7620476
Refactor large encoding methods to smaller, more understandable units
Erik-White e165ec6
Split out private classes
Erik-White 7d89e04
Continue refactoring to break down large encoding methods
Erik-White 02e6f8e
Split up and refactor block methods
Erik-White f4bd0be
Split up split/search/write phases to separate opeations
Erik-White 641e14c
Refactor and split up DecodeAllBlocks for LDR/HDR
Erik-White 5720aaf
Consolidate bit placement logic via ApplyBitPlacements
Erik-White d0f25cd
Extract common swap/pack function
Erik-White 06425f6
Remove IntermediateBlock
Erik-White e02a617
remove redundant endpoint.IsHdr branch
Erik-White e317acb
Unify DecodeAllBlocks methods
Erik-White dcf5c8f
Streamline DecompressBlock methods to thin wrappers
Erik-White 22b3cf1
Cache partitions across blocks
Erik-White 163434c
Consolidate interpolation functions
Erik-White d909006
Reference ASTC spec in pipeline where possible
Erik-White 68dcfcd
Consolidate small repeated functions
Erik-White 28ff800
Reorganize ASTC decoder
Erik-White 872cb18
Remove state from BIS decoder
Erik-White d9806de
Consolidate EndpointCodec API
Erik-White 36cfc81
Combine LDR and HDR endpoint decode
Erik-White 053ae6b
Avoid allocating LogicalBlock on the heap
Erik-White 60dd5e5
Annotate usage of stackalloc
Erik-White 4d0f25f
Encapsulate block state during decoding
Erik-White e153824
Extract HDR/LDR pixel methods from LogicalBlock
Erik-White 24a5e6d
Invert void extent check
Erik-White 1badfa0
Simplify bit placement lookup
Erik-White a84e5f1
Store ordered encoding modes once
Erik-White b0bb03a
Store channel count in single location
Erik-White 2a01aeb
Calculate BISE block size in one place
Erik-White bf49f40
Move blend methods to interpolation
Erik-White 9801606
TryReadBlockBits no longer needed
Erik-White dd517b4
Try to limit mutation of Partition
Erik-White 6093e2b
Skip redundant bounds checks for bit count
Erik-White f51c202
Remove redundant fields on Partition
Erik-White 380dc90
Clean up BlueContract swap path
Erik-White a7bac74
Move Rgba extensions to ColorEncoding
Erik-White c408084
Fix potential race in Partition construction
Erik-White 3fc63b7
Encapsulate IsFusable on BlockInfo
Erik-White 4eeb587
Build QuantizationMaps from static constructors
Erik-White 4d88f9b
Clean up redundant methods, properties, arguments
Erik-White f378bbc
Don't silently fail on invalid blocks
Erik-White b121b1c
Don't return nullable quant maps
Erik-White af22aef
Don't need to fully qualify names
Erik-White 29e3405
Combine unquantize functions
Erik-White 7dc6da6
return correct mode
Erik-White cfcd86e
BISE can be static
Erik-White f6e5efb
Small cleanups in BISE
Erik-White f9f9aa3
Note swap semantics
Erik-White 07c91cb
Tiny tidy
Erik-White 7fde153
BlockInfo should be immutable
Erik-White 94c15ee
Simplify CopyBlockRect
Erik-White 3b9bb20
Test for HDR void-extent blocks
Erik-White 6d7aec2
Add regression tests for multithreaded and block decoding
Erik-White ccefd1b
Move references tests to main test project
Erik-White 2d0d52d
Add LDR/HDR reference benchmarks
Erik-White bee1074
Add reference persistence benchmark
Erik-White b9363b1
Add larger HDR test files
Erik-White 4704375
Add fuzzing tests with FuzzSharp
Erik-White cb7bf3e
Add support for fuzzing with libfuzzer
Erik-White 06e8257
Increase fuzzing coverage
Erik-White 4487d89
Use ImageSharp guards
Erik-White ab09b5b
Remove old reference tests project
Erik-White 6fa49d9
Rename HDR namespace to titlecase for consistency
Erik-White 11758b9
Merge branch 'main' into implement-astc-decoding
Erik-White 8e244ec
Reorganize test data for consistency
Erik-White cae17ca
Add stream based overloads for AstcDecoder
Erik-White 845b24e
Use ImageSharp allocator
Erik-White c0ff0f6
Improve ktx1 ASTC test coverage
Erik-White 100aa5c
Fix off-by-one error in LDR quantization
Erik-White e999744
Revise doc references and include sources in repo
Erik-White 35c78e2
Make sure to dispose images in tests
Erik-White 91317c6
Fix race in test output paths
Erik-White d916af9
Consolidate Hdr properties for BlockInfo
Erik-White 6bf7b5a
Clean up redundant code in DecompressImage
Erik-White 31a9def
Use integer maths for scale factor
Erik-White 4933ec1
Simplify partition cache key
Erik-White d8ddf54
BlockModeDecoder lookup tables should be static
Erik-White 07efe2d
Enforce read only properties where possible
Erik-White 270bdd1
Remove remaining encoding related code
Erik-White 83c761c
Use centralized value for channel count
Erik-White 060af19
Remove redundant argument name parameters
Erik-White 7e20e5f
Combine and simplify reference benchmark cases
Erik-White 0af7e7a
Avoid buffer allocation overhead for reference decoder benchmark
Erik-White 83eae61
Use ARM decoder as benchmark baseline
Erik-White ecc374e
Write magenta error colour instead of black, or throwing
Erik-White File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "version": 1, | ||
| "isRoot": true, | ||
| "tools": { | ||
| "sharpfuzz.commandline": { | ||
| "version": "2.0.2", | ||
| "commands": [ | ||
| "sharpfuzz" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.