Module: WSK::Maps
- Included in:
- Actions::Compare, Actions::DCShifter, Actions::Multiply
- Defined in:
- lib/WSK/Maps.rb
Instance Method Summary collapse
-
#apply_map_functions(iInputData, oOutputData, iFunctions) ⇒ Object
Apply map functions to an input data, writing into an output data.
Instance Method Details
#apply_map_functions(iInputData, oOutputData, iFunctions) ⇒ Object
Apply map functions to an input data, writing into an output data
- Parameters
-
iInputData (WSK::Model::InputData): The input data
-
oOutputData (Object): The output data to fill
-
iFunctions (list<map<Symbol,Object>>): The functions to apply, per channel
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/WSK/Maps.rb', line 16 def apply_map_functions(iInputData, oOutputData, iFunctions) require 'WSK/ArithmUtils/ArithmUtils' lArithmUtils = ArithmUtils::ArithmUtils.new # Create the map corresponding to the functions lMap = lArithmUtils.createMapFromFunctions(iInputData.Header.NbrBitsPerSample, iFunctions) # Apply the map iInputData.each_raw_buffer do |iInputRawBuffer, iNbrSamples, iNbrChannels| oOutputData.pushRawBuffer(lArithmUtils.applyMap(lMap, iInputRawBuffer, iInputData.Header.NbrBitsPerSample, iNbrSamples)) end end |