MediaStorage
MediaStorage
Types
| Name | |
|---|---|
| enum class | BitDepth { Bit8, Bit32} Enumeration for bit depth types. |
| using std::vector< uint8_t > | ImageData8 Type alias for 8-bit image data. |
| using std::vector< float > | ImageData32 Type alias for 32-bit float image data (normalized to 0-255 range). |
| using std::variant< ImageData8, ImageData32 > | ImageDataVariant Variant type that can hold either 8-bit or 32-bit image data. |
Functions
| Name | |
|---|---|
| BitDepth | getBitDepthFromIndex(size_t variant_index) Helper function to get BitDepth from variant index. |
| size_t | getIndexFromBitDepth(BitDepth depth) Helper function to get variant index from BitDepth. |
| bool | is8Bit(ImageDataVariant const & data) Check if variant contains 8-bit data. |
| bool | is32Bit(ImageDataVariant const & data) Check if variant contains 32-bit data. |
| BitDepth | getBitDepth(ImageDataVariant const & data) Get the bit depth of the variant data. |
Types Documentation
enum BitDepth
| Enumerator | Value | Description |
|---|---|---|
| Bit8 | 8-bit unsigned integer data | |
| Bit32 | 32-bit float data (normalized to 0-255 range) |
Enumeration for bit depth types.
using ImageData8
using MediaStorage::ImageData8 = std::vector<uint8_t>;Type alias for 8-bit image data.
using ImageData32
using MediaStorage::ImageData32 = std::vector<float>;Type alias for 32-bit float image data (normalized to 0-255 range).
using ImageDataVariant
using MediaStorage::ImageDataVariant = std::variant<ImageData8, ImageData32>;Variant type that can hold either 8-bit or 32-bit image data.
This is the unified storage type used throughout the media processing pipeline. It eliminates the need for conversions between different variant types in MediaData and ImageProcessor classes.
Index 0: ImageData8 (std::vector
Functions Documentation
function getBitDepthFromIndex
BitDepth getBitDepthFromIndex(
size_t variant_index
)Helper function to get BitDepth from variant index.
Parameters:
- variant_index The index from std::variant::index()
Return: Corresponding BitDepth enum value
function getIndexFromBitDepth
size_t getIndexFromBitDepth(
BitDepth depth
)Helper function to get variant index from BitDepth.
Parameters:
- depth The BitDepth enum value
Return: Corresponding variant index (0 for Bit8, 1 for Bit32)
function is8Bit
inline bool is8Bit(
ImageDataVariant const & data
)Check if variant contains 8-bit data.
Parameters:
- data The ImageDataVariant to check
Return: true if contains 8-bit data, false otherwise
function is32Bit
inline bool is32Bit(
ImageDataVariant const & data
)Check if variant contains 32-bit data.
Parameters:
- data The ImageDataVariant to check
Return: true if contains 32-bit data, false otherwise
function getBitDepth
inline BitDepth getBitDepth(
ImageDataVariant const & data
)Get the bit depth of the variant data.
Parameters:
- data The ImageDataVariant to check
Return: BitDepth enum value
Updated on 2026-11-13 at 20:25:42 +0000