Skip to content

Commit c717299

Browse files
BC7 encoder (#86)
1 parent 2a7f27f commit c717299

File tree

20 files changed

+4459
-563
lines changed

20 files changed

+4459
-563
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This library supports a total of over 70 formats for decoding, including:
2626
- Over 30 uncompressed formats. E.g. `R8G8B8A8_UNORM`, `R9G9B9E5_SHAREDEXP`, `R32G32B32_FLOAT`.
2727
- Many YUV formats. E.g. `AYUV`, `Y416`, `YUY2`, `NV12`.
2828

29-
Most formats support encoding. Notable exceptions are the ASTC formats ([#23](https://github.com/image-rs/image-dds/issues/23)), BC7 ([#20](https://github.com/image-rs/image-dds/issues/20)), and BC6 (currently not planned).
29+
Most formats support encoding. Notable exceptions are the ASTC formats ([#23](https://github.com/image-rs/image-dds/issues/23)) and BC6 (currently not planned).
3030

3131
For a full list of all support formats and their capabilities, see [this document](./supported-formats.md).
3232

benches/encode.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub fn encode_compressed(c: &mut Criterion) {
167167
use Channels::*;
168168

169169
// images
170-
let random: Image<f32> = Image::random(Size::new(128, 128), Rgba);
170+
let random_rgba: Image<f32> = Image::random(Size::new(128, 128), Rgba);
171171
let random_rgb: Image<f32> = Image::random(Size::new(128, 128), Rgb);
172172
let random_tiny: Image<f32> = Image::random(Size::new(16, 16), Rgba);
173173

@@ -208,6 +208,13 @@ pub fn encode_compressed(c: &mut Criterion) {
208208
bench_encoder(c, Format::BC4_UNORM, high, &random_rgb);
209209
bench_encoder(c, Format::BC4_UNORM, dither, &random_rgb);
210210
// bench_encoder(c, Format::BC4_UNORM, unreasonable, &random_tiny);
211+
212+
bench_encoder(c, Format::BC7_UNORM, fast, &random_rgb);
213+
bench_encoder(c, Format::BC7_UNORM, normal, &random_rgb);
214+
bench_encoder(c, Format::BC7_UNORM, high, &random_rgb);
215+
bench_encoder(c, Format::BC7_UNORM, fast, &random_rgba);
216+
bench_encoder(c, Format::BC7_UNORM, normal, &random_rgba);
217+
bench_encoder(c, Format::BC7_UNORM, high, &random_rgba);
211218
}
212219

213220
pub fn encode_parallel(c: &mut Criterion) {

0 commit comments

Comments
 (0)