Lines Matching defs:image

56 /** @brief Stage bit indicating we need to load a compressed image. */
59 /** @brief Stage bit indicating we need to store a compressed image. */
62 /** @brief Stage bit indicating we need to load an uncompressed image. */
65 /** @brief Stage bit indicating we need to store an uncompressed image. */
68 /** @brief Stage bit indicating we need compress an image. */
71 /** @brief Stage bit indicating we need to decompress an image. */
74 /** @brief Stage bit indicating we need to compare an image with the original input. */
86 /** @brief Operation indicating the user wants to compress and store an image. */
92 /** @brief Operation indicating the user wants to decompress and store an image. */
98 /** @brief Operation indicating the user wants to test a compression setting on an image. */
111 /** @brief No image preprocessing. */
145 astcenc_image* image;
241 work->context, work->image, &work->swizzle,
314 * @brief Load a non-astc image file from memory.
318 * @param y_flip Should this image be Y flipped?
319 * @param[out] is_hdr Is the loaded image HDR?
320 * @param[out] component_count The number of components in the loaded image.
322 * @return The astc image file, or nullptr on error.
331 astcenc_image *image = nullptr;
333 // For a 2D image just load the image directly
336 image = load_ncimage(filename, y_flip, is_hdr, component_count);
345 // For a 3D image load an array of slices
365 // Check it is not a 3D image
396 // If all slices loaded correctly then repack them into a single image
404 image = alloc_image(bitness, dim_x, dim_y, dim_z);
406 // Combine 2D source images into one 3D image
409 if (image->data_type == ASTCENC_TYPE_U8)
411 uint8_t* data8 = static_cast<uint8_t*>(image->data[z]);
416 else if (image->data_type == ASTCENC_TYPE_F16)
418 uint16_t* data16 = static_cast<uint16_t*>(image->data[z]);
423 else // if (image->data_type == ASTCENC_TYPE_F32)
425 assert(image->data_type == ASTCENC_TYPE_F32);
426 float* data32 = static_cast<float*>(image->data[z]);
440 return image;
491 * @param comp_image Compressed image if a decompress operation.
510 // For decode the block size is set by the incoming image.
619 print_error("ERROR: Only a single image preprocess can be used\n");
628 print_error("ERROR: Only a single image preprocess can be used\n");
1136 // Option: Encode a 3D image from a sequence of 2D images.
1154 // Read array size (image depth).
1286 * @brief Get the value of a single pixel in an image.
1292 * @param[in] img The output image.
1349 * @brief Set the value of a single pixel in an image.
1351 * @param[out] img The output image; must use F32 texture components.
1379 * @brief Set the value of a single pixel in an image.
1381 * @param[out] img The output image; must use F32 texture components.
1410 * @param[in] input The input image.
1411 * @param[out] output The output image, must use F32 components.
1487 * @param[in] input The input image.
1488 * @param[out] output The output image, must use F32 components.
1532 * @brief Populate a single diagnostic image showing aspects of the encoding.
1535 * @param image The compressed image to analyze.
1536 * @param diag_image The output visualization image to populate.
1541 const astc_compressed_image& image,
1545 size_t block_cols = (image.dim_x + image.block_x - 1) / image.block_x;
1546 size_t block_rows = (image.dim_y + image.block_y - 1) / image.block_y;
1548 uint8_t* data = image.data;
1557 size_t start_row = block_y * image.block_y;
1558 size_t start_col = block_x * image.block_x;
1560 size_t end_row = astc::min(start_row + image.block_y, static_cast<size_t>(image.dim_y));
1561 size_t end_col = astc::min(start_col + image.block_x, static_cast<size_t>(image.dim_x));
1579 * @param image The compressed image to analyze.
1584 const astc_compressed_image& image,
1587 if (image.dim_z != 1)
1600 auto diag_image = alloc_image(8, image.dim_x, image.dim_y, image.dim_z);
1623 print_diagnostic_image(context, image, *diag_image, partition_func);
1649 print_diagnostic_image(context, image, *diag_image, texel_func1);
1670 print_diagnostic_image(context, image, *diag_image, texel_func2);
1688 print_diagnostic_image(context, image, *diag_image, texel_func3);
1706 print_diagnostic_image(context, image, *diag_image, texel_func4);
1727 print_diagnostic_image(context, image, *diag_image, texel_func5);
1780 print_diagnostic_image(context, image, *diag_image, texel_func6);
1841 print_diagnostic_image(context, image, *diag_image, texel_func7);
1883 print_diagnostic_image(context, image, *diag_image, texel_func8);
2137 print_error("ERROR: Failed to load uncompressed image file\n");
2144 // Allocate a float image so we can avoid additional quantization,
2152 print_error("ERROR: Failed to allocate preprocessed image\n");
2174 printf("Source image\n");
2206 // Compress an image
2222 work.image = image_uncomp_in;
2260 work.context, work.image, &work.swizzle,
2307 // Decompress an image
2370 // Store compressed image
2378 print_error("ERROR: Failed to store compressed image\n");
2388 print_error("ERROR: Failed to store compressed image\n");
2402 // Store decompressed image
2411 print_error("ERROR: Failed to write output image %s\n", output_filename.c_str());