|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::span< const float > MayaFlux::Kakshya::as_normalised_float | ( | const DataVariant & | variant, |
| std::vector< float > & | storage | ||
| ) |
Extract a DataVariant holding pixel data as a normalised float span.
Normalisation factors: uint8_t -> divided by 255.0f uint16_t -> divided by 65535.0f float -> zero-copy span directly into the variant's storage
Does not mutate the variant. Writes into storage only when conversion is required. Returns an empty span if the active alternative is not one of the three pixel types (double, complex, and GLM variants return empty).
| variant | Source DataVariant. |
| storage | Caller-supplied buffer. Reuse across calls to avoid per-frame allocation. Untouched when float is active. |
storage for uint8/uint16, directly into the variant's internal storage for float. Definition at line 61 of file DataUtils.cpp.
Referenced by MayaFlux::Yantra::VisionAnalyzer< InputType, OutputType >::analyze_implementation(), MayaFlux::Buffers::download_and_normalise(), MayaFlux::Kakshya::WindowContainer::processed_frame_as_float(), and MayaFlux::Kakshya::VideoStreamContainer::processed_frame_as_float().
Here is the caller graph for this function: