@@ -41,16 +41,16 @@ static vfloat bilinear_infill_vla(
41
41
unsigned int index
42
42
) {
43
43
// Load the bilinear filter texel weight indexes in the decimated grid
44
- vint weight_idx0 = vint ( di.texel_weights_tr [0 ] + index ) ;
45
- vint weight_idx1 = vint ( di.texel_weights_tr [1 ] + index ) ;
46
- vint weight_idx2 = vint ( di.texel_weights_tr [2 ] + index ) ;
47
- vint weight_idx3 = vint ( di.texel_weights_tr [3 ] + index ) ;
44
+ const uint8_t * weight_idx0 = di.texel_weights_tr [0 ] + index ;
45
+ const uint8_t * weight_idx1 = di.texel_weights_tr [1 ] + index ;
46
+ const uint8_t * weight_idx2 = di.texel_weights_tr [2 ] + index ;
47
+ const uint8_t * weight_idx3 = di.texel_weights_tr [3 ] + index ;
48
48
49
49
// Load the bilinear filter weights from the decimated grid
50
- vfloat weight_val0 = gatherf (weights, weight_idx0);
51
- vfloat weight_val1 = gatherf (weights, weight_idx1);
52
- vfloat weight_val2 = gatherf (weights, weight_idx2);
53
- vfloat weight_val3 = gatherf (weights, weight_idx3);
50
+ vfloat weight_val0 = gatherf_byte_inds<vfloat> (weights, weight_idx0);
51
+ vfloat weight_val1 = gatherf_byte_inds<vfloat> (weights, weight_idx1);
52
+ vfloat weight_val2 = gatherf_byte_inds<vfloat> (weights, weight_idx2);
53
+ vfloat weight_val3 = gatherf_byte_inds<vfloat> (weights, weight_idx3);
54
54
55
55
// Load the weight contribution factors for each decimated weight
56
56
vfloat tex_weight_float0 = loada (di.texel_weight_contribs_float_tr [0 ] + index );
@@ -81,12 +81,12 @@ static vfloat bilinear_infill_vla_2(
81
81
unsigned int index
82
82
) {
83
83
// Load the bilinear filter texel weight indexes in the decimated grid
84
- vint weight_idx0 = vint ( di.texel_weights_tr [0 ] + index ) ;
85
- vint weight_idx1 = vint ( di.texel_weights_tr [1 ] + index ) ;
84
+ const uint8_t * weight_idx0 = di.texel_weights_tr [0 ] + index ;
85
+ const uint8_t * weight_idx1 = di.texel_weights_tr [1 ] + index ;
86
86
87
87
// Load the bilinear filter weights from the decimated grid
88
- vfloat weight_val0 = gatherf (weights, weight_idx0);
89
- vfloat weight_val1 = gatherf (weights, weight_idx1);
88
+ vfloat weight_val0 = gatherf_byte_inds<vfloat> (weights, weight_idx0);
89
+ vfloat weight_val1 = gatherf_byte_inds<vfloat> (weights, weight_idx1);
90
90
91
91
// Load the weight contribution factors for each decimated weight
92
92
vfloat tex_weight_float0 = loada (di.texel_weight_contribs_float_tr [0 ] + index );
@@ -894,18 +894,18 @@ void compute_ideal_weights_for_decimation(
894
894
895
895
for (unsigned int j = 0 ; j < max_texel_count; j++)
896
896
{
897
- vint texel ( di.weight_texels_tr [j] + i) ;
897
+ const uint8_t * texel = di.weight_texels_tr [j] + i;
898
898
vfloat weight = loada (di.weights_texel_contribs_tr [j] + i);
899
899
900
900
if (!constant_wes)
901
901
{
902
- weight_error_scale = gatherf (ei.weight_error_scale , texel);
902
+ weight_error_scale = gatherf_byte_inds<vfloat> (ei.weight_error_scale , texel);
903
903
}
904
904
905
905
vfloat contrib_weight = weight * weight_error_scale;
906
906
907
907
weight_weight += contrib_weight;
908
- initial_weight += gatherf (ei.weights , texel) * contrib_weight;
908
+ initial_weight += gatherf_byte_inds<vfloat> (ei.weights , texel) * contrib_weight;
909
909
}
910
910
911
911
storea (initial_weight / weight_weight, dec_weight_ideal_value + i);
@@ -952,17 +952,17 @@ void compute_ideal_weights_for_decimation(
952
952
953
953
for (unsigned int j = 0 ; j < max_texel_count; j++)
954
954
{
955
- vint texel ( di.weight_texels_tr [j] + i) ;
955
+ const uint8_t * texel = di.weight_texels_tr [j] + i;
956
956
vfloat contrib_weight = loada (di.weights_texel_contribs_tr [j] + i);
957
957
958
958
if (!constant_wes)
959
959
{
960
- weight_error_scale = gatherf (ei.weight_error_scale , texel);
960
+ weight_error_scale = gatherf_byte_inds<vfloat> (ei.weight_error_scale , texel);
961
961
}
962
962
963
963
vfloat scale = weight_error_scale * contrib_weight;
964
- vfloat old_weight = gatherf (infilled_weights, texel);
965
- vfloat ideal_weight = gatherf (ei.weights , texel);
964
+ vfloat old_weight = gatherf_byte_inds<vfloat> (infilled_weights, texel);
965
+ vfloat ideal_weight = gatherf_byte_inds<vfloat> (ei.weights , texel);
966
966
967
967
error_change0 += contrib_weight * scale;
968
968
error_change1 += (old_weight - ideal_weight) * scale;
0 commit comments