8383 * Images can be any dimension; there is no requirement for them to be a
8484 * multiple of the ASTC block size.
8585 *
86- * Data is always passed in as 4 color channels , and accessed as an array of
86+ * Data is always passed in as 4 color components , and accessed as an array of
8787 * 2D image slices. Data within an image slice is always tightly packed without
8888 * padding. Addresing looks like this:
8989 *
9696 * =======================
9797 *
9898 * One of the most important things for coding image quality is to align the
99- * input data channel count with the ASTC color endpoint mode. This avoids
100- * wasting bits encoding channels you don't need in the endpoint colors.
99+ * input data component count with the ASTC color endpoint mode. This avoids
100+ * wasting bits encoding components you don't need in the endpoint colors.
101101 *
102- * | Input data | Encoding swizzle | Sampling swizzle |
103- * | ---------- | ---------------- | ---------------- |
104- * | 1 channel | RRR1 | .g |
105- * | 2 channels | RRRG | .ga |
106- * | 3 channels | RGB1 | .rgb |
107- * | 4 channels | RGBA | .rgba |
102+ * | Input data | Encoding swizzle | Sampling swizzle |
103+ * | ------------ | ---------------- | ---------------- |
104+ * | 1 component | RRR1 | .g |
105+ * | 2 components | RRRG | .ga |
106+ * | 3 components | RGB1 | .rgb |
107+ * | 4 components | RGBA | .rgba |
108108 *
109- * The 1 and 2 channel modes recommend sampling from "g" to recover the
109+ * The 1 and 2 component modes recommend sampling from "g" to recover the
110110 * luminance value as this provide best compatibility with ETC1. For ETC the
111- * luminance data will be stored as RGB565 where the green channel has the
112- * best quality. For ASTC any of the rgb channels can be used - the same data
111+ * luminance data will be stored as RGB565 where the green component has the
112+ * best quality. For ASTC any of the RGB components can be used - the same data
113113 * will be returned for all three.
114114 *
115115 * When using the normal map compression mode ASTC will store normals as a two
116- * channel X+Y map. Input images must contain unit-length normalized and should
117- * be passed in using the RRRG swizzle. The Z component can be programatically
118- * recovered in shader code, using knowledge that the vector is unit length.
116+ * component X+Y map. Input images must contain unit-length normalized and
117+ * should be passed in using the RRRG swizzle. The Z component can be recovered
118+ * programatically in shader code, using knowledge that the vector is unit
119+ * length.
119120 *
120121 * Decompress-only usage
121122 * =====================
@@ -183,7 +184,7 @@ enum astcenc_error {
183184 ASTCENC_ERR_BAD_PROFILE,
184185 /* * @brief The call failed due to an out-of-spec quality value. */
185186 ASTCENC_ERR_BAD_QUALITY,
186- /* * @brief The call failed due to an out-of-spec channel swizzle. */
187+ /* * @brief The call failed due to an out-of-spec component swizzle. */
187188 ASTCENC_ERR_BAD_SWIZZLE,
188189 /* * @brief The call failed due to an out-of-spec flag set. */
189190 ASTCENC_ERR_BAD_FLAGS,
@@ -227,55 +228,55 @@ static const float ASTCENC_PRE_THOROUGH = 98.0f;
227228static const float ASTCENC_PRE_EXHAUSTIVE = 100 .0f ;
228229
229230/* *
230- * @brief A codec channel swizzle selector.
231+ * @brief A codec component swizzle selector.
231232 */
232233enum astcenc_swz {
233- /* * @brief Select the red channel . */
234+ /* * @brief Select the red component . */
234235 ASTCENC_SWZ_R = 0 ,
235- /* * @brief Select the green channel . */
236+ /* * @brief Select the green component . */
236237 ASTCENC_SWZ_G = 1 ,
237- /* * @brief Select the blue channel . */
238+ /* * @brief Select the blue component . */
238239 ASTCENC_SWZ_B = 2 ,
239- /* * @brief Select the alpha channel . */
240+ /* * @brief Select the alpha component . */
240241 ASTCENC_SWZ_A = 3 ,
241- /* * @brief Use a constant zero channel . */
242+ /* * @brief Use a constant zero component . */
242243 ASTCENC_SWZ_0 = 4 ,
243- /* * @brief Use a constant one channel . */
244+ /* * @brief Use a constant one component . */
244245 ASTCENC_SWZ_1 = 5 ,
245- /* * @brief Use a reconstructed normal vector Z channel . */
246+ /* * @brief Use a reconstructed normal vector Z component . */
246247 ASTCENC_SWZ_Z = 6
247248};
248249
249250/* *
250- * @brief A texel channel swizzle.
251+ * @brief A texel component swizzle.
251252 */
252253struct astcenc_swizzle {
253- /* * @brief The red channel selector. */
254+ /* * @brief The red component selector. */
254255 astcenc_swz r;
255- /* * @brief The green channel selector. */
256+ /* * @brief The green component selector. */
256257 astcenc_swz g;
257- /* * @brief The blue channel selector. */
258+ /* * @brief The blue component selector. */
258259 astcenc_swz b;
259- /* * @brief The alpha channel selector. */
260+ /* * @brief The alpha component selector. */
260261 astcenc_swz a;
261262};
262263
263264/* *
264- * @brief A texel channel data format.
265+ * @brief A texel component data format.
265266 */
266267enum astcenc_type {
267- /* * @brief Unorm 8-bit data per channel . */
268+ /* * @brief Unorm 8-bit data per component . */
268269 ASTCENC_TYPE_U8 = 0 ,
269- /* * @brief 16-bit float per channel . */
270+ /* * @brief 16-bit float per component . */
270271 ASTCENC_TYPE_F16 = 1 ,
271- /* * @brief 32-bit float per channel . */
272+ /* * @brief 32-bit float per component . */
272273 ASTCENC_TYPE_F32 = 2
273274};
274275
275276/* *
276277 * @brief Enable normal map compression.
277278 *
278- * Input data will be treated a two channel normal map, storing X and Y, and
279+ * Input data will be treated a two component normal map, storing X and Y, and
279280 * the codec will optimize for angular error rather than simple linear PSNR.
280281 * In this mode the input swizzle should be e.g. rrrg (the default ordering for
281282 * ASTC normals on the command line) or gggr (the ordering used by BC5).
@@ -286,7 +287,7 @@ static const unsigned int ASTCENC_FLG_MAP_NORMAL = 1 << 0;
286287 * @brief Enable mask map compression.
287288 *
288289 * Input data will be treated a multi-layer mask map, where is is desirable for
289- * the color channels to be treated independently for the purposes of error
290+ * the color components to be treated independently for the purposes of error
290291 * analysis.
291292 */
292293static const unsigned int ASTCENC_FLG_MAP_MASK = 1 << 1 ;
@@ -320,7 +321,7 @@ static const unsigned int ASTCENC_FLG_MAP_RGBM = 1 << 6;
320321 * @brief Enable alpha weighting.
321322 *
322323 * The input alpha value is used for transparency, so errors in the RGB
323- * channels are weighted by the transparency level. This allows the codec to
324+ * components are weighted by the transparency level. This allows the codec to
324325 * more accurately encode the alpha value in areas where the color value
325326 * is less significant.
326327 */
@@ -374,8 +375,8 @@ static const unsigned int ASTCENC_ALL_FLAGS =
374375 * astcenccli_toplevel_help.cpp for full user documentation of the power-user
375376 * settings.
376377 *
377- * Note for any settings which are associated with a specific color channel ,
378- * the value in the config applies to the channel that exists after any
378+ * Note for any settings which are associated with a specific color component ,
379+ * the value in the config applies to the component that exists after any
379380 * compression data swizzle is applied.
380381 */
381382struct astcenc_config
@@ -398,7 +399,7 @@ struct astcenc_config
398399 /* * @brief The size of the texel kernel for error weighting (-v). */
399400 unsigned int v_rgba_radius;
400401
401- /* * @brief The mean and stdev channel mix for error weighting (-v). */
402+ /* * @brief The mean and stdev component mix for error weighting (-v). */
402403 float v_rgba_mean_stdev_mix;
403404
404405 /* * @brief The texel RGB power for error weighting (-v). */
@@ -425,16 +426,16 @@ struct astcenc_config
425426 /* * @brief The texel A stdev for error weighting (-va). */
426427 float v_a_stdev;
427428
428- /* * @brief The red channel weight scale for error weighting (-cw). */
429+ /* * @brief The red component weight scale for error weighting (-cw). */
429430 float cw_r_weight;
430431
431- /* * @brief The green channel weight scale for error weighting (-cw). */
432+ /* * @brief The green component weight scale for error weighting (-cw). */
432433 float cw_g_weight;
433434
434- /* * @brief The blue channel weight scale for error weighting (-cw). */
435+ /* * @brief The blue component weight scale for error weighting (-cw). */
435436 float cw_b_weight;
436437
437- /* * @brief The alpha channel weight scale for error weighting (-cw). */
438+ /* * @brief The alpha component weight scale for error weighting (-cw). */
438439 float cw_a_weight;
439440
440441 /* *
@@ -566,7 +567,7 @@ struct astcenc_image
566567 /* * @brief The Z dimension of the image, in texels. */
567568 unsigned int dim_z;
568569
569- /* * @brief The data type per channel . */
570+ /* * @brief The data type per component . */
570571 astcenc_type data_type;
571572
572573 /* * @brief The array of 2D slices, of length @c dim_z. */
0 commit comments