740{
744 std::ranges::fill(output, uint8_t { 0 });
745 return;
746 }
747
750 std::ranges::fill(
output, uint8_t { 0 });
751 return;
752 }
753
755 const uint64_t frames_to_copy = std::min(num_frames,
h - start_frame);
756 const uint64_t elems_to_copy = std::min(frames_to_copy * row_elems,
static_cast<uint64_t
>(
output.size()));
757 const uint64_t src_offset = start_frame * row_elems;
758
759 std::copy_n(
pixels->begin() +
static_cast<std::ptrdiff_t
>(src_offset),
760 static_cast<std::ptrdiff_t>(elems_to_copy),
762
763 if (elems_to_copy <
output.size())
764 std::fill(
output.begin() +
static_cast<std::ptrdiff_t
>(elems_to_copy),
output.end(), uint8_t { 0 });
765 });
766}
const std::vector< float > * pixels
std::shared_ptr< Core::VKImage > output
Memory::Seqlock m_data_lock
std::vector< DataVariant > m_processed_data
ContainerDataStructure m_structure
bool seqlock_read_void(const Seqlock &lock, uint32_t max_attempts, Fn &&fn)
Invoke a void read functor under a Seqlock with a bounded retry count.
static uint64_t get_height(const std::vector< DataDimension > &dimensions)
Extract height from image/video dimensions.
static uint64_t get_channel_count(const std::vector< DataDimension > &dimensions)
Extract channel count from dimensions.
static uint64_t get_width(const std::vector< DataDimension > &dimensions)
Extract width from image/video dimensions.