Renamed to minimum/maximum
diff --git a/basisu_tool.cpp b/basisu_tool.cpp
index c233746..2623a5d 100644
--- a/basisu_tool.cpp
+++ b/basisu_tool.cpp
@@ -258,7 +258,7 @@
 		m_compare_ssim(false),
 		m_bench(false)
 	{
-		m_comp_params.m_compression_level = basisu::max<int>(0, BASISU_DEFAULT_COMPRESSION_LEVEL - 1);
+		m_comp_params.m_compression_level = basisu::maximum<int>(0, BASISU_DEFAULT_COMPRESSION_LEVEL - 1);
 	}
 
 	bool parse(int arg_c, const char **arg_v)
@@ -961,13 +961,13 @@
 
 				for (size_t slice_index = 0; slice_index < c.get_stats().size(); slice_index++)
 				{
-					rgb_avg_psnr_min = basisu::min(rgb_avg_psnr_min, c.get_stats()[slice_index].m_basis_rgb_avg_psnr);
+					rgb_avg_psnr_min = basisu::minimum(rgb_avg_psnr_min, c.get_stats()[slice_index].m_basis_rgb_avg_psnr);
 					rgb_avg_psnr_avg += c.get_stats()[slice_index].m_basis_rgb_avg_psnr;
 
-					a_avg_psnr_min = basisu::min(a_avg_psnr_min, c.get_stats()[slice_index].m_basis_a_avg_psnr);
+					a_avg_psnr_min = basisu::minimum(a_avg_psnr_min, c.get_stats()[slice_index].m_basis_a_avg_psnr);
 					a_avg_psnr_avg += c.get_stats()[slice_index].m_basis_a_avg_psnr;
 
-					luma_709_psnr_min = basisu::min(luma_709_psnr_min, c.get_stats()[slice_index].m_basis_luma_709_psnr);
+					luma_709_psnr_min = basisu::minimum(luma_709_psnr_min, c.get_stats()[slice_index].m_basis_luma_709_psnr);
 					luma_709_psnr_avg += c.get_stats()[slice_index].m_basis_luma_709_psnr;
 				}
 
@@ -1582,7 +1582,7 @@
 		{
 			for (uint32_t level_index = 0; level_index < fileinfo.m_image_mipmap_levels[image_index]; level_index++)
 			{
-				max_mipmap_levels = basisu::max(max_mipmap_levels, fileinfo.m_image_mipmap_levels[image_index]);
+				max_mipmap_levels = basisu::maximum(max_mipmap_levels, fileinfo.m_image_mipmap_levels[image_index]);
 
 				const basist::transcoder_texture_format transcoder_tex_fmt = basist::transcoder_texture_format::cTFRGBA4444;
 
@@ -2015,7 +2015,7 @@
 
 			for (uint32_t bx = 0; bx < num_blocks_x; bx += N)
 			{
-				const uint32_t num_blocks_to_process = basisu::min<uint32_t>(num_blocks_x - bx, N);
+				const uint32_t num_blocks_to_process = basisu::minimum<uint32_t>(num_blocks_x - bx, N);
 
 				color_rgba pixels[16 * N];
 
@@ -2636,186 +2636,186 @@
 		// UASTC
 		em.calc(img, uastc_img, 0, 3);
 		em.print("UASTC RGB  ");
-		total_uastc_psnr += basisu::min(99.0f, em.m_psnr);
+		total_uastc_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, uastc_img, 3, 1);
 		em.print("UASTC A    ");
 		if (img_has_alpha)
-			total_uastc_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_uastc_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, uastc_img, 0, 4);
 		em.print("UASTC RGBA ");
-		total_uastc_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_uastc_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// RDO UASTC
 		em.calc(img, rdo_uastc_img, 0, 3);
 		em.print("RDOUASTC RGB ");
-		total_rdo_uastc_psnr += basisu::min(99.0f, em.m_psnr);
+		total_rdo_uastc_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, rdo_uastc_img, 3, 1);
 		em.print("RDOUASTC A ");
 		if (img_has_alpha)
-			total_rdo_uastc_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_rdo_uastc_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, rdo_uastc_img, 0, 4);
 		em.print("RDOUASTC RGBA ");
-		total_rdo_uastc_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_rdo_uastc_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// UASTC2 
 		em.calc(img, uastc2_img, 0, 3);
 		em.print("UASTC2 RGB ");
-		total_uastc2_psnr += basisu::min(99.0f, em.m_psnr);
+		total_uastc2_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, uastc2_img, 3, 1);
 		em.print("UASTC2 A   ");
 		if (img_has_alpha)
-			total_uastc2_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_uastc2_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, uastc2_img, 0, 4);
 		em.print("UASTC2 RGBA ");
-		total_uastc2_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_uastc2_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// BC7
 		em.calc(img, bc7_img, 0, 3);
 		em.print("BC7 RGB    ");
-		total_bc7_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc7_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc7_img, 3, 1);
 		em.print("BC7 A      ");
 		if (img_has_alpha)
-			total_bc7_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_bc7_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc7_img, 0, 4);
 		em.print("BC7 RGBA   ");
-		total_bc7_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc7_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// RDO BC7
 		em.calc(img, rdo_bc7_img, 0, 3);
 		em.print("RDOBC7 RGB ");
-		total_rdo_bc7_psnr += basisu::min(99.0f, em.m_psnr);
+		total_rdo_bc7_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, rdo_bc7_img, 3, 1);
 		em.print("RDOBC7 A   ");
 		if (img_has_alpha)
-			total_rdo_bc7_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_rdo_bc7_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, rdo_bc7_img, 0, 4);
 		em.print("RDOBC7 RGBA ");
-		total_rdo_bc7_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_rdo_bc7_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 #if 0
 		// OBC7
 		em.calc(img, opt_bc7_img, 0, 3);
 		em.print("OBC7 RGB   ");
-		total_obc7_psnr += basisu::min(99.0f, em.m_psnr);
+		total_obc7_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, opt_bc7_img, 3, 1);
 		em.print("OBC7 A     ");
 		if (img_has_alpha)
-			total_obc7_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_obc7_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, opt_bc7_img, 0, 4);
 		em.print("OBC7 RGBA  ");
-		total_obc7_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_obc7_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// OASTC
 		em.calc(img, opt_astc_img, 0, 3);
 		em.print("OASTC RGB   ");
-		total_oastc_psnr += basisu::min(99.0f, em.m_psnr);
+		total_oastc_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, opt_astc_img, 3, 1);
 		em.print("OASTC A     ");
 		if (img_has_alpha)
-			total_oastc_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_oastc_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, opt_astc_img, 0, 4);
 		em.print("OASTC RGBA  ");
-		total_oastc_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_oastc_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 #endif
 
 		// bc7enc
 		em.calc(img, bc7enc_img, 0, 3);
 		em.print("BC7ENC RGB  ");
-		total_bc7enc_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc7enc_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc7enc_img, 3, 1);
 		em.print("BC7ENC A    ");
 		if (img_has_alpha)
-			total_bc7enc_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_bc7enc_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc7enc_img, 0, 4);
 		em.print("BC7ENC RGBA ");
-		total_bc7enc_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc7enc_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 #if 1
 		// OBC1
 		em.calc(img, opt_bc1_img, 0, 3);
 		em.print("OBC1 RGB   ");
-		total_obc1_psnr += basisu::min(99.0f, em.m_psnr);
-		total_obc1_psnr_sq += basisu::min(99.0f, em.m_psnr) * basisu::min(99.0f, em.m_psnr);
+		total_obc1_psnr += basisu::minimum(99.0f, em.m_psnr);
+		total_obc1_psnr_sq += basisu::minimum(99.0f, em.m_psnr) * basisu::minimum(99.0f, em.m_psnr);
 #endif
 				
 		em.calc(img, opt_bc1_2_img, 0, 3);
 		em.print("OBC1 2 RGB ");
-		total_obc1_2_psnr += basisu::min(99.0f, em.m_psnr);
-		total_obc1_2_psnr_sq += basisu::min(99.0f, em.m_psnr) * basisu::min(99.0f, em.m_psnr);
+		total_obc1_2_psnr += basisu::minimum(99.0f, em.m_psnr);
+		total_obc1_2_psnr_sq += basisu::minimum(99.0f, em.m_psnr) * basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc1_img, 0, 3);
 		em.print("BC1 RGB    ");
-		total_bc1_psnr += basisu::min(99.0f, em.m_psnr);
-		total_bc1_psnr_sq += basisu::min(99.0f, em.m_psnr) * basisu::min(99.0f, em.m_psnr);
+		total_bc1_psnr += basisu::minimum(99.0f, em.m_psnr);
+		total_bc1_psnr_sq += basisu::minimum(99.0f, em.m_psnr) * basisu::minimum(99.0f, em.m_psnr);
 
 		// ETC1
 		em.calc(img, etc1_img, 0, 3);
 		em.print("ETC1 RGB   ");
-		total_etc1_psnr += basisu::min(99.0f, em.m_psnr);
+		total_etc1_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, etc1_img, 0, 0);
 		em.print("ETC1 Y     ");
-		total_etc1_y_psnr += basisu::min(99.0f, em.m_psnr);
+		total_etc1_y_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// ETC1
 		em.calc(img, etc1_g_img, 1, 1);
 		em.print("ETC1 G     ");
-		total_etc1_g_psnr += basisu::min(99.0f, em.m_psnr);
+		total_etc1_g_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// ETC2
 		em.calc(img, etc2_img, 0, 3);
 		em.print("ETC2 RGB   ");
-		total_etc2_psnr += basisu::min(99.0f, em.m_psnr);
+		total_etc2_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, etc2_img, 3, 1);
 		em.print("ETC2 A     ");
 		if (img_has_alpha)
-			total_etc2_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_etc2_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, etc2_img, 0, 4);
 		em.print("ETC2 RGBA  ");
-		total_etc2_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_etc2_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// BC3
 		em.calc(img, bc3_img, 0, 3);
 		em.print("BC3 RGB    ");
-		total_bc3_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc3_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc3_img, 3, 1);
 		em.print("BC3 A      ");
 		if (img_has_alpha)
-			total_bc3_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_bc3_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		em.calc(img, bc3_img, 0, 4);
 		em.print("BC3 RGBA   ");
-		total_bc3_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+		total_bc3_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// EAC R11
 		em.calc(img, eac_r11_img, 0, 1);
 		em.print("EAC R11    ");
-		total_eac_r11_psnr += basisu::min(99.0f, em.m_psnr);
+		total_eac_r11_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		// EAC RG11
 		em.calc(img, eac_rg11_img, 0, 2);
 		em.print("EAC RG11   ");
-		total_eac_rg11_psnr += basisu::min(99.0f, em.m_psnr);
+		total_eac_rg11_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 		const uint32_t width = num_blocks_x * 4;
 		const uint32_t height = num_blocks_y * 4;
@@ -2863,15 +2863,15 @@
 
 			em.calc(img, pi_unpacked, 0, 3);
 			em.print("PVRTC1 After RGB  ");
-			total_pvrtc1_rgb_psnr += basisu::min(99.0f, em.m_psnr);
+			total_pvrtc1_rgb_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 			em.calc(img, pi_unpacked, 3, 1);
 			em.print("PVRTC1 After A    ");
-			total_pvrtc1_a_psnr += basisu::min(99.0f, em.m_psnr);
+			total_pvrtc1_a_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 			em.calc(img, pi_unpacked, 0, 4);
 			em.print("PVRTC1 After RGBA ");
-			total_pvrtc1_rgba_psnr += basisu::min(99.0f, em.m_psnr);
+			total_pvrtc1_rgba_psnr += basisu::minimum(99.0f, em.m_psnr);
 
 			total_pvrtc1_images++;
 		}
@@ -2925,11 +2925,11 @@
 	//printf("Avg Opt ASTC RGB PSNR: %f, A PSNR: %f, RGBA PSNR: %f\n", total_oastc_psnr / total_images, total_oastc_a_psnr / total_a_images, total_oastc_rgba_psnr / total_images);
 	printf("Avg BC7ENC RGB PSNR:   %f, A PSNR: %f, RGBA PSNR: %f\n", total_bc7enc_psnr / total_images, total_bc7enc_a_psnr / total_a_images, total_bc7enc_rgba_psnr / total_images);
 
-	printf("Avg Opt BC1 PSNR: %f, std dev: %f\n", total_obc1_psnr / total_images, sqrtf(basisu::max(0.0f, (total_obc1_psnr_sq / total_images) - (total_obc1_psnr / total_images) * (total_obc1_psnr / total_images))));
+	printf("Avg Opt BC1 PSNR: %f, std dev: %f\n", total_obc1_psnr / total_images, sqrtf(basisu::maximum(0.0f, (total_obc1_psnr_sq / total_images) - (total_obc1_psnr / total_images) * (total_obc1_psnr / total_images))));
 
-	printf("Avg Opt BC1 2 PSNR: %f, std dev: %f\n", total_obc1_2_psnr / total_images, sqrtf(basisu::max(0.0f, (total_obc1_2_psnr_sq / total_images) - (total_obc1_2_psnr / total_images) * (total_obc1_2_psnr / total_images))));
+	printf("Avg Opt BC1 2 PSNR: %f, std dev: %f\n", total_obc1_2_psnr / total_images, sqrtf(basisu::maximum(0.0f, (total_obc1_2_psnr_sq / total_images) - (total_obc1_2_psnr / total_images) * (total_obc1_2_psnr / total_images))));
 
-	printf("Avg BC1 PSNR: %f, std dev: %f\n", total_bc1_psnr / total_images, sqrtf(basisu::max(0.0f, (total_bc1_psnr_sq / total_images) - (total_bc1_psnr / total_images) * (total_bc1_psnr / total_images))));
+	printf("Avg BC1 PSNR: %f, std dev: %f\n", total_bc1_psnr / total_images, sqrtf(basisu::maximum(0.0f, (total_bc1_psnr_sq / total_images) - (total_bc1_psnr / total_images) * (total_bc1_psnr / total_images))));
 
 	printf("Avg ETC1 RGB PSNR: %f\n", total_etc1_psnr / total_images);
 	printf("Avg ETC1 Y PSNR: %f\n", total_etc1_y_psnr / total_images);
diff --git a/encoder/basisu_astc_decomp.cpp b/encoder/basisu_astc_decomp.cpp
index aa941b9..53bccfc 100644
--- a/encoder/basisu_astc_decomp.cpp
+++ b/encoder/basisu_astc_decomp.cpp
@@ -157,7 +157,7 @@
 
 		UVec4 asUint() const
 		{
-			return UVec4(basisu::max(0, m_c[0]), basisu::max(0, m_c[1]), basisu::max(0, m_c[2]), basisu::max(0, m_c[3]));
+			return UVec4(basisu::maximum(0, m_c[0]), basisu::maximum(0, m_c[1]), basisu::maximum(0, m_c[2]), basisu::maximum(0, m_c[3]));
 		}
 
 		int32_t operator[] (uint32_t idx) const { assert(idx < 4);  return m_c[idx]; }
diff --git a/encoder/basisu_comp.cpp b/encoder/basisu_comp.cpp
index 0df4521..9ca1ef5 100644
--- a/encoder/basisu_comp.cpp
+++ b/encoder/basisu_comp.cpp
@@ -267,7 +267,7 @@
 								
 				bool status = uastc_rdo(tex.get_total_blocks(), (basist::uastc_block*)tex.get_ptr(),
 					(const color_rgba *)m_source_blocks[slice_desc.m_first_block_index].m_pixels, rdo_params, m_params.m_pack_uastc_flags, m_params.m_rdo_uastc_multithreading ? m_params.m_pJob_pool : nullptr,
-					(m_params.m_rdo_uastc_multithreading && m_params.m_pJob_pool) ? basisu::min<uint32_t>(4, (uint32_t)m_params.m_pJob_pool->get_total_threads()) : 0);
+					(m_params.m_rdo_uastc_multithreading && m_params.m_pJob_pool) ? basisu::minimum<uint32_t>(4, (uint32_t)m_params.m_pJob_pool->get_total_threads()) : 0);
 				if (!status)
 				{
 					return cECFailedUASTCRDOPostProcess;
@@ -489,8 +489,8 @@
 
 			if (m_params.m_resample_factor > 0.0f)
 			{
-				int new_width = basisu::min<int>(basisu::max(1, (int)ceilf(file_image.get_width() * m_params.m_resample_factor)), BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION);
-				int new_height = basisu::min<int>(basisu::max(1, (int)ceilf(file_image.get_height() * m_params.m_resample_factor)), BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION);
+				int new_width = basisu::minimum<int>(basisu::maximum(1, (int)ceilf(file_image.get_width() * m_params.m_resample_factor)), BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION);
+				int new_height = basisu::minimum<int>(basisu::maximum(1, (int)ceilf(file_image.get_height() * m_params.m_resample_factor)), BASISU_MAX_SUPPORTED_TEXTURE_DIMENSION);
 
 				debug_printf("Resampling to %ix%i\n", new_width, new_height);
 
diff --git a/encoder/basisu_enc.cpp b/encoder/basisu_enc.cpp
index e795653..491a13a 100644
--- a/encoder/basisu_enc.cpp
+++ b/encoder/basisu_enc.cpp
@@ -1308,8 +1308,8 @@
 	{
 		assert((first_chan < 4U) && (first_chan + total_chans <= 4U));
 
-		const uint32_t width = basisu::min(a.get_width(), b.get_width());
-		const uint32_t height = basisu::min(a.get_height(), b.get_height());
+		const uint32_t width = basisu::minimum(a.get_width(), b.get_width());
+		const uint32_t height = basisu::minimum(a.get_height(), b.get_height());
 
 		double hist[256];
 		clear_obj(hist);
@@ -1341,7 +1341,7 @@
 		{
 			if (hist[i])
 			{
-				m_max = basisu::max<float>(m_max, (float)i);
+				m_max = basisu::maximum<float>(m_max, (float)i);
 				double v = i * hist[i];
 				sum += v;
 				sum2 += i * v;
@@ -1823,7 +1823,7 @@
 						}
 					}
 
-					const uint32_t n = basisu::min<uint32_t>(pixels_remaining, run_remaining);
+					const uint32_t n = basisu::minimum<uint32_t>(pixels_remaining, run_remaining);
 					pixels_remaining -= n;
 					run_remaining -= n;
 
diff --git a/encoder/basisu_enc.h b/encoder/basisu_enc.h
index 142425b..09f84b6 100644
--- a/encoder/basisu_enc.h
+++ b/encoder/basisu_enc.h
@@ -194,8 +194,8 @@
 				m_new_s = m_old_s + (x - m_old_m) * (x - m_new_m);
 				m_old_m = m_new_m;
 				m_old_s = m_new_s;
-				m_min = basisu::min(x, m_min);
-				m_max = basisu::max(x, m_max);
+				m_min = basisu::minimum(x, m_min);
+				m_max = basisu::maximum(x, m_max);
 			}
 		}
 		uint32_t get_num() const
@@ -741,8 +741,8 @@
 			return basist::color32(r, g, b, a);
 		}
 
-		static color_rgba comp_min(const color_rgba& a, const color_rgba& b) { return color_rgba(basisu::min(a[0], b[0]), basisu::min(a[1], b[1]), basisu::min(a[2], b[2]), basisu::min(a[3], b[3])); }
-		static color_rgba comp_max(const color_rgba& a, const color_rgba& b) { return color_rgba(basisu::max(a[0], b[0]), basisu::max(a[1], b[1]), basisu::max(a[2], b[2]), basisu::max(a[3], b[3])); }
+		static color_rgba comp_min(const color_rgba& a, const color_rgba& b) { return color_rgba(basisu::minimum(a[0], b[0]), basisu::minimum(a[1], b[1]), basisu::minimum(a[2], b[2]), basisu::minimum(a[3], b[3])); }
+		static color_rgba comp_max(const color_rgba& a, const color_rgba& b) { return color_rgba(basisu::maximum(a[0], b[0]), basisu::maximum(a[1], b[1]), basisu::maximum(a[2], b[2]), basisu::maximum(a[3], b[3])); }
 	};
 
 	typedef basisu::vector<color_rgba> color_rgba_vec;
diff --git a/encoder/basisu_etc.cpp b/encoder/basisu_etc.cpp
index b488731..232e896 100644
--- a/encoder/basisu_etc.cpp
+++ b/encoder/basisu_etc.cpp
@@ -1006,13 +1006,13 @@
 		{
 			const color_rgba& c = m_pParams->m_pSrc_pixels[i];
 
-			min_r = basisu::min<int>(min_r, c.r);
-			min_g = basisu::min<int>(min_g, c.g);
-			min_b = basisu::min<int>(min_b, c.b);
+			min_r = basisu::minimum<int>(min_r, c.r);
+			min_g = basisu::minimum<int>(min_g, c.g);
+			min_b = basisu::minimum<int>(min_b, c.b);
 
-			max_r = basisu::max<int>(max_r, c.r);
-			max_g = basisu::max<int>(max_g, c.g);
-			max_b = basisu::max<int>(max_b, c.b);
+			max_r = basisu::maximum<int>(max_r, c.r);
+			max_g = basisu::maximum<int>(max_g, c.g);
+			max_b = basisu::maximum<int>(max_b, c.b);
 
 			const vec3F fc(c.r, c.g, c.b);
 
@@ -1023,7 +1023,7 @@
 		}
 		avg_color /= static_cast<float>(n);
 		m_avg_color = avg_color;
-		m_max_comp_spread = basisu::max(basisu::max(max_r - min_r, max_g - min_g), max_b - min_b);
+		m_max_comp_spread = basisu::maximum(basisu::maximum(max_r - min_r, max_g - min_g), max_b - min_b);
 
 		m_br = clamp<int>(static_cast<uint32_t>(m_avg_color[0] * m_limit / 255.0f + .5f), 0, m_limit);
 		m_bg = clamp<int>(static_cast<uint32_t>(m_avg_color[1] * m_limit / 255.0f + .5f), 0, m_limit);
diff --git a/encoder/basisu_gpu_texture.cpp b/encoder/basisu_gpu_texture.cpp
index 83c444b..3f9fb67 100644
--- a/encoder/basisu_gpu_texture.cpp
+++ b/encoder/basisu_gpu_texture.cpp
@@ -399,7 +399,7 @@
 
 		if (mode)
 		{
-			c[1].set(basisu::max(0, c[0].r - (c[3].r >> 2)), basisu::max(0, c[0].g - (c[3].g >> 2)), basisu::max(0, c[0].b - (c[3].b >> 2)), 255);
+			c[1].set(basisu::maximum(0, c[0].r - (c[3].r >> 2)), basisu::maximum(0, c[0].g - (c[3].g >> 2)), basisu::maximum(0, c[0].b - (c[3].b >> 2)), 255);
 			c[2] = c[0];
 			c[0].set(0, 0, 0, 255);
 		}
diff --git a/encoder/basisu_pvrtc1_4.cpp b/encoder/basisu_pvrtc1_4.cpp
index f3e4ce4..596fc19 100644
--- a/encoder/basisu_pvrtc1_4.cpp
+++ b/encoder/basisu_pvrtc1_4.cpp
@@ -529,7 +529,7 @@
 
 		uint64_t e03_err_1 = remap_pixels_influenced_by_endpoint(bx, by, orig_img, perceptual, false);
 
-		if (initial_error < basisu::min(e03_err_0, e03_err_1))
+		if (initial_error < basisu::minimum(e03_err_0, e03_err_1))
 		{
 			for (int y = -1; y <= 1; y++)
 			{
diff --git a/encoder/basisu_uastc_enc.cpp b/encoder/basisu_uastc_enc.cpp
index a412cf5..ca2b325 100644
--- a/encoder/basisu_uastc_enc.cpp
+++ b/encoder/basisu_uastc_enc.cpp
@@ -1630,7 +1630,7 @@
 		else if (estimate_partition_list_size > 0)
 		{
 			assert(estimate_partition_list_size <= MAX_PARTS);
-			estimate_partition_list_size = basisu::min(estimate_partition_list_size, MAX_PARTS);
+			estimate_partition_list_size = basisu::minimum(estimate_partition_list_size, MAX_PARTS);
 
 			estimate_partition2_list(4, 4, g_bc7_weights2, (const color_rgba(*)[4])pBlock, parts, estimate_partition_list_size, weights);
 
@@ -2817,13 +2817,13 @@
 						avg_color[1] += p.g;
 						avg_color[2] += p.b;
 
-						min_r[subset] = basisu::min<uint32_t>(min_r[subset], p.r);
-						min_g[subset] = basisu::min<uint32_t>(min_g[subset], p.g);
-						min_b[subset] = basisu::min<uint32_t>(min_b[subset], p.b);
+						min_r[subset] = basisu::minimum<uint32_t>(min_r[subset], p.r);
+						min_g[subset] = basisu::minimum<uint32_t>(min_g[subset], p.g);
+						min_b[subset] = basisu::minimum<uint32_t>(min_b[subset], p.b);
 
-						max_r[subset] = basisu::max<uint32_t>(max_r[subset], p.r);
-						max_g[subset] = basisu::max<uint32_t>(max_g[subset], p.g);
-						max_b[subset] = basisu::max<uint32_t>(max_b[subset], p.b);
+						max_r[subset] = basisu::maximum<uint32_t>(max_r[subset], p.r);
+						max_g[subset] = basisu::maximum<uint32_t>(max_g[subset], p.g);
+						max_b[subset] = basisu::maximum<uint32_t>(max_b[subset], p.b);
 					} // j
 
 					unbiased_block_colors[subset][0] = (uint8_t)((avg_color[0] * mul + 1020) / (8 * 255));
@@ -3769,7 +3769,7 @@
 			dist_cost += g_tdefl_small_dist_extra[dist & 511];
 		else
 		{
-			dist_cost += g_tdefl_large_dist_extra[basisu::min<uint32_t>(dist, 32767) >> 8];
+			dist_cost += g_tdefl_large_dist_extra[basisu::minimum<uint32_t>(dist, 32767) >> 8];
 			while (dist >= 32768)
 			{
 				dist_cost++;
@@ -3839,7 +3839,7 @@
 	{
 		debug_printf("uastc_rdo_blocks: Processing blocks %u to %u\n", first_index, last_index);
 
-		const int total_blocks_to_check = basisu::max<uint32_t>(1U, params.m_lz_dict_size / sizeof(basist::uastc_block));
+		const int total_blocks_to_check = basisu::maximum<uint32_t>(1U, params.m_lz_dict_size / sizeof(basist::uastc_block));
 		const bool perceptual = false;
 
 		std::unordered_map<selector_bitsequence, uint32_t, selector_bitsequence_hash> selector_history;
@@ -3867,7 +3867,7 @@
 				a_stats.update(pPixels[i].a);
 			}
 
-			const float max_std_dev = basisu::max<float>(basisu::max<float>(basisu::max(r_stats.get_std_dev(), g_stats.get_std_dev()), b_stats.get_std_dev()), a_stats.get_std_dev());
+			const float max_std_dev = basisu::maximum<float>(basisu::maximum<float>(basisu::maximum(r_stats.get_std_dev(), g_stats.get_std_dev()), b_stats.get_std_dev()), a_stats.get_std_dev());
 
 			float yl = clamp<float>(max_std_dev / params.m_max_smooth_block_std_dev, 0.0f, 1.0f);
 			yl = yl * yl;
@@ -3910,7 +3910,7 @@
 			assert(total_sel_bits > 0);
 
 			uint32_t cur_bit_offset = first_sel_bit;
-			uint64_t cur_sel_bits = read_bits((const uint8_t*)&blk, cur_bit_offset, basisu::min(64U, total_sel_bits));
+			uint64_t cur_sel_bits = read_bits((const uint8_t*)&blk, cur_bit_offset, basisu::minimum(64U, total_sel_bits));
 
 			if (cur_rms_err >= params.m_skip_block_rms_thresh)
 			{
@@ -3940,7 +3940,7 @@
 				cur_bits = compute_match_cost_estimate(block_dist_in_bytes);
 			}
 
-			int first_block_to_check = basisu::max<int>(first_index, block_index - total_blocks_to_check);
+			int first_block_to_check = basisu::maximum<int>(first_index, block_index - total_blocks_to_check);
 			int last_block_to_check = block_index - 1;
 
 			basist::uastc_block best_block(blk);
@@ -3955,7 +3955,7 @@
 				const basist::uastc_block& prev_blk = pBlocks[prev_block_index];
 
 				uint32_t bit_offset = first_sel_bit;
-				uint64_t sel_bits = read_bits((const uint8_t*)&prev_blk, bit_offset, basisu::min(64U, total_sel_bits));
+				uint64_t sel_bits = read_bits((const uint8_t*)&prev_blk, bit_offset, basisu::minimum(64U, total_sel_bits));
 
 				int match_block_index = prev_block_index;
 				auto res = selector_history.find(selector_bitsequence(first_sel_bit, sel_bits));
@@ -3971,13 +3971,13 @@
 
 				basist::uastc_block trial_blk(blk);
 
-				set_block_bits((uint8_t*)&trial_blk, sel_bits, basisu::min(64U, total_sel_bits), first_sel_bit);
+				set_block_bits((uint8_t*)&trial_blk, sel_bits, basisu::minimum(64U, total_sel_bits), first_sel_bit);
 
 				if (total_sel_bits > 64)
 				{
 					sel_bits = read_bits((const uint8_t*)&prev_blk, bit_offset, total_sel_bits - 64U);
 
-					set_block_bits((uint8_t*)&trial_blk, sel_bits, total_sel_bits - 64U, first_sel_bit + basisu::min(64U, total_sel_bits));
+					set_block_bits((uint8_t*)&trial_blk, sel_bits, total_sel_bits - 64U, first_sel_bit + basisu::minimum(64U, total_sel_bits));
 				}
 
 				unpacked_uastc_block unpacked_trial_blk;
@@ -4102,7 +4102,7 @@
 
 			{
 				uint32_t bit_offset = first_sel_bit;
-				uint64_t sel_bits = read_bits((const uint8_t*)&best_block, bit_offset, basisu::min(64U, total_sel_bits));
+				uint64_t sel_bits = read_bits((const uint8_t*)&best_block, bit_offset, basisu::minimum(64U, total_sel_bits));
 
 				auto res = selector_history.insert(std::make_pair(selector_bitsequence(first_sel_bit, sel_bits), block_index));
 				if (!res.second)
diff --git a/transcoder/basisu.h b/transcoder/basisu.h
index 5e82e4c..b7423cf 100644
--- a/transcoder/basisu.h
+++ b/transcoder/basisu.h
@@ -116,10 +116,8 @@
 	void enable_debug_printf(bool enabled);
 	void debug_printf(const char *pFmt, ...);
 		
-	template <typename T> inline void clear_obj(T& obj) { memset(&obj, 0, sizeof(obj)); }
 
-	template<class T> const T& min(const T& a, const T& b) { return (b < a) ? b : a; }
-	template<class T> const T& max(const T& a, const T& b) { return (a < b) ? b : a; }
+	template <typename T> inline void clear_obj(T& obj) { memset(&obj, 0, sizeof(obj)); }
 
 	template <typename T0, typename T1> inline T0 lerp(T0 a, T0 b, T1 c) { return a + (b - a) * c; }
 
diff --git a/transcoder/basisu_transcoder.cpp b/transcoder/basisu_transcoder.cpp
index a7d3e76..c99dda4 100644
--- a/transcoder/basisu_transcoder.cpp
+++ b/transcoder/basisu_transcoder.cpp
@@ -5082,7 +5082,7 @@
 
 		while (total_bits)
 		{
-			const uint32_t bits_to_write = basisu::min<int>(total_bits, 8 - (bit_pos & 7));
+			const uint32_t bits_to_write = basisu::minimum<int>(total_bits, 8 - (bit_pos & 7));
 
 			pBytes[bit_pos >> 3] |= static_cast<uint8_t>(value << (bit_pos & 7));
 
@@ -11893,7 +11893,7 @@
 			{
 				uint8_t vals[5] = { 0, 0, 0, 0, 0 };
 
-				const int limit = basisu::min(group_size, num_vals - group_index * group_size);
+				const int limit = basisu::minimum(group_size, num_vals - group_index * group_size);
 				for (int i = 0; i < limit; i++)
 					vals[i] = pSrc_vals[group_index * group_size + i];
 
@@ -12480,7 +12480,7 @@
 			
 			// Read the weight bits
 			if ((BASISD_IS_BIG_ENDIAN) || (!BASISD_USE_UNALIGNED_WORD_READS))
-				bits = read_bits64(blk.m_bytes, bit_ofs, basisu::min<int>(64, 128 - (int)bit_ofs));
+				bits = read_bits64(blk.m_bytes, bit_ofs, basisu::minimum<int>(64, 128 - (int)bit_ofs));
 			else
 			{
 #ifdef __EMSCRIPTEN__
@@ -12649,7 +12649,7 @@
 		color32 endpoints[3][2];
 
 		const uint32_t total_subsets = g_uastc_mode_subsets[mode];
-		const uint32_t total_comps = basisu::min<uint32_t>(4U, g_uastc_mode_comps[mode]);
+		const uint32_t total_comps = basisu::minimum<uint32_t>(4U, g_uastc_mode_comps[mode]);
 		const uint32_t endpoint_range = g_uastc_mode_endpoint_ranges[mode];
 		const uint32_t total_planes = g_uastc_mode_planes[mode];
 		const uint32_t weight_bits = g_uastc_mode_weight_bits[mode];
@@ -13845,7 +13845,7 @@
 						uint32_t sels[4] = { 0,0,0,0 };
 
 						const uint32_t N = 4;
-						for (uint32_t i = 0; i < basisu::min<uint32_t>(N, (256 - c)); i++)
+						for (uint32_t i = 0; i < basisu::minimum<uint32_t>(N, (256 - c)); i++)
 						{
 							uint32_t best_sel_e = UINT32_MAX;
 							uint32_t best_sel = 0;
@@ -13925,7 +13925,7 @@
 						uint32_t sels[4] = { 0,0,0,0 };
 
 						const uint32_t N = 1;
-						for (uint32_t i = 0; i < basisu::min<uint32_t>(N, (256 - c)); i++)
+						for (uint32_t i = 0; i < basisu::minimum<uint32_t>(N, (256 - c)); i++)
 						{
 							uint32_t best_sel_e = UINT32_MAX;
 							uint32_t best_sel = 0;
@@ -14029,8 +14029,8 @@
 				for (uint32_t x = 0; x < 4; x++)
 				{
 					const uint32_t v = block_y[y][x];
-					low[0] = basisu::min(low[0], v);
-					high[0] = basisu::max(high[0], v);
+					low[0] = basisu::minimum(low[0], v);
+					high[0] = basisu::maximum(high[0], v);
 				}
 			}
 			for (uint32_t y = 2; y < 4; y++)
@@ -14038,8 +14038,8 @@
 				for (uint32_t x = 0; x < 4; x++)
 				{
 					const uint32_t v = block_y[y][x];
-					low[1] = basisu::min(low[1], v);
-					high[1] = basisu::max(high[1], v);
+					low[1] = basisu::minimum(low[1], v);
+					high[1] = basisu::maximum(high[1], v);
 				}
 			}
 		}
@@ -14050,8 +14050,8 @@
 				for (uint32_t x = 0; x < 2; x++)
 				{
 					const uint32_t v = block_y[y][x];
-					low[0] = basisu::min(low[0], v);
-					high[0] = basisu::max(high[0], v);
+					low[0] = basisu::minimum(low[0], v);
+					high[0] = basisu::maximum(high[0], v);
 				}
 			}
 			for (uint32_t y = 0; y < 4; y++)
@@ -14059,8 +14059,8 @@
 				for (uint32_t x = 2; x < 4; x++)
 				{
 					const uint32_t v = block_y[y][x];
-					low[1] = basisu::min(low[1], v);
-					high[1] = basisu::max(high[1], v);
+					low[1] = basisu::minimum(low[1], v);
+					high[1] = basisu::maximum(high[1], v);
 				}
 			}
 		}
@@ -14320,10 +14320,10 @@
 				if ((inten_table_mask & (1 << inten)) == 0)
 					continue;
 
-				const int t0 = basisu::max(low_limit, g_etc1_inten_tables[inten][0]);
-				const int t1 = basisu::max(low_limit, g_etc1_inten_tables[inten][1]);
-				const int t2 = basisu::min(high_limit, g_etc1_inten_tables[inten][2]);
-				const int t3 = basisu::min(high_limit, g_etc1_inten_tables[inten][3]);
+				const int t0 = basisu::maximum(low_limit, g_etc1_inten_tables[inten][0]);
+				const int t1 = basisu::maximum(low_limit, g_etc1_inten_tables[inten][1]);
+				const int t2 = basisu::minimum(high_limit, g_etc1_inten_tables[inten][2]);
+				const int t3 = basisu::minimum(high_limit, g_etc1_inten_tables[inten][3]);
 				assert((t0 <= t1) && (t1 <= t2) && (t2 <= t3));
 
 				const int tv[4] = { t2, t3, t1, t0 };
@@ -14541,8 +14541,8 @@
 		uint32_t min_a = 255, max_a = 0;
 		for (uint32_t i = 0; i < 16; i++)
 		{
-			min_a = basisu::min<uint32_t>(min_a, pSrc_pixels[i].a);
-			max_a = basisu::max<uint32_t>(max_a, pSrc_pixels[i].a);
+			min_a = basisu::minimum<uint32_t>(min_a, pSrc_pixels[i].a);
+			max_a = basisu::maximum<uint32_t>(max_a, pSrc_pixels[i].a);
 		}
 
 		if (min_a == max_a)
@@ -14640,24 +14640,24 @@
 		}
 
 		{
-			uint32_t v0 = pPixels[4 * stride]; min0_v = basisu::min(min0_v, v0); max0_v = basisu::max(max0_v, v0);
-			uint32_t v1 = pPixels[5 * stride]; min1_v = basisu::min(min1_v, v1); max1_v = basisu::max(max1_v, v1);
-			uint32_t v2 = pPixels[6 * stride]; min2_v = basisu::min(min2_v, v2); max2_v = basisu::max(max2_v, v2);
-			uint32_t v3 = pPixels[7 * stride]; min3_v = basisu::min(min3_v, v3); max3_v = basisu::max(max3_v, v3);
+			uint32_t v0 = pPixels[4 * stride]; min0_v = basisu::minimum(min0_v, v0); max0_v = basisu::maximum(max0_v, v0);
+			uint32_t v1 = pPixels[5 * stride]; min1_v = basisu::minimum(min1_v, v1); max1_v = basisu::maximum(max1_v, v1);
+			uint32_t v2 = pPixels[6 * stride]; min2_v = basisu::minimum(min2_v, v2); max2_v = basisu::maximum(max2_v, v2);
+			uint32_t v3 = pPixels[7 * stride]; min3_v = basisu::minimum(min3_v, v3); max3_v = basisu::maximum(max3_v, v3);
 		}
 
 		{
-			uint32_t v0 = pPixels[8 * stride]; min0_v = basisu::min(min0_v, v0); max0_v = basisu::max(max0_v, v0);
-			uint32_t v1 = pPixels[9 * stride]; min1_v = basisu::min(min1_v, v1); max1_v = basisu::max(max1_v, v1);
-			uint32_t v2 = pPixels[10 * stride]; min2_v = basisu::min(min2_v, v2); max2_v = basisu::max(max2_v, v2);
-			uint32_t v3 = pPixels[11 * stride]; min3_v = basisu::min(min3_v, v3); max3_v = basisu::max(max3_v, v3);
+			uint32_t v0 = pPixels[8 * stride]; min0_v = basisu::minimum(min0_v, v0); max0_v = basisu::maximum(max0_v, v0);
+			uint32_t v1 = pPixels[9 * stride]; min1_v = basisu::minimum(min1_v, v1); max1_v = basisu::maximum(max1_v, v1);
+			uint32_t v2 = pPixels[10 * stride]; min2_v = basisu::minimum(min2_v, v2); max2_v = basisu::maximum(max2_v, v2);
+			uint32_t v3 = pPixels[11 * stride]; min3_v = basisu::minimum(min3_v, v3); max3_v = basisu::maximum(max3_v, v3);
 		}
 
 		{
-			uint32_t v0 = pPixels[12 * stride]; min0_v = basisu::min(min0_v, v0); max0_v = basisu::max(max0_v, v0);
-			uint32_t v1 = pPixels[13 * stride]; min1_v = basisu::min(min1_v, v1); max1_v = basisu::max(max1_v, v1);
-			uint32_t v2 = pPixels[14 * stride]; min2_v = basisu::min(min2_v, v2); max2_v = basisu::max(max2_v, v2);
-			uint32_t v3 = pPixels[15 * stride]; min3_v = basisu::min(min3_v, v3); max3_v = basisu::max(max3_v, v3);
+			uint32_t v0 = pPixels[12 * stride]; min0_v = basisu::minimum(min0_v, v0); max0_v = basisu::maximum(max0_v, v0);
+			uint32_t v1 = pPixels[13 * stride]; min1_v = basisu::minimum(min1_v, v1); max1_v = basisu::maximum(max1_v, v1);
+			uint32_t v2 = pPixels[14 * stride]; min2_v = basisu::minimum(min2_v, v2); max2_v = basisu::maximum(max2_v, v2);
+			uint32_t v3 = pPixels[15 * stride]; min3_v = basisu::minimum(min3_v, v3); max3_v = basisu::maximum(max3_v, v3);
 		}
 
 		const uint32_t min_v = basisu::minimum(min0_v, min1_v, min2_v, min3_v);
@@ -14982,8 +14982,8 @@
 			for (uint32_t i = 1; i < 16; i++)
 			{
 				const int r = pSrc_pixels[i].r, g = pSrc_pixels[i].g, b = pSrc_pixels[i].b;
-				max_r = basisu::max(max_r, r); max_g = basisu::max(max_g, g); max_b = basisu::max(max_b, b);
-				min_r = basisu::min(min_r, r); min_g = basisu::min(min_g, g); min_b = basisu::min(min_b, b);
+				max_r = basisu::maximum(max_r, r); max_g = basisu::maximum(max_g, g); max_b = basisu::maximum(max_b, b);
+				min_r = basisu::minimum(min_r, r); min_g = basisu::minimum(min_g, g); min_b = basisu::minimum(min_b, b);
 				total_r += r; total_g += g; total_b += b;
 			}
 
@@ -15214,8 +15214,8 @@
 			{
 				const int r = pSrc_pixels[i].r, g = pSrc_pixels[i].g, b = pSrc_pixels[i].b;
 				grayscale_flag &= ((r == g) && (r == b));
-				max_r = basisu::max(max_r, r); max_g = basisu::max(max_g, g); max_b = basisu::max(max_b, b);
-				min_r = basisu::min(min_r, r); min_g = basisu::min(min_g, g); min_b = basisu::min(min_b, b);
+				max_r = basisu::maximum(max_r, r); max_g = basisu::maximum(max_g, g); max_b = basisu::maximum(max_b, b);
+				min_r = basisu::minimum(min_r, r); min_g = basisu::minimum(min_g, g); min_b = basisu::minimum(min_b, b);
 				total_r += r; total_g += g; total_b += b;
 			}
 						
@@ -15252,25 +15252,25 @@
 
 				uint32_t min_d0 = (dist[0][0] + dist[1][0] + dist[2][0]);
 				uint32_t d4 = (dist[0][0] + dist[1][0] + dist[2][1]) | 4;
-				min_d0 = basisu::min(min_d0, d4);
+				min_d0 = basisu::minimum(min_d0, d4);
 
 				uint32_t min_d1 = (dist[0][1] + dist[1][0] + dist[2][0]) | 1;
 				uint32_t d5 = (dist[0][1] + dist[1][0] + dist[2][1]) | 5;
-				min_d1 = basisu::min(min_d1, d5);
+				min_d1 = basisu::minimum(min_d1, d5);
 
 				uint32_t d2 = (dist[0][0] + dist[1][1] + dist[2][0]) | 2;
-				min_d0 = basisu::min(min_d0, d2);
+				min_d0 = basisu::minimum(min_d0, d2);
 
 				uint32_t d3 = (dist[0][1] + dist[1][1] + dist[2][0]) | 3;
-				min_d1 = basisu::min(min_d1, d3);
+				min_d1 = basisu::minimum(min_d1, d3);
 
 				uint32_t d6 = (dist[0][0] + dist[1][1] + dist[2][1]) | 6;
-				min_d0 = basisu::min(min_d0, d6);
+				min_d0 = basisu::minimum(min_d0, d6);
 
 				uint32_t d7 = (dist[0][1] + dist[1][1] + dist[2][1]) | 7;
-				min_d1 = basisu::min(min_d1, d7);
+				min_d1 = basisu::minimum(min_d1, d7);
 
-				uint32_t min_d = basisu::min(min_d0, min_d1);
+				uint32_t min_d = basisu::minimum(min_d0, min_d1);
 				uint32_t best_i = min_d & 7;
 
 				int delta_r = (best_i & 1) ? (max_r - avg_r) : (avg_r - min_r);
@@ -15855,10 +15855,10 @@
 					const int v2 = clamp255(mul[2] * g_eac_modifier_table[T2][s] + base[2]);
 					const int v3 = clamp255(mul[3] * g_eac_modifier_table[T3][s] + base[3]);
 
-					l0 = basisu::min(l0, (basisu::iabs(v0 - a) << 3) | s);
-					l1 = basisu::min(l1, (basisu::iabs(v1 - a) << 3) | s);
-					l2 = basisu::min(l2, (basisu::iabs(v2 - a) << 3) | s);
-					l3 = basisu::min(l3, (basisu::iabs(v3 - a) << 3) | s);
+					l0 = basisu::minimum(l0, (basisu::iabs(v0 - a) << 3) | s);
+					l1 = basisu::minimum(l1, (basisu::iabs(v1 - a) << 3) | s);
+					l2 = basisu::minimum(l2, (basisu::iabs(v2 - a) << 3) | s);
+					l3 = basisu::minimum(l3, (basisu::iabs(v3 - a) << 3) | s);
 				}
 			}
 			else if (mul_or == 1)
@@ -15872,10 +15872,10 @@
 					const int v2 = g_eac_modifier_table[T2][s] + a2;
 					const int v3 = g_eac_modifier_table[T3][s] + a3;
 
-					l0 = basisu::min(l0, (basisu::iabs(v0) << 3) | s);
-					l1 = basisu::min(l1, (basisu::iabs(v1) << 3) | s);
-					l2 = basisu::min(l2, (basisu::iabs(v2) << 3) | s);
-					l3 = basisu::min(l3, (basisu::iabs(v3) << 3) | s);
+					l0 = basisu::minimum(l0, (basisu::iabs(v0) << 3) | s);
+					l1 = basisu::minimum(l1, (basisu::iabs(v1) << 3) | s);
+					l2 = basisu::minimum(l2, (basisu::iabs(v2) << 3) | s);
+					l3 = basisu::minimum(l3, (basisu::iabs(v3) << 3) | s);
 				}
 			}
 			else
@@ -15889,10 +15889,10 @@
 					const int v2 = mul[2] * g_eac_modifier_table[T2][s] + a2;
 					const int v3 = mul[3] * g_eac_modifier_table[T3][s] + a3;
 
-					l0 = basisu::min(l0, (basisu::iabs(v0) << 3) | s);
-					l1 = basisu::min(l1, (basisu::iabs(v1) << 3) | s);
-					l2 = basisu::min(l2, (basisu::iabs(v2) << 3) | s);
-					l3 = basisu::min(l3, (basisu::iabs(v3) << 3) | s);
+					l0 = basisu::minimum(l0, (basisu::iabs(v0) << 3) | s);
+					l1 = basisu::minimum(l1, (basisu::iabs(v1) << 3) | s);
+					l2 = basisu::minimum(l2, (basisu::iabs(v2) << 3) | s);
+					l3 = basisu::minimum(l3, (basisu::iabs(v3) << 3) | s);
 				}
 			}
 
@@ -16011,13 +16011,13 @@
 				else
 				{
 					uint32_t l = basisu::iabs(clamp255(m * pTable[0] + b) - a) << 3;
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[1] + b) - a) << 3) | 1);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[2] + b) - a) << 3) | 2);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[3] + b) - a) << 3) | 3);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[4] + b) - a) << 3) | 4);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[5] + b) - a) << 3) | 5);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[6] + b) - a) << 3) | 6);
-					l = basisu::min(l, (basisu::iabs(clamp255(m * pTable[7] + b) - a) << 3) | 7);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[1] + b) - a) << 3) | 1);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[2] + b) - a) << 3) | 2);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[3] + b) - a) << 3) | 3);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[4] + b) - a) << 3) | 4);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[5] + b) - a) << 3) | 5);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[6] + b) - a) << 3) | 6);
+					l = basisu::minimum(l, (basisu::iabs(clamp255(m * pTable[7] + b) - a) << 3) | 7);
 
 					sels[table][i] = l & 7;
 					total_err[table] += basisu::square<uint32_t>(l >> 3);
@@ -16464,8 +16464,8 @@
 					uint32_t low_a = 255, high_a = 0;
 					for (uint32_t i = 0; i < 16; i++)
 					{
-						low_a = basisu::min<uint32_t>(low_a, block_pixels[i].a);
-						high_a = basisu::max<uint32_t>(high_a, block_pixels[i].a);
+						low_a = basisu::minimum<uint32_t>(low_a, block_pixels[i].a);
+						high_a = basisu::maximum<uint32_t>(high_a, block_pixels[i].a);
 					}
 					low_color.set(low_a, low_a, low_a, 255);
 					high_color.set(high_a, high_a, high_a, 255);
diff --git a/transcoder/basisu_transcoder_internal.h b/transcoder/basisu_transcoder_internal.h
index 672e678..28e7eeb 100644
--- a/transcoder/basisu_transcoder_internal.h
+++ b/transcoder/basisu_transcoder_internal.h
@@ -686,8 +686,8 @@
 
 		bool operator== (const color32&rhs) const { return m == rhs.m; }
 
-		static color32 comp_min(const color32& a, const color32& b) { return color32(cNoClamp, basisu::min(a[0], b[0]), basisu::min(a[1], b[1]), basisu::min(a[2], b[2]), basisu::min(a[3], b[3])); }
-		static color32 comp_max(const color32& a, const color32& b) { return color32(cNoClamp, basisu::max(a[0], b[0]), basisu::max(a[1], b[1]), basisu::max(a[2], b[2]), basisu::max(a[3], b[3])); }
+		static color32 comp_min(const color32& a, const color32& b) { return color32(cNoClamp, basisu::minimum(a[0], b[0]), basisu::minimum(a[1], b[1]), basisu::minimum(a[2], b[2]), basisu::minimum(a[3], b[3])); }
+		static color32 comp_max(const color32& a, const color32& b) { return color32(cNoClamp, basisu::maximum(a[0], b[0]), basisu::maximum(a[1], b[1]), basisu::maximum(a[2], b[2]), basisu::maximum(a[3], b[3])); }
 	};
 
 	struct endpoint