MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ format_has_variant_storage()

MAYAFLUX_API bool MayaFlux::Kakshya::format_has_variant_storage ( ImageFormat  format)

True when a format decomposes into whole DataVariant elements.

False for DEPTH24 and DEPTH24_STENCIL8: both occupy 4 bytes per pixel in a packed layout that is not a whole number of uint8, uint16, or float elements. A container allocating storage_element_size * channels * pixels for either will not match what a bytes_per_pixel-sized write path produces.

Derived from the format tables rather than enumerated, so it stays correct if a format is added.

Parameters
formatPixel format.

Definition at line 282 of file PixelStorage.cpp.

283{
284 const uint32_t channels = Portal::Graphics::TextureLoom::get_channel_count(format);
285 return channels > 0
287 == Portal::Graphics::TextureLoom::get_bytes_per_pixel(format);
288}
bool format
uint32_t channels
size_t storage_element_size(ImageFormat format)
Byte width of the DataVariant element backing a given ImageFormat.

References channels, format, MayaFlux::Portal::Graphics::TextureLoom::get_bytes_per_pixel(), MayaFlux::Portal::Graphics::TextureLoom::get_channel_count(), and storage_element_size().

Referenced by MayaFlux::Kakshya::VideoStreamContainer::VideoStreamContainer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: