Home
last modified time | relevance | path

Searched refs:astc (Results 1 - 25 of 47) sorted by relevance

12

/third_party/vk-gl-cts/modules/internal/
H A DditAstcTests.cpp90 if (!astc::isValidBlock(data + blockNdx*astc::BLOCK_SIZE_BYTES, format, mode)) in verifyBlocksValid()
97 TCU_CHECK(numBytes % astc::BLOCK_SIZE_BYTES == 0); in getNumBlocksFromBytes()
98 return (numBytes / astc::BLOCK_SIZE_BYTES); in getNumBlocksFromBytes()
106 for (int blockTestTypeNdx = 0; blockTestTypeNdx < astc::BLOCK_TEST_TYPE_LAST; blockTestTypeNdx++) in iterate()
108 const astc::BlockTestType blockTestType = (astc::BlockTestType)blockTestTypeNdx; in iterate()
110 if (astc::isBlockTestTypeHDROnly(blockTestType) && isAstcSRGBFormat(m_format)) in iterate()
114 astc::generateBlockCaseTestData(generatedData, m_format, blockTestType); in iterate()
119 if (blockTestType != astc in iterate()
[all...]
/third_party/astc-encoder/Source/
H A Dastcenc_color_quantize.cpp220 color0_out.set_lane<3>(quant_color(quant_level, astc::flt2int_rtn(a0), a0)); in quantize_rgba()
221 color1_out.set_lane<3>(quant_color(quant_level, astc::flt2int_rtn(a1), a1)); in quantize_rgba()
297 color0_out.set_lane<3>(quant_color(quant_level, astc::flt2int_rtn(a1), a1)); in try_quantize_rgba_blue_contract()
298 color1_out.set_lane<3>(quant_color(quant_level, astc::flt2int_rtn(a0), a0)); in try_quantize_rgba_blue_contract()
514 int a0a = astc::flt2int_rtn(a0); in try_quantize_alpha_delta()
520 int a1d = astc::flt2int_rtn(a1); in try_quantize_alpha_delta()
585 int l0a = astc::flt2int_rtn(l0); in try_quantize_luminance_alpha_delta()
586 int a0a = astc::flt2int_rtn(a0); in try_quantize_luminance_alpha_delta()
599 int l1d = astc::flt2int_rtn(l1); in try_quantize_luminance_alpha_delta()
600 int a1d = astc in try_quantize_luminance_alpha_delta()
[all...]
H A Dastcenc_find_best_partitioning.cpp114 sample = astc::min(sample, texel_count - 1); in kmeans_init()
130 distance = astc::min(distance, distances[i]); in kmeans_init()
263 return static_cast<uint8_t>(astc::min(c1, c2) / 2); // 2 is the number of partitions in partition_mismatch2()
275 return static_cast<uint8_t>(astc::min(v1, v2) / 2); in partition_mismatch2()
305 int v0 = astc::min(s0, s1) + p00; in partition_mismatch3()
309 int v1 = astc::min(s2, s3) + p01; in partition_mismatch3()
313 int v2 = astc::min(s4, s5) + p02; in partition_mismatch3()
317 return static_cast<uint8_t>(astc::min(v0, v1, v2) / 2); in partition_mismatch3()
352 int mx23 = astc::min(p22 + p33, p23 + p32); in partition_mismatch4()
353 int mx13 = astc in partition_mismatch4()
[all...]
H A Dastcenc_entry.cpp397 config.rgbm_m_scale = astc::max(config.rgbm_m_scale, 1.0f); in validate_config()
399 config.tune_partition_count_limit = astc::clamp(config.tune_partition_count_limit, 1u, 4u); in validate_config()
400 config.tune_2partition_index_limit = astc::clamp(config.tune_2partition_index_limit, 1u, BLOCK_MAX_PARTITIONINGS); in validate_config()
401 config.tune_3partition_index_limit = astc::clamp(config.tune_3partition_index_limit, 1u, BLOCK_MAX_PARTITIONINGS); in validate_config()
402 config.tune_4partition_index_limit = astc::clamp(config.tune_4partition_index_limit, 1u, BLOCK_MAX_PARTITIONINGS); in validate_config()
403 config.tune_block_mode_limit = astc::clamp(config.tune_block_mode_limit, 1u, 100u); in validate_config()
404 config.tune_refinement_limit = astc::max(config.tune_refinement_limit, 1u); in validate_config()
405 config.tune_candidate_limit = astc::clamp(config.tune_candidate_limit, 1u, TUNE_MAX_TRIAL_CANDIDATES); in validate_config()
406 config.tune_2partitioning_candidate_limit = astc::clamp(config.tune_2partitioning_candidate_limit, 1u, TUNE_MAX_PARTITIONING_CANDIDATES); in validate_config()
407 config.tune_3partitioning_candidate_limit = astc in validate_config()
[all...]
H A Dastcenc_ideal_endpoints_and_weights.cpp159 lowvalue = astc::min(value, lowvalue); in compute_ideal_colors_and_weights_1_comp()
160 highvalue = astc::max(value, highvalue); in compute_ideal_colors_and_weights_1_comp()
186 value = astc::clamp1f(value); in compute_ideal_colors_and_weights_1_comp()
190 assert(!astc::isnan(ei.weight_error_scale[tix])); in compute_ideal_colors_and_weights_1_comp()
289 lowparam = astc::min(param, lowparam);
290 highparam = astc::max(param, highparam);
318 idx = astc::clamp1f(idx);
322 assert(!astc::isnan(ei.weight_error_scale[tix]));
483 lowparam = astc::min(param, lowparam);
484 highparam = astc
[all...]
H A Dastcenc_compute_variance.cpp164 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance()
170 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance()
175 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance()
208 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance()
214 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance()
219 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance()
247 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance()
253 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance()
258 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance()
439 unsigned int max_blk_size_z = astc in init_compute_averages()
[all...]
H A Dastcenccli_error_metrics.cpp77 return astc::clamp(val, 0.0f, 255.0f); in mpsnr_operator()
129 unsigned int dim_x = astc::min(img1->dim_x, img2->dim_x); in compute_error_metrics()
130 unsigned int dim_y = astc::min(img1->dim_y, img2->dim_y); in compute_error_metrics()
131 unsigned int dim_z = astc::min(img1->dim_z, img2->dim_z); in compute_error_metrics()
235 rgb_peak = astc::max(static_cast<double>(color1.lane<0>()), in compute_error_metrics()
282 float rad_to_degrees = 180.0f / astc::PI; in compute_error_metrics()
286 worst_angular_errorsum = astc::max(worst_angular_errorsum, error_degrees); in compute_error_metrics()
H A Dastcenc_image.cpp213 unsigned int zi = astc::min(zpos + z, zsize - 1); in load_image_block()
218 unsigned int yi = astc::min(ypos + y, ysize - 1); in load_image_block()
222 unsigned int xi = astc::min(xpos + x, xsize - 1); in load_image_block()
297 unsigned int yi = astc::min(y, ysize - 1); in load_image_block_fast_ldr()
301 unsigned int xi = astc::min(x, xsize - 1); in load_image_block_fast_ldr()
346 unsigned int x_end = astc::min(x_size, xpos + bsd.xdim); in store_image_block()
352 unsigned int y_end = astc::min(y_size, ypos + bsd.ydim); in store_image_block()
358 unsigned int z_end = astc::min(z_size, zpos + bsd.zdim); in store_image_block()
383 unsigned int used_texels = astc::min(x_count - x, max_texels); in store_image_block()
481 data[ASTCENC_SWZ_Z] = (astc in store_image_block()
[all...]
H A Dastcenc_compress_symbolic.cpp502 // float weight = astc::flt_rd(weight_base + 0.5f); in realign_weights_decimated()
503 // float weight_down = astc::flt_rd(weight_base + 0.5f + uqw_diff_down * tw_base) - weight; in realign_weights_decimated()
504 // float weight_up = astc::flt_rd(weight_base + 0.5f + uqw_diff_up * tw_base) - weight; in realign_weights_decimated()
582 int max_weight_quant = astc::min(static_cast<int>(QUANT_32), quant_limit); in compress_symbolic_block_for_partition_1plane()
841 best_errorval_in_mode = astc::min(errorval, best_errorval_in_mode); in compress_symbolic_block_for_partition_1plane()
890 best_errorval_in_mode = astc::min(errorval, best_errorval_in_mode); in compress_symbolic_block_for_partition_1plane()
952 int max_weight_quant = astc::min(static_cast<int>(QUANT_32), quant_limit); in compress_symbolic_block_for_partition_2planes()
1178 best_errorval_in_mode = astc::min(errorval, best_errorval_in_mode); in compress_symbolic_block_for_partition_2planes()
1228 best_errorval_in_mode = astc::min(errorval, best_errorval_in_mode); in compress_symbolic_block_for_partition_2planes()
1330 float rpt = 1.0f / astc in prepare_block_statistics()
[all...]
H A Dastcenccli_image.cpp369 dst[4 * x ] = static_cast<uint8_t>(astc::flt2int_rtn(astc::clamp1f(data32[(4 * dim_x * ymod) + (4 * x )]) * 255.0f)); in unorm8x4_array_from_astc_img()
370 dst[4 * x + 1] = static_cast<uint8_t>(astc::flt2int_rtn(astc::clamp1f(data32[(4 * dim_x * ymod) + (4 * x + 1)]) * 255.0f)); in unorm8x4_array_from_astc_img()
371 dst[4 * x + 2] = static_cast<uint8_t>(astc::flt2int_rtn(astc::clamp1f(data32[(4 * dim_x * ymod) + (4 * x + 2)]) * 255.0f)); in unorm8x4_array_from_astc_img()
372 dst[4 * x + 3] = static_cast<uint8_t>(astc::flt2int_rtn(astc::clamp1f(data32[(4 * dim_x * ymod) + (4 * x + 3)]) * 255.0f)); in unorm8x4_array_from_astc_img()
H A Dastcenc_pick_best_endpoint_format.cpp442 ep1_min = astc::max(ep1_min, 0.0f);
844 int low2 = astc::min(i, j);
845 int high2 = astc::max(i, j);
852 float errorterm = astc::min(best_error[0][quant][i] + best_error[1][quant][j], 1e10f);
964 int low2 = astc::min(i, j);
965 int high2 = astc::max(i, j);
973 int low3 = astc::min(k, low2);
974 int high3 = astc::max(k, high2);
981 float errorterm = astc::min(best_error[0][quant][i] + best_error[1][quant][j] + best_error[2][quant][k], 1e10f);
1089 int low2 = astc
[all...]
H A Dastcenc_color_unquantize.cpp213 l1 = astc::min(l1, 255); in luminance_delta_unpack()
278 lum1 = astc::clamp(lum1, 0, 255); in luminance_alpha_delta_unpack()
279 alpha1 = astc::clamp(alpha1, 0, 255); in luminance_alpha_delta_unpack()
565 red0 = astc::clamp(red0, 0, 4095); in hdr_rgb_unpack()
566 green0 = astc::clamp(green0, 0, 4095); in hdr_rgb_unpack()
567 blue0 = astc::clamp(blue0, 0, 4095); in hdr_rgb_unpack()
569 red1 = astc::clamp(red1, 0, 4095); in hdr_rgb_unpack()
570 green1 = astc::clamp(green1, 0, 4095); in hdr_rgb_unpack()
571 blue1 = astc::clamp(blue1, 0, 4095); in hdr_rgb_unpack()
H A Dastcenc_mathlib.cpp32 void astc::rand_init(uint64_t state[2]) in rand_init()
39 uint64_t astc::rand(uint64_t state[2]) in rand()
H A Dastcenc_mathlib.h118 namespace astc namespace
282 return astc::clamp(v, 0.0f, 1.0f); in clamp1f()
296 return astc::clamp(v, 0.0f, 255.0f); in clamp255f()
H A Dastcenc_internal_entry.h196 m_callback_min_diff = astc::max(min_diff, 1.0f); in init()
219 count = astc::min(m_task_count - base, granule); in get_task_assignment()
H A Dastcenc_block_sizes.cpp319 max_texel_count_of_weight = astc::max(max_texel_count_of_weight, wb.texel_count_of_weight[qweight[i]]); in init_decimation_info_2d()
329 max_texel_weight_count = astc::max(max_texel_weight_count, di.texel_weight_count[i]); in init_decimation_info_2d()
574 max_texel_count_of_weight = astc::max(max_texel_count_of_weight, wb.texel_count_of_weight[qweight[i]]); in init_decimation_info_3d()
585 max_texel_weight_count = astc::max(max_texel_weight_count, di.texel_weight_count[i]); in init_decimation_info_3d()
704 astc::rand_init(rng_state); in assign_kmeans_texels()
717 uint8_t texel = static_cast<uint8_t>(astc::rand(rng_state)); in assign_kmeans_texels()
/third_party/vk-gl-cts/modules/gles3/functional/
H A Des3fASTCDecompressionCases.cpp71 using tcu::astc::BlockTestType;
99 for (int i = tcu::astc::BLOCK_SIZE_BYTES-1; i >= 0; i--) in astcBlockDataStr()
114 for (int i = tcu::astc::BLOCK_SIZE_BYTES-1; i >= 0; i--) in astcBlockDataStr()
381 DE_ASSERT(!(tcu::isAstcSRGBFormat(m_format) && tcu::astc::isBlockTestTypeHDROnly(m_testType))); // \note There is no HDR sRGB mode, so these would be redundant. in ASTCBlockCase2D()
391 m_renderer->initialize(64, 64, tcu::astc::getBlockTestTypeColorScale(m_testType), tcu::astc::getBlockTestTypeColorBias(m_testType)); in init()
395 DE_ASSERT(m_blockData.size() % tcu::astc::BLOCK_SIZE_BYTES == 0); in init()
397 m_testCtx.getLog() << TestLog::Message << "Total " << m_blockData.size() / tcu::astc::BLOCK_SIZE_BYTES << " blocks to test" << TestLog::EndMessage in init()
411 if (m_renderer->getASTCSupport() == ASTCSUPPORTLEVEL_LDR && tcu::astc::isBlockTestTypeHDROnly(m_testType)) in iterate()
419 const int totalNumBlocks = (int)m_blockData.size() / tcu::astc in iterate()
[all...]
H A Des3fCompressedTextureTests.cpp68 TestCaseGroup* const astcGroup = new TestCaseGroup(m_context, "astc", "ASTC Tests"); in init()
73 for (int astcTestTypeI = 0; astcTestTypeI < tcu::astc::BLOCK_TEST_TYPE_LAST; astcTestTypeI++) in init()
75 const tcu::astc::BlockTestType astcTestType = (tcu::astc::BlockTestType)astcTestTypeI; in init()
85 if (tcu::isAstcSRGBFormat(format) && tcu::astc::isBlockTestTypeHDROnly(astcTestType)) in init()
H A Des3fASTCDecompressionCases.hpp55 tcu::astc::BlockTestType testType,
67 const tcu::astc::BlockTestType m_testType;
/third_party/astc-encoder/Utils/
H A Dastc_rgbm_codec.cpp101 float max_rgb = astc::max(r_in, g_in, b_in); in main()
104 float m_scale = astc::min(1.0f, ceil(max_rgb * 255.0f) / 255.0f); in main()
107 m_scale = astc::max(m_scale, low_clamp / 255.0f); in main()
109 float r_scale = astc::min(1.0f, r_in / m_scale); in main()
110 float g_scale = astc::min(1.0f, g_in / m_scale); in main()
111 float b_scale = astc::min(1.0f, b_in / m_scale); in main()
H A Dastc_blend_test.cpp191 r_out = astc::min(r_out, 1.0f); in main()
192 g_out = astc::min(g_out, 1.0f); in main()
193 b_out = astc::min(b_out, 1.0f); in main()
267 r_out = astc::min(r_out, 1.0f); in main()
268 g_out = astc::min(g_out, 1.0f); in main()
269 b_out = astc::min(b_out, 1.0f); in main()
/third_party/skia/third_party/externals/swiftshader/third_party/astc-encoder/Source/
H A Dastc_mathlib.cpp32 void astc::rand_init(uint64_t state[2]) in rand_init()
39 uint64_t astc::rand(uint64_t state[2]) in rand()
/third_party/mesa3d/src/panfrost/lib/
H A Dpan_texture.c403 cfg.astc._3d.block_width = panfrost_astc_dim_3d(desc->block.width); in panfrost_emit_plane()
404 cfg.astc._3d.block_height = panfrost_astc_dim_3d(desc->block.height); in panfrost_emit_plane()
405 cfg.astc._3d.block_depth = panfrost_astc_dim_3d(desc->block.depth); in panfrost_emit_plane()
408 cfg.astc._2d.block_width = panfrost_astc_dim_2d(desc->block.width); in panfrost_emit_plane()
409 cfg.astc._2d.block_height = panfrost_astc_dim_2d(desc->block.height); in panfrost_emit_plane()
415 cfg.astc.decode_hdr = false; in panfrost_emit_plane()
424 cfg.astc.decode_wide = !srgb; in panfrost_emit_plane()
/third_party/mesa3d/src/gallium/drivers/etnaviv/
H A Detnaviv_texture_state.c170 const bool astc = !!(format & ASTC_FORMAT); in etna_create_sampler_view_state() local
194 COND(!ext && !astc, VIVS_TE_SAMPLER_CONFIG0_FORMAT(format)); in etna_create_sampler_view_state()
235 COND(astc, VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT(TEXTURE_FORMAT_EXT_ASTC)) | in etna_create_sampler_view_state()
238 sv->astc0 = COND(astc, VIVS_NTE_SAMPLER_ASTC0_ASTC_FORMAT(format)) | in etna_create_sampler_view_state()
239 COND(astc && srgb, VIVS_NTE_SAMPLER_ASTC0_ASTC_SRGB) | in etna_create_sampler_view_state()
248 COND(util_format_is_srgb(so->format) && !astc, VIVS_TE_SAMPLER_LOG_SIZE_SRGB) | in etna_create_sampler_view_state()
249 COND(astc, VIVS_TE_SAMPLER_LOG_SIZE_ASTC); in etna_create_sampler_view_state()
H A Detnaviv_texture_desc.c134 const bool astc = !!(format & ASTC_FORMAT); in etna_create_sampler_view_desc() local
188 DESC_SET(CONFIG0, COND(!ext && !astc, VIVS_TE_SAMPLER_CONFIG0_FORMAT(format)) in etna_create_sampler_view_desc()
193 COND(astc, VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT(TEXTURE_FORMAT_EXT_ASTC)) | in etna_create_sampler_view_desc()
203 DESC_SET(ASTC0, COND(astc, VIVS_NTE_SAMPLER_ASTC0_ASTC_FORMAT(format)) | in etna_create_sampler_view_desc()

Completed in 21 milliseconds

12