|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API size_t MayaFlux::Kakshya::storage_element_size | ( | ImageFormat | format | ) |
Byte width of the DataVariant element backing a given ImageFormat.
Returns 1 for uint8 storage, 2 for uint16, 4 for float. Defaults to 1 for any format without an explicit mapping.
Size determines the alternative unambiguously only because DataVariant's pixel alternatives are uint8, uint16, and float: 4 means float, not uint32. Half-float formats return 2, since the uint16 bits are the IEEE-754 binary16 encoding rather than a UNORM value; consumers needing the decoded magnitude must check is_float_format().
| format | Pixel format. |
Definition at line 66 of file PixelStorage.cpp.
References BGRA8, BGRA8_SRGB, DEPTH16, DEPTH24, DEPTH24_STENCIL8, DEPTH32F, format, R16, R16F, R32F, R8, RG16, RG16F, RG32F, RG8, RGB8, RGBA16, RGBA16F, RGBA32F, RGBA8, and RGBA8_SRGB.
Referenced by blend_frames(), format_has_variant_storage(), MayaFlux::Kakshya::VideoStreamContainer::get_frame_typed(), MayaFlux::Kakshya::VideoStreamContainer::get_frames_impl(), MayaFlux::Kakshya::VideoStreamContainer::get_region_data(), MayaFlux::Kakshya::VideoStreamContainer::get_value_impl(), make_empty_storage(), MayaFlux::Kakshya::VideoStreamContainer::set_value_impl(), MayaFlux::Kakshya::TextureContainer::value_element_type(), and MayaFlux::Kakshya::VideoStreamContainer::value_element_type().
Here is the caller graph for this function: