Skip to content

Commit a01f3bd

Browse files
committed
Rename imageblock to image_block
1 parent dddd206 commit a01f3bd

9 files changed

Lines changed: 56 additions & 57 deletions

Source/astcenc_averages_and_directions.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/* See header for documentation. */
2828
void compute_avgs_and_dirs_4_comp(
2929
const partition_info& pi,
30-
const imageblock& blk,
30+
const image_block& blk,
3131
const error_weight_block& ewb,
3232
partition_metrics pm[BLOCK_MAX_PARTITIONS]
3333
) {
@@ -136,7 +136,7 @@ void compute_avgs_and_dirs_4_comp(
136136
/* See header for documentation. */
137137
void compute_avgs_and_dirs_3_comp(
138138
const partition_info& pi,
139-
const imageblock& blk,
139+
const image_block& blk,
140140
const error_weight_block& ewb,
141141
unsigned int omitted_component,
142142
partition_metrics pm[BLOCK_MAX_PARTITIONS]
@@ -286,7 +286,7 @@ void compute_avgs_and_dirs_3_comp(
286286
/* See header for documentation. */
287287
void compute_avgs_and_dirs_2_comp(
288288
const partition_info& pt,
289-
const imageblock& blk,
289+
const image_block& blk,
290290
const error_weight_block& ewb,
291291
unsigned int component1,
292292
unsigned int component2,
@@ -407,7 +407,7 @@ void compute_avgs_and_dirs_2_comp(
407407
/* See header for documentation. */
408408
void compute_error_squared_rgba(
409409
const partition_info& pi,
410-
const imageblock& blk,
410+
const image_block& blk,
411411
const error_weight_block& ewb,
412412
const processed_line4 uncor_plines[BLOCK_MAX_PARTITIONS],
413413
const processed_line4 samec_plines[BLOCK_MAX_PARTITIONS],
@@ -565,7 +565,7 @@ void compute_error_squared_rgba(
565565
/* See header for documentation. */
566566
void compute_error_squared_rgb(
567567
const partition_info& pi,
568-
const imageblock& blk,
568+
const image_block& blk,
569569
const error_weight_block& ewb,
570570
partition_lines3 plines[BLOCK_MAX_PARTITIONS],
571571
float& uncor_error,

Source/astcenc_compress_symbolic.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void merge_endpoints(
7070
static bool realign_weights(
7171
astcenc_profile decode_mode,
7272
const block_size_descriptor& bsd,
73-
const imageblock& blk,
73+
const image_block& blk,
7474
const error_weight_block& ewb,
7575
symbolic_compressed_block& scb,
7676
uint8_t* weight_set8_plane1,
@@ -232,7 +232,7 @@ static bool realign_weights(
232232
static float compress_symbolic_block_for_partition_1plane(
233233
const astcenc_config& config,
234234
const block_size_descriptor& bsd,
235-
const imageblock& blk,
235+
const image_block& blk,
236236
const error_weight_block& ewb,
237237
bool only_always,
238238
float tune_errorval_threshold,
@@ -585,7 +585,7 @@ static float compress_symbolic_block_for_partition_1plane(
585585
static float compress_symbolic_block_for_partition_2planes(
586586
const astcenc_config& config,
587587
const block_size_descriptor& bsd,
588-
const imageblock& blk,
588+
const image_block& blk,
589589
const error_weight_block& ewb,
590590
float tune_errorval_threshold,
591591
unsigned int partition_count,
@@ -1025,7 +1025,7 @@ static float prepare_error_weight_block(
10251025
const astcenc_context& ctx,
10261026
const astcenc_image& image,
10271027
const block_size_descriptor& bsd,
1028-
const imageblock& blk,
1028+
const image_block& blk,
10291029
error_weight_block& ewb
10301030
) {
10311031
unsigned int idx = 0;
@@ -1226,7 +1226,7 @@ static float prepare_error_weight_block(
12261226
*/
12271227
static float prepare_block_statistics(
12281228
int texels_per_block,
1229-
const imageblock& blk,
1229+
const image_block& blk,
12301230
const error_weight_block& ewb
12311231
) {
12321232
// Compute covariance matrix, as a collection of 10 scalars that form the upper-triangular row
@@ -1360,7 +1360,7 @@ enum trial_modes {
13601360
void compress_block(
13611361
const astcenc_context& ctx,
13621362
const astcenc_image& input_image,
1363-
const imageblock& blk,
1363+
const image_block& blk,
13641364
physical_compressed_block& pcb,
13651365
compression_working_buffers& tmpbuf)
13661366
{

Source/astcenc_decompress_symbolic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void decompress_symbolic_block(
180180
int ypos,
181181
int zpos,
182182
const symbolic_compressed_block& scb,
183-
imageblock& blk
183+
image_block& blk
184184
) {
185185
blk.xpos = xpos;
186186
blk.ypos = ypos;
@@ -323,7 +323,7 @@ float compute_symbolic_block_difference(
323323
const astcenc_config& config,
324324
const block_size_descriptor& bsd,
325325
const symbolic_compressed_block& scb,
326-
const imageblock& blk,
326+
const image_block& blk,
327327
const error_weight_block& ewb
328328
) {
329329
// If we detected an error-block, blow up immediately.

Source/astcenc_entry.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ static void compress_image(
846846
) {
847847
const block_size_descriptor *bsd = ctx.bsd;
848848
astcenc_profile decode_mode = ctx.config.profile;
849-
imageblock blk;
849+
image_block blk;
850850

851851
int block_x = bsd->xdim;
852852
int block_y = bsd->ydim;
@@ -927,7 +927,7 @@ static void compress_image(
927927
// Fetch the full block for compression
928928
if (use_full_block)
929929
{
930-
fetch_imageblock(decode_mode, image, blk, *bsd, x * block_x, y * block_y, z * block_z, swizzle);
930+
fetch_image_block(decode_mode, image, blk, *bsd, x * block_x, y * block_y, z * block_z, swizzle);
931931
}
932932
// Apply alpha scale RDO - substitute constant color block
933933
else
@@ -1121,7 +1121,7 @@ astcenc_error astcenc_decompress_image(
11211121
return ASTCENC_ERR_OUT_OF_MEM;
11221122
}
11231123

1124-
imageblock blk;
1124+
image_block blk;
11251125

11261126
// If context thread count is one then implicitly reset
11271127
if (ctx->thread_count == 1)
@@ -1161,7 +1161,7 @@ astcenc_error astcenc_decompress_image(
11611161
x * block_x, y * block_y, z * block_z,
11621162
scb, blk);
11631163

1164-
write_imageblock(image_out, blk, *ctx->bsd,
1164+
write_image_block(image_out, blk, *ctx->bsd,
11651165
x * block_x, y * block_y, z * block_z, *swizzle);
11661166
}
11671167

Source/astcenc_find_best_partitioning.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* @param[out] cluster_centers The initital partition cluster center colors.
5858
*/
5959
static void kmeans_init(
60-
const imageblock& blk,
60+
const image_block& blk,
6161
unsigned int texel_count,
6262
unsigned int partition_count,
6363
vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS]
@@ -143,7 +143,7 @@ static void kmeans_init(
143143
* @param[out] partition_of_texel The partition assigned for each texel.
144144
*/
145145
static void kmeans_assign(
146-
const imageblock& blk,
146+
const image_block& blk,
147147
unsigned int texel_count,
148148
unsigned int partition_count,
149149
const vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS],
@@ -207,7 +207,7 @@ static void kmeans_assign(
207207
* @param partition_of_texel The partition assigned for each texel.
208208
*/
209209
static void kmeans_update(
210-
const imageblock& blk,
210+
const image_block& blk,
211211
unsigned int texel_count,
212212
unsigned int partition_count,
213213
vfloat4 cluster_centers[BLOCK_MAX_PARTITIONS],
@@ -429,7 +429,7 @@ static void get_partition_ordering_by_mismatch_bits(
429429
*/
430430
static void compute_kmeans_partition_ordering(
431431
const block_size_descriptor& bsd,
432-
const imageblock& blk,
432+
const image_block& blk,
433433
unsigned int partition_count,
434434
unsigned int partition_ordering[BLOCK_MAX_PARTITIONINGS]
435435
) {
@@ -472,7 +472,7 @@ static void compute_kmeans_partition_ordering(
472472
/* See header for documentation. */
473473
void find_best_partition_candidates(
474474
const block_size_descriptor& bsd,
475-
const imageblock& blk,
475+
const image_block& blk,
476476
const error_weight_block& ewb,
477477
unsigned int partition_count,
478478
unsigned int partition_search_limit,

Source/astcenc_ideal_endpoints_and_weights.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
static void compute_ideal_colors_and_weights_1_comp(
4040
const block_size_descriptor& bsd,
41-
const imageblock& blk,
41+
const image_block& blk,
4242
const error_weight_block& ewb,
4343
const partition_info& pi,
4444
endpoints_and_weights& ei,
@@ -155,7 +155,7 @@ static void compute_ideal_colors_and_weights_1_comp(
155155
*/
156156
static void compute_ideal_colors_and_weights_2_comp(
157157
const block_size_descriptor& bsd,
158-
const imageblock& blk,
158+
const image_block& blk,
159159
const error_weight_block& ewb,
160160
const partition_info& pi,
161161
endpoints_and_weights& ei,
@@ -312,7 +312,7 @@ static void compute_ideal_colors_and_weights_2_comp(
312312
*/
313313
static void compute_ideal_colors_and_weights_3_comp(
314314
const block_size_descriptor& bsd,
315-
const imageblock& blk,
315+
const image_block& blk,
316316
const error_weight_block& ewb,
317317
const partition_info& pi,
318318
endpoints_and_weights& ei,
@@ -487,7 +487,7 @@ static void compute_ideal_colors_and_weights_3_comp(
487487
*/
488488
static void compute_ideal_colors_and_weights_4_comp(
489489
const block_size_descriptor& bsd,
490-
const imageblock& blk,
490+
const image_block& blk,
491491
const error_weight_block& ewb,
492492
const partition_info& pi,
493493
endpoints_and_weights& ei
@@ -599,7 +599,7 @@ static void compute_ideal_colors_and_weights_4_comp(
599599
/* See header for documentation. */
600600
void compute_ideal_colors_and_weights_1plane(
601601
const block_size_descriptor& bsd,
602-
const imageblock& blk,
602+
const image_block& blk,
603603
const error_weight_block& ewb,
604604
const partition_info& pi,
605605
endpoints_and_weights& ei
@@ -617,7 +617,7 @@ void compute_ideal_colors_and_weights_1plane(
617617
/* See header for documentation. */
618618
void compute_ideal_colors_and_weights_2planes(
619619
const block_size_descriptor& bsd,
620-
const imageblock& blk,
620+
const image_block& blk,
621621
const error_weight_block& ewb,
622622
const partition_info& pi,
623623
unsigned int plane2_component,
@@ -1045,7 +1045,7 @@ static inline vfloat4 compute_rgbo_vector(
10451045

10461046
/* See header for documentation. */
10471047
void recompute_ideal_colors_1plane(
1048-
const imageblock& blk,
1048+
const image_block& blk,
10491049
const error_weight_block& ewb,
10501050
const partition_info& pi,
10511051
const decimation_info& di,
@@ -1248,7 +1248,7 @@ void recompute_ideal_colors_1plane(
12481248

12491249
/* See header for documentation. */
12501250
void recompute_ideal_colors_2planes(
1251-
const imageblock& blk,
1251+
const image_block& blk,
12521252
const error_weight_block& ewb,
12531253
const partition_info& pi,
12541254
const decimation_info& di,

Source/astcenc_image.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ static vfloat4 encode_texel_lns(
148148
}
149149

150150
/* See header for documentation. */
151-
void fetch_imageblock(
151+
void fetch_image_block(
152152
astcenc_profile decode_mode,
153153
const astcenc_image& img,
154-
imageblock& blk,
154+
image_block& blk,
155155
const block_size_descriptor& bsd,
156156
unsigned int xpos,
157157
unsigned int ypos,
@@ -264,9 +264,9 @@ void fetch_imageblock(
264264
}
265265

266266
/* See header for documentation. */
267-
void write_imageblock(
267+
void write_image_block(
268268
astcenc_image& img,
269-
const imageblock& blk,
269+
const image_block& blk,
270270
const block_size_descriptor& bsd,
271271
unsigned int xpos,
272272
unsigned int ypos,

0 commit comments

Comments
 (0)