Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ca215a5
Fix licensing info so `reuse link` passes; ignore some files.
MarkCallow Nov 17, 2025
4705a19
Make CMakeProject usable as a subprojct and other fixes.
MarkCallow Nov 17, 2025
059a04b
Address review comments from @dg0yt.
MarkCallow Nov 18, 2025
8bc19b1
Fix build and run with OpenCL.
MarkCallow Nov 21, 2025
6bead67
Merge branch 'master' into reuse_ignore
MarkCallow Nov 21, 2025
06c7781
Merge branch 'reuse_ignore' into cmake_fixes
MarkCallow Nov 21, 2025
22095d6
Workaround for issue #413.
MarkCallow Nov 21, 2025
d8abe7d
Use #if for BASISU_SUPPORT_OPENCL
MarkCallow Nov 21, 2025
262fb49
Change remaining CMAKE_SOURCE_DIRs to CMAKE_CURRENT_SOURCE_DIR.
MarkCallow Nov 23, 2025
01fee3c
Fix licensing info so `reuse link` passes; ignore some files.
MarkCallow Nov 17, 2025
31f1580
Merge master via rebased branch 'reuse_ignore' into cmake_fixes.
MarkCallow Nov 23, 2025
daf79c6
Remove our fix for upstream issue #413.
MarkCallow Nov 23, 2025
ccea925
Fix licensing info so `reuse link` passes; ignore some files.
MarkCallow Nov 17, 2025
2afafbe
Merge master via rebased branch 'reuse_ignore' into cmake_fixes.
MarkCallow Dec 28, 2025
727df84
Merge basis_universal 2.0 into reuse_ignore.
MarkCallow Feb 4, 2026
105594e
Merge basis_universal 2.0 via 'reuse_ignore' into cmake_fixes.
MarkCallow Feb 4, 2026
f5be20d
Remove debug printf.
MarkCallow Feb 4, 2026
3d395f1
Formatting improvements.
MarkCallow Feb 4, 2026
c99d2c3
Convert remaining piece of WASM build.
MarkCallow Feb 4, 2026
1767afc
Clean up.
MarkCallow Feb 5, 2026
f6798a2
Fix c++20 enum to enum arithmetic depcreated warning.
MarkCallow Feb 5, 2026
51e2b1e
Clean up more.
MarkCallow Feb 5, 2026
d479d26
Set compile options for uniform FP handling.
MarkCallow Dec 28, 2025
29e75d0
Remove non-ASCII hyphen characters from comments.
MarkCallow Feb 5, 2026
c40de66
Fix GCC 15 waarnings by removing pointless asserts.
MarkCallow Feb 5, 2026
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/

CMakeUserPresets.json

# VS project and working files
*.vcxproj.user
Expand Down
30 changes: 0 additions & 30 deletions .reuse/dep5

This file was deleted.

533 changes: 229 additions & 304 deletions CMakeLists.txt

Large diffs are not rendered by default.

File renamed without changes.
39 changes: 39 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version = 1
SPDX-PackageName = "basis_universal"
SPDX-PackageDownloadLocation = "https://github.com/BinomialLLC/basis_universal"

[[annotations]]
path = "**"
precedence = "aggregate"
SPDX-FileCopyrightText = ["2019-2024 Binomial LLC", "2016 The Android Open Source Project"]
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = "OpenCL/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2008-2020 The Khronos Group Inc."
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = "zstd/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2016-present Facebook, Inc."
SPDX-License-Identifier = "BSD-3-Clause"

[[annotations]]
path = "encoder/3rdparty/tinyexr.h"
precedence = "aggregate"
SPDX-FileCopyrightText = ["2014 - 2021, Syoyo Fujita and many contributors.", "2002 Industrial Light & Magic, a division of Lucas"]
SPDX-License-Identifier = "BSD-3-Clause"

[[annotations]]
path = "encoder/3rdparty/qoi.h"
precedence = "aggregate"
SPDX-FileCopyrightText = "2021 Dominic Szablewski - https://phoboslab.org"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = "encoder/3rdparty/tinydds.h"
precedence = "aggregate"
SPDX-FileCopyrightText = "2019 DeanoC"
SPDX-License-Identifier = "MIT"
7 changes: 7 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

*

!.gitignore
!ocl_kernels.cl
!clean.bat
!readme.txt
5 changes: 5 additions & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

*

!.gitignore
!readme.txt
8 changes: 4 additions & 4 deletions encoder/basisu_astc_ldr_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ namespace astc_ldr
}
#endif

// TODO: Try two-step Lanczos iteration/RayleighRitz approximation in a 2-dimensional Krylov subspace method vs. power method.
// TODO: Try two-step Lanczos iteration/Rayleigh-Ritz approximation in a 2-dimensional Krylov subspace method vs. power method.
static vec4F calc_pca_4D(uint32_t num_pixels, const vec4F* pPixels, const vec4F& mean_f)
{
float m00 = 0, m01 = 0, m02 = 0, m03 = 0;
Expand Down Expand Up @@ -1127,7 +1127,7 @@ namespace astc_ldr
{
BASISU_NOTE_UNUSED(weight_ise_index);

assert((ccs_index >= 0) && (ccs_index <= 3));
assert(ccs_index <= 3);
assert((total_weights <= 32) || (total_weights == 65));

uint64_t total_err = 0;
Expand Down Expand Up @@ -4414,7 +4414,7 @@ namespace astc_ldr
const cem_encode_params& enc_params, uint32_t flags)
{
assert(g_initialized);
assert((ccs_index >= 0) && (ccs_index <= 3));
assert(ccs_index <= 3);
assert((ps.m_num_pixels) && (ps.m_num_pixels <= ASTC_LDR_MAX_BLOCK_PIXELS));
assert(pWeights0 && pWeights1);

Expand Down Expand Up @@ -4830,7 +4830,7 @@ namespace astc_ldr
uint32_t endpoint_ise_range, uint32_t weight_ise_range,
vec4F& low_endpoint, vec4F& high_endpoint, float* pWeights0, float *pWeights1, uint32_t flags)
{
assert((ccs_index >= 0) && (ccs_index <= 3));
assert(ccs_index <= 3);
const uint32_t num_endpoint_levels = astc_helpers::get_ise_levels(endpoint_ise_range);

// astc_helpers::BISE_64_LEVELS=raw weights ([0,64], NOT [0,63])
Expand Down
6 changes: 1 addition & 5 deletions transcoder/basisu_transcoder.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// basisu_transcoder.cpp
// basisu_transcoder.cpp
// Copyright (C) 2019-2026 Binomial LLC. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -32148,11 +32148,9 @@ namespace bc7f
{
scaledLow[i] = (xMinColor[i] << (8 - total_bits));
scaledLow[i] |= (scaledLow[i] >> total_bits);
assert(scaledLow[i] <= 255);

scaledHigh[i] = (xMaxColor[i] << (8 - total_bits));
scaledHigh[i] |= (scaledHigh[i] >> total_bits);
assert(scaledHigh[i] <= 255);
}

float err0 = 0, err1 = 0;
Expand Down Expand Up @@ -32222,11 +32220,9 @@ namespace bc7f
{
scaledLow[i] = (xMinColor[i] << (8 - total_bits));
scaledLow[i] |= (scaledLow[i] >> total_bits);
assert(scaledLow[i] <= 255);

scaledHigh[i] = (xMaxColor[i] << (8 - total_bits));
scaledHigh[i] |= (scaledHigh[i] >> total_bits);
assert(scaledHigh[i] <= 255);
}

float err = 0;
Expand Down
4 changes: 2 additions & 2 deletions transcoder/basisu_transcoder_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ namespace basist
return (int)std::round(d / (float)L);
}

// L = quant step, alpha in [0,1.2] (typical 0.70.85)
// L = quant step, alpha in [0,1.2] (typical 0.7-0.85)
if (L <= 0)
return 0;

Expand Down Expand Up @@ -2123,7 +2123,7 @@ namespace basist
enum { TABLE_BITS = 8 }; // 256..1024 entries typical (8..10)
enum { TABLE_SIZE = 1 << TABLE_BITS };
enum { MANT_BITS = 23 };
enum { FRAC_BITS = MANT_BITS - TABLE_BITS };
enum { FRAC_BITS = (int)MANT_BITS - (int)TABLE_BITS };
enum { FRAC_MASK = (1u << FRAC_BITS) - 1u };

extern bool g_initialized;
Expand Down
Loading