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

◆ get_bytes_per_pixel()

size_t MayaFlux::Portal::Graphics::TextureLoom::get_bytes_per_pixel ( ImageFormat  format)
static

Get bytes per pixel for a format.

Definition at line 934 of file TextureLoom.cpp.

935{
936 switch (format) {
937 case ImageFormat::R8:
938 return 1;
939 case ImageFormat::RG8:
940 return 2;
941 case ImageFormat::RGB8:
942 return 3;
943 case ImageFormat::RGBA8:
944 case ImageFormat::RGBA8_SRGB:
945 case ImageFormat::BGRA8:
946 case ImageFormat::BGRA8_SRGB:
947 return 4;
948 case ImageFormat::R16:
949 return 2;
950 case ImageFormat::RG16:
951 return 4;
952 case ImageFormat::RGBA16:
953 return 8;
954 case ImageFormat::R16F:
955 return 2;
956 case ImageFormat::RG16F:
957 return 4;
958 case ImageFormat::RGBA16F:
959 return 8;
960 case ImageFormat::R32F:
961 return 4;
962 case ImageFormat::RG32F:
963 return 8;
964 case ImageFormat::RGBA32F:
965 return 16;
966 case ImageFormat::DEPTH16:
967 return 2;
968 case ImageFormat::DEPTH24:
969 case ImageFormat::DEPTH32F:
970 case ImageFormat::DEPTH24_STENCIL8:
971 default:
972 return 4;
973 }
974}
bool format

References format.

Referenced by calculate_image_size(), MayaFlux::Buffers::VideoStreamReader::extract_frame_data(), MayaFlux::Kakshya::format_has_variant_storage(), MayaFlux::Kakshya::VideoStreamContainer::setup_ring(), and MayaFlux::Buffers::TextureBuffer::TextureBuffer().

+ Here is the caller graph for this function: