Split config print from other operations
@@ -1079,9 +1079,20 @@ static int edit_astcenc_config(
}
#endif
- if (operation & ASTCENC_STAGE_COMPRESS)
- {
- // print all encoding settings unless specifically told otherwise.
+ return 0;
+}
+
+/**
+ * @brief Print the config settings in a human readable form.
+ *
+ * @param[in] cli_config Command line config.
+ * @param[in] config Codec configuration.
+ */
+static void print_astcenc_config(
+ const cli_config_options& cli_config,
+ const astcenc_config& config
+) {
+ // Print all encoding settings unless specifically told otherwise
if (!cli_config.silentmode)
{
printf("Compressor settings\n");
@@ -1148,9 +1159,6 @@ static int edit_astcenc_config(
}
}
- return 0;
-}
-
/**
* @brief Get the value of a single pixel in an image.
*
@@ -1588,6 +1596,8 @@ int main(
// Compress an image
if (operation & ASTCENC_STAGE_COMPRESS)
{
+ print_astcenc_config(cli_config, config);
+
unsigned int blocks_x = (image_uncomp_in->dim_x + config.block_x - 1) / config.block_x;
unsigned int blocks_y = (image_uncomp_in->dim_y + config.block_y - 1) / config.block_y;
unsigned int blocks_z = (image_uncomp_in->dim_z + config.block_z - 1) / config.block_z;
