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

Function get_ise_sequence_bitcount

Source/astcenc_integer_sequence.cpp:419–433  ·  view source on GitHub ↗

See header for documentation. */

Source from the content-addressed store, hash-verified

417
418/* See header for documentation. */
419unsigned int get_ise_sequence_bitcount(
420 unsigned int character_count,
421 quant_method quant_level
422) {
423 // Cope with out-of bounds values - input might be invalid
424 if (static_cast<size_t>(quant_level) >= ise_sizes.size())
425 {
426 // Arbitrary large number that's more than an ASTC block can hold
427 return 1024;
428 }
429
430 auto& entry = ise_sizes[quant_level];
431 unsigned int divisor = (entry.divisor << 1) + 1;
432 return (entry.scale * character_count + divisor - 1) / divisor;
433}
434
435/**
436 * @brief Write up to 8 bits at an arbitrary bit offset.

Callers 6

symbolic_to_physicalFunction · 0.85
physical_to_symbolicFunction · 0.85
decode_block_mode_2dFunction · 0.85
decode_block_mode_3dFunction · 0.85
construct_dt_entry_2dFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected