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

◆ transform_delay() [1/2]

template<OperationReadyData DataType>
DataType MayaFlux::Yantra::transform_delay ( DataType &  input,
uint32_t  delay_samples,
double  fill_value,
std::vector< std::vector< double > > &  working_buffer 
)

Delay transformation that extends buffer size (OUT-OF-PLACE) - CORRECTED.

Template Parameters
DataTypeOperationReadyData type
Parameters
inputInput data - will NOT be modified
delay_samplesNumber of samples to delay (extends output size)
fill_valueValue to use for padding
working_bufferBuffer for operations (will be resized if needed)
Returns
Delayed data with extended size

Definition at line 184 of file TemporalHelper.hpp.

185{
186 auto [target_data, structure_info] = OperationHelper::setup_operation_buffer(input, working_buffer);
187
188 for (size_t i = 0; i < target_data.size(); ++i) {
189 std::vector<double> original_data(target_data[i].begin(), target_data[i].end());
190
191 working_buffer[i].resize(original_data.size() + delay_samples);
192 std::fill_n(working_buffer[i].begin(), delay_samples, fill_value);
193 std::ranges::copy(original_data, working_buffer[i].begin() + delay_samples);
194 }
195
196 return OperationHelper::reconstruct_from_double<DataType>(working_buffer, structure_info);
197}

References MayaFlux::Yantra::OperationHelper::setup_operation_buffer().

+ Here is the call graph for this function: