MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / operator()

Method operator()

Source/astcenccli_image.cpp:81–112  ·  view source on GitHub ↗

See header for documentation. */

Source from the content-addressed store, hash-verified

79
80/* See header for documentation. */
81void astcenc_image_deleter::operator()(
82 astcenc_image* img
83) const {
84 if (img == nullptr)
85 {
86 return;
87 }
88
89 if (img->data)
90 {
91 for (unsigned int z = 0; z < img->dim_z; z++)
92 {
93 if (img->data_type == ASTCENC_TYPE_U8)
94 {
95 delete[] static_cast<uint8_t*>(img->data[z]);
96 }
97 else if (img->data_type == ASTCENC_TYPE_F16)
98 {
99 delete[] static_cast<uint16_t*>(img->data[z]);
100 }
101 else
102 {
103 assert(img->data_type == ASTCENC_TYPE_F32);
104 delete[] static_cast<float*>(img->data[z]);
105 }
106 }
107
108 delete[] img->data;
109 }
110
111 delete img;
112}
113
114/* See header for documentation. */
115unsigned int determine_image_components(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected