/hardware/google/gfxstream/third-party/astc-encoder/Source/ |
D | astcenc_vecmathlib_common_4.h | 139 ASTCENC_SIMD_INLINE vfloat4& operator+=(vfloat4& a, const vfloat4& b) 148 ASTCENC_SIMD_INLINE vfloat4 operator+(vfloat4 a, float b) 150 return a + vfloat4(b); 156 ASTCENC_SIMD_INLINE vfloat4 operator-(vfloat4 a, float b) 158 return a - vfloat4(b); 164 ASTCENC_SIMD_INLINE vfloat4 operator*(vfloat4 a, float b) 166 return a * vfloat4(b); 172 ASTCENC_SIMD_INLINE vfloat4 operator*(float a, vfloat4 b) 174 return vfloat4(a) * b; 180 ASTCENC_SIMD_INLINE vfloat4 operator/(vfloat4 a, float b) [all …]
|
D | astcenc_vecmathlib.h | 85 using vfloatacc = vfloat4; 101 using vfloat = vfloat4; 102 using vfloatacc = vfloat4; 106 constexpr auto loada = vfloat4::loada; 107 constexpr auto load1 = vfloat4::load1; 116 using vfloat = vfloat4; 117 using vfloatacc = vfloat4; 121 constexpr auto loada = vfloat4::loada; 122 constexpr auto load1 = vfloat4::load1; 148 using vfloat = vfloat4; [all …]
|
D | astcenc_vecmathlib_neon_4.h | 49 struct vfloat4 struct 54 ASTCENC_SIMD_INLINE vfloat4() = default; 62 ASTCENC_SIMD_INLINE explicit vfloat4(const float *p) in vfloat4() function 72 ASTCENC_SIMD_INLINE explicit vfloat4(float a) in vfloat4() argument 82 ASTCENC_SIMD_INLINE explicit vfloat4(float a, float b, float c, float d) in vfloat4() function 91 ASTCENC_SIMD_INLINE explicit vfloat4(float32x4_t a) in vfloat4() argument 115 static ASTCENC_SIMD_INLINE vfloat4 zero() in zero() argument 117 return vfloat4(vdupq_n_f32(0.0f)); in zero() 123 static ASTCENC_SIMD_INLINE vfloat4 load1(const float* p) in load1() argument 125 return vfloat4(vdupq_n_f32(*p)); in load1() [all …]
|
D | astcenc_vecmathlib_sse_4.h | 50 struct vfloat4 struct 55 ASTCENC_SIMD_INLINE vfloat4() = default; 63 ASTCENC_SIMD_INLINE explicit vfloat4(const float *p) in vfloat4() function 73 ASTCENC_SIMD_INLINE explicit vfloat4(float a) in vfloat4() argument 83 ASTCENC_SIMD_INLINE explicit vfloat4(float a, float b, float c, float d) in vfloat4() function 91 ASTCENC_SIMD_INLINE explicit vfloat4(__m128 a) in vfloat4() argument 123 static ASTCENC_SIMD_INLINE vfloat4 zero() in zero() argument 125 return vfloat4(_mm_setzero_ps()); in zero() 131 static ASTCENC_SIMD_INLINE vfloat4 load1(const float* p) in load1() argument 133 return vfloat4(_mm_load_ps1(p)); in load1() [all …]
|
D | astcenc_vecmathlib_none_4.h | 55 struct vfloat4 struct 60 ASTCENC_SIMD_INLINE vfloat4() = default; 68 ASTCENC_SIMD_INLINE explicit vfloat4(const float* p) in vfloat4() function 81 ASTCENC_SIMD_INLINE explicit vfloat4(float a) in vfloat4() argument 94 ASTCENC_SIMD_INLINE explicit vfloat4(float a, float b, float c, float d) in vfloat4() function 121 static ASTCENC_SIMD_INLINE vfloat4 zero() in zero() argument 123 return vfloat4(0.0f); in zero() 129 static ASTCENC_SIMD_INLINE vfloat4 load1(const float* p) in load1() argument 131 return vfloat4(*p); in load1() 137 static ASTCENC_SIMD_INLINE vfloat4 loada(const float* p) in loada() argument [all …]
|
D | astcenc_averages_and_directions.cpp | 50 vfloat4 averages[BLOCK_MAX_PARTITIONS] in compute_partition_averages_rgb() 86 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb() 88 vfloat4 p0_total = vfloat3(hadd_s(pp_avg_rgb[0]), in compute_partition_averages_rgb() 92 vfloat4 p1_total = block_total - p0_total; in compute_partition_averages_rgb() 126 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb() 128 vfloat4 p0_total = vfloat3(hadd_s(pp_avg_rgb[0][0]), in compute_partition_averages_rgb() 132 vfloat4 p1_total = vfloat3(hadd_s(pp_avg_rgb[1][0]), in compute_partition_averages_rgb() 136 vfloat4 p2_total = block_total - p0_total - p1_total; in compute_partition_averages_rgb() 175 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb() 177 vfloat4 p0_total = vfloat3(hadd_s(pp_avg_rgb[0][0]), in compute_partition_averages_rgb() [all …]
|
D | astcenc_ideal_endpoints_and_weights.cpp | 193 ei.ep.endpt0[i] = select(blk.data_min, vfloat4(lowvalue), sep_mask); in compute_ideal_colors_and_weights_1_comp() 194 ei.ep.endpt1[i] = select(blk.data_max, vfloat4(highvalue), sep_mask); in compute_ideal_colors_and_weights_1_comp() 271 vfloat4 dir = pms[i].dir; in compute_ideal_colors_and_weights_2_comp() 274 dir = vfloat4::zero() - dir; in compute_ideal_colors_and_weights_2_comp() 285 vfloat4 point = vfloat2(data_vr[tix], data_vg[tix]); in compute_ideal_colors_and_weights_2_comp() 325 vfloat4 lowvalue = line.a + line.b * lowparam; in compute_ideal_colors_and_weights_2_comp() 326 vfloat4 highvalue = line.a + line.b * highparam; in compute_ideal_colors_and_weights_2_comp() 328 vfloat4 ep0 = select(blk.data_min, vfloat4(lowvalue.lane<0>()), comp1_mask); in compute_ideal_colors_and_weights_2_comp() 329 vfloat4 ep1 = select(blk.data_max, vfloat4(highvalue.lane<0>()), comp1_mask); in compute_ideal_colors_and_weights_2_comp() 331 ei.ep.endpt0[i] = select(ep0, vfloat4(lowvalue.lane<1>()), comp2_mask); in compute_ideal_colors_and_weights_2_comp() [all …]
|
D | astcenc_image.cpp | 30 using pixel_loader = vfloat4(*)(const void*, int); 35 using pixel_swizzler = vfloat4(*)(vfloat4, const astcenc_swizzle&); 40 using pixel_converter = vfloat4(*)(vfloat4, vmask4); 48 static vfloat4 load_texel_u8( in load_texel_u8() 62 static vfloat4 load_texel_f16( in load_texel_f16() 80 static vfloat4 load_texel_f32( in load_texel_f32() 85 return vfloat4(data32 + base_offset); in load_texel_f32() 94 static vfloat4 swz_texel_skip( in swz_texel_skip() 95 vfloat4 data, in swz_texel_skip() 108 static vfloat4 swz_texel( in swz_texel() [all …]
|
D | astcenc_mathlib.h | 442 vfloat4 a; 443 vfloat4 b; 449 vfloat4 a; 450 vfloat4 b; 455 vfloat4 a; 456 vfloat4 b; 462 vfloat4 amod; 463 vfloat4 bs; 468 vfloat4 amod; 469 vfloat4 bs; [all …]
|
D | astcenccli_error_metrics.cpp | 50 vfloat4 inc in operator +=() 154 vfloat4 color1; in compute_error_metrics() 155 vfloat4 color2; in compute_error_metrics() 161 color1 = vfloat4( in compute_error_metrics() 187 color1 = vfloat4( in compute_error_metrics() 200 color2 = vfloat4( in compute_error_metrics() 226 color2 = vfloat4( in compute_error_metrics() 240 vfloat4 diffcolor = color1 - color2; in compute_error_metrics() 241 vfloat4 diffcolor_sq = diffcolor * diffcolor; in compute_error_metrics() 244 vfloat4 alpha_scaled_diffcolor = vfloat4( in compute_error_metrics() [all …]
|
D | astcenc_find_best_partitioning.cpp | 64 vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS] in kmeans_init() 74 vfloat4 center_color = blk.texel(sample); in kmeans_init() 82 vfloat4 color = blk.texel(i); in kmeans_init() 83 vfloat4 diff = color - center_color; in kmeans_init() 127 vfloat4 color = blk.texel(i); in kmeans_init() 128 vfloat4 diff = color - center_color; in kmeans_init() 150 const vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS], in kmeans_assign() 164 vfloat4 color = blk.texel(i); in kmeans_assign() 167 vfloat4 diff = color - cluster_centers[j]; in kmeans_assign() 214 vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS], in kmeans_update() [all …]
|
D | astcenc_weight_align.cpp | 264 vfloat4 best_results[36]; in compute_angular_endpoints_for_quant_levels() 273 best_results[i] = vfloat4(ERROR_CALC_DEFAULT, -1.0f, 0.0f, 0.0f); in compute_angular_endpoints_for_quant_levels() 288 vfloat4 best_result = best_results[idx_span]; in compute_angular_endpoints_for_quant_levels() 289 vfloat4 new_result = vfloat4(error[i], i_flt, 0.0f, 0.0f); in compute_angular_endpoints_for_quant_levels() 290 vmask4 mask = vfloat4(best_result.lane<0>()) > vfloat4(error[i]); in compute_angular_endpoints_for_quant_levels() 296 new_result = vfloat4(error_cut_low, i_flt, 1.0f, 0.0f); in compute_angular_endpoints_for_quant_levels() 297 mask = vfloat4(best_result.lane<0>()) > vfloat4(error_cut_low); in compute_angular_endpoints_for_quant_levels() 300 new_result = vfloat4(error_cut_high, i_flt, 0.0f, 0.0f); in compute_angular_endpoints_for_quant_levels() 301 mask = vfloat4(best_result.lane<0>()) > vfloat4(error_cut_high); in compute_angular_endpoints_for_quant_levels() 306 new_result = vfloat4(error_cut_low_high, i_flt, 1.0f, 0.0f); in compute_angular_endpoints_for_quant_levels() [all …]
|
D | astcenc_compress_symbolic.cpp | 93 vfloat4 endpnt0f[BLOCK_MAX_PARTITIONS]; in realign_weights_undecimated() 94 vfloat4 offset[BLOCK_MAX_PARTITIONS]; in realign_weights_undecimated() 141 vfloat4 color_offset = offset[partition]; in realign_weights_undecimated() 142 vfloat4 color_base = endpnt0f[partition]; in realign_weights_undecimated() 144 vfloat4 color = color_base + color_offset * weight_base; in realign_weights_undecimated() 145 vfloat4 orig_color = blk.texel(texel); in realign_weights_undecimated() 146 vfloat4 error_weight = blk.channel_weight; in realign_weights_undecimated() 148 vfloat4 color_diff = color - orig_color; in realign_weights_undecimated() 149 vfloat4 color_diff_down = color_diff + color_offset * weight_down; in realign_weights_undecimated() 150 vfloat4 color_diff_up = color_diff + color_offset * weight_up; in realign_weights_undecimated() [all …]
|
D | astcenc_internal.h | 271 vfloat4 avg; 274 vfloat4 dir; 743 vfloat4 origin_texel; 746 vfloat4 data_min; 749 vfloat4 data_mean; 752 vfloat4 data_max; 755 vfloat4 channel_weight; 782 inline vfloat4 texel(unsigned int index) const in texel() 784 return vfloat4(data_r[index], in texel() 797 inline vfloat4 texel3(unsigned int index) const in texel3() [all …]
|
D | astcenc_decompress_symbolic.cpp | 72 static inline vfloat4 decode_texel( in decode_texel() 200 blk.data_min = vfloat4::zero(); in decompress_symbolic_block() 201 blk.data_mean = vfloat4::zero(); in decompress_symbolic_block() 202 blk.data_max = vfloat4::zero(); in decompress_symbolic_block() 224 vfloat4 color; in decompress_symbolic_block() 249 color = vfloat4(error_color_nan()); in decompress_symbolic_block() 315 vfloat4 colorf = decode_texel(color, lns_mask); in decompress_symbolic_block() 355 vfloat4 summa = vfloat4::zero(); in compute_symbolic_block_difference_2plane() 377 vfloat4 color = int_to_float(colori); in compute_symbolic_block_difference_2plane() 378 vfloat4 oldColor = blk.texel(i); in compute_symbolic_block_difference_2plane() [all …]
|
D | astcenc_color_quantize.cpp | 107 vfloat4 color0, in quantize_rgb() 108 vfloat4 color1, in quantize_rgb() 168 vfloat4 color0, in quantize_rgba() 169 vfloat4 color1, in quantize_rgba() 197 vfloat4 color0, in try_quantize_rgb_blue_contract() 198 vfloat4 color1, in try_quantize_rgb_blue_contract() 272 vfloat4 color0, in try_quantize_rgba_blue_contract() 273 vfloat4 color1, in try_quantize_rgba_blue_contract() 303 vfloat4 color0, in try_quantize_rgb_delta() 304 vfloat4 color1, in try_quantize_rgb_delta() [all …]
|
D | astcenc_compute_variance.cpp | 49 vfloat4* d, in brent_kung_prefix_sum() 65 vfloat4 *da = d + (start * stride); in brent_kung_prefix_sum() 89 vfloat4 *da = d + (start * stride); in brent_kung_prefix_sum() 123 vfloat4* work_memory = arg.work_memory; in compute_pixel_region_variance() 138 vfloat4 *varbuf1 = work_memory; in compute_pixel_region_variance() 139 vfloat4 *varbuf2 = work_memory + sizeprod; in compute_pixel_region_variance() 187 vfloat4 d = vfloat4 (r * (1.0f / 255.0f), in compute_pixel_region_variance() 227 vfloat4 d = float16_to_float(di); in compute_pixel_region_variance() 270 vfloat4 d(r, g, b, a); in compute_pixel_region_variance() 280 vfloat4 vbz = vfloat4::zero(); in compute_pixel_region_variance()
|
D | astcenc_pick_best_endpoint_format.cpp | 86 vfloat4 ews = blk.channel_weight; in compute_error_squared_rgb_single_partition() 257 samec_rgb_lines.a = vfloat4::zero(); in compute_encoding_choice_errors() 267 samec_rgb_plines.amod = vfloat4::zero(); in compute_encoding_choice_errors() 274 luminance_plines.amod = vfloat4::zero(); in compute_encoding_choice_errors() 286 vfloat4 endpt0 = ep.endpt0[i]; in compute_encoding_choice_errors() 287 vfloat4 endpt1 = ep.endpt1[i]; in compute_encoding_choice_errors() 288 vfloat4 endpt_diff = abs(endpt1 - endpt0); in compute_encoding_choice_errors() 289 vmask4 endpt_can_offset = endpt_diff < vfloat4(0.12f * 65535.0f); in compute_encoding_choice_errors() 322 vfloat4 error_weight, in compute_color_error_for_every_integer_count_and_quant_level() 352 vfloat4 ep0 = ep.endpt0[partition_index]; in compute_color_error_for_every_integer_count_and_quant_level() [all …]
|
D | astcenc_vecmathlib_avx2_8.h | 891 vfloat4 lo(_mm256_extractf128_ps(a.m, 0)); in hadd_s() 892 vfloat4 hi(_mm256_extractf128_ps(a.m, 1)); in hadd_s() 917 ASTCENC_SIMD_INLINE void haccumulate(vfloat4& accum, vfloat8 a) in haccumulate() 919 vfloat4 lo(_mm256_extractf128_ps(a.m, 0)); in haccumulate() 922 vfloat4 hi(_mm256_extractf128_ps(a.m, 1)); in haccumulate() 941 ASTCENC_SIMD_INLINE void haccumulate(vfloat4& accum, vfloat8 a, vmask8 m) in haccumulate()
|
D | astcenccli_image.cpp | 187 vint4 colorf16 = float_to_float16(vfloat4( in astc_img_from_floatx4_array() 276 vfloat4 color = float16_to_float(colori); in floatx4_array_from_astc_img() 346 vfloat4 color = float16_to_float(colori); in unorm8x4_array_from_astc_img()
|
D | astcenc_entry.cpp | 877 blk.channel_weight = vfloat4(ctx.config.cw_r_weight, in compress_image() 970 blk.channel_weight = vfloat4(ctx.config.cw_r_weight * alpha_scale, in compress_image() 979 blk.origin_texel = vfloat4::zero(); in compress_image() 980 blk.data_min = vfloat4::zero(); in compress_image() 981 blk.data_mean = vfloat4::zero(); in compress_image() 982 blk.data_max = vfloat4::zero(); in compress_image() 1012 arg.work_memory = new vfloat4[ag.work_memory_size]; in compute_averages()
|
D | astcenccli_toplevel.cpp | 1251 static vfloat4 image_get_pixel( in image_get_pixel() 1271 return vfloat4(r, g, b, a); in image_get_pixel() 1291 return vfloat4( in image_get_pixel() 1314 vfloat4 pixel in image_set_pixel() 1375 vfloat4 pixel = image_get_pixel(input, x, y, z); in image_preprocess_normalize() 1454 vfloat4 pixel = image_get_pixel(input, x, y, z); in image_preprocess_premultiply()
|
/hardware/google/gfxstream/third-party/astc-encoder/Source/UnitTest/ |
D | test_simd.cpp | 262 TEST(vfloat4, UnalignedLoad) in TEST() argument 264 vfloat4 a(&(f32_data[1])); in TEST() 272 TEST(vfloat4, ScalarDupLoad) in TEST() argument 274 vfloat4 a(1.1f); in TEST() 282 TEST(vfloat4, ScalarLoad) in TEST() argument 284 vfloat4 a(1.1f, 2.2f, 3.3f, 4.4f); in TEST() 292 TEST(vfloat4, CopyLoad) in TEST() argument 294 vfloat4 s(1.1f, 2.2f, 3.3f, 4.4f); in TEST() 295 vfloat4 a(s.m); in TEST() 303 TEST(vfloat4, SetLane) in TEST() argument [all …]
|