MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / validate_profile

Function validate_profile

Source/astcenc_entry.cpp:236–251  ·  view source on GitHub ↗

* @brief Validate config profile. * * @param profile The profile to check. * * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure. */

Source from the content-addressed store, hash-verified

234 * @return Return @c ASTCENC_SUCCESS if validated, otherwise an error on failure.
235 */
236static astcenc_error validate_profile(
237 astcenc_profile profile
238) {
239 // Values in this enum are from an external user, so not guaranteed to be
240 // bounded to the enum values
241 switch (static_cast<int>(profile))
242 {
243 case ASTCENC_PRF_LDR_SRGB:
244 case ASTCENC_PRF_LDR:
245 case ASTCENC_PRF_HDR_RGB_LDR_A:
246 case ASTCENC_PRF_HDR:
247 return ASTCENC_SUCCESS;
248 default:
249 return ASTCENC_ERR_BAD_PROFILE;
250 }
251}
252
253/**
254 * @brief Validate block size.

Callers 1

validate_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected