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

◆ get_channel_count()

uint32_t MayaFlux::Portal::Graphics::TextureLoom::get_channel_count ( ImageFormat  format)
static

Get the number of color channels for a given format.

Definition at line 1083 of file TextureLoom.cpp.

1084{
1085 switch (format) {
1086 case ImageFormat::R8:
1087 case ImageFormat::R16:
1088 case ImageFormat::R16F:
1089 case ImageFormat::R32F:
1090 return 1;
1091
1092 case ImageFormat::RG8:
1093 case ImageFormat::RG16:
1094 case ImageFormat::RG16F:
1095 case ImageFormat::RG32F:
1096 return 2;
1097
1098 case ImageFormat::RGB8:
1099 return 3;
1100
1101 case ImageFormat::RGBA8:
1102 case ImageFormat::RGBA8_SRGB:
1103 case ImageFormat::BGRA8:
1104 case ImageFormat::BGRA8_SRGB:
1105 case ImageFormat::RGBA16:
1106 case ImageFormat::RGBA16F:
1107 case ImageFormat::RGBA32F:
1108 return 4;
1109
1110 case ImageFormat::DEPTH16:
1111 case ImageFormat::DEPTH24:
1112 case ImageFormat::DEPTH32F:
1113 return 1;
1114
1115 case ImageFormat::DEPTH24_STENCIL8:
1116 return 2;
1117
1118 default:
1119 return 0;
1120 }
1121}
bool format

References format.

Referenced by download_image(), MayaFlux::Kriya::Chimera::feed(), MayaFlux::Kakshya::format_has_variant_storage(), MayaFlux::Buffers::DataReadProcessor::read_host_pixels(), and MayaFlux::Kakshya::VideoStreamContainer::setup_ring().

+ Here is the caller graph for this function: