Skip to content
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

New DDS decoder #2258

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5e8a37
New DDS decoder
RunDevelopment Jun 9, 2024
cff043a
More efficient range conversions
RunDevelopment Jun 10, 2024
6e27115
Ensure non-empty images for decoders
RunDevelopment Jun 10, 2024
db5e794
Fix some warnings
RunDevelopment Jun 10, 2024
45ee60f
Optimized BC1 decoding
RunDevelopment Jun 10, 2024
6c2247d
Add support for BC6 and BC7 using bcdec_rs
RunDevelopment Jun 10, 2024
e5d59ca
Fix alignment for casts
RunDevelopment Jun 11, 2024
3a1cf84
Improved rounded division
RunDevelopment Jun 11, 2024
73d669a
Massive perf win by returning pixels as values instead of writing the…
RunDevelopment Jun 11, 2024
237f8be
Fix 1.67.1 compiler error
RunDevelopment Jun 11, 2024
b284693
Removed unused DXT module
RunDevelopment Jun 11, 2024
99d5008
Use associated constants to make clippy happy
RunDevelopment Jun 11, 2024
d0df233
Clippy
RunDevelopment Jun 11, 2024
833655e
Removed unused `bits_per_pixel` method
RunDevelopment Jun 11, 2024
b3de809
Fixed mips
RunDevelopment Jun 11, 2024
ab0ec2c
Optimize BC4 SNORM
RunDevelopment Jun 11, 2024
fb7eeb2
Improved u4 conversion code
RunDevelopment Aug 1, 2024
2862f60
Add tests for BCn compression
RunDevelopment Aug 1, 2024
29d649f
Add test cases for sub-sampled formats and special cases
RunDevelopment Aug 1, 2024
c51541d
Add uncompressed reference images
RunDevelopment Aug 1, 2024
c3c81f9
Add DDS bench
RunDevelopment Aug 1, 2024
9e0e01f
Merge branch 'main' into new-dds-decoder
RunDevelopment Aug 1, 2024
5643cc7
lint
RunDevelopment Aug 1, 2024
0915806
BufRead + Seek
RunDevelopment Aug 1, 2024
79395f0
No Seek
RunDevelopment Aug 1, 2024
00b7b4e
Clippy
RunDevelopment Aug 1, 2024
637cf43
Use bcdec_rs for BC1 and BC2
RunDevelopment Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ byteorder-lite = "0.1.0"
num-traits = { version = "0.2.0" }

# Optional dependencies
bcdec_rs = { version = "0.1.2", optional = true }
color_quant = { version = "1.1", optional = true }
dav1d = { version = "0.10.3", optional = true }
dcv-color-primitives = { version = "0.6.1", optional = true }
Expand Down Expand Up @@ -70,7 +71,7 @@ default = ["rayon", "default-formats"]
default-formats = ["avif", "bmp", "dds", "exr", "ff", "gif", "hdr", "ico", "jpeg", "png", "pnm", "qoi", "tga", "tiff", "webp"]
avif = ["dep:ravif", "dep:rgb"]
bmp = []
dds = []
dds = ["dep:bcdec_rs"]
exr = ["dep:exr"]
ff = [] # Farbfeld image format
gif = ["dep:gif", "dep:color_quant"]
Expand Down
10 changes: 10 additions & 0 deletions benches/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ fn load_all(c: &mut Criterion) {
files: &["alpha_gif_a.gif", "sample_1.gif"],
format: ImageFormat::Gif,
},
BenchDef {
dir: &["dds", "bc"],
files: &["DX10 BC4_UNORM.dds", "DX10 BC4_SNORM.dds"],
format: ImageFormat::Dds,
},
BenchDef {
dir: &["dds", "uncompressed"],
files: &["DX10 B5G5R5A1_UNORM.dds", "DX10 B5G6R5_UNORM.dds"],
format: ImageFormat::Dds,
},
BenchDef {
dir: &["hdr", "images"],
files: &["image1.hdr", "rgbr4x4.hdr"],
Expand Down
Loading
Loading