Extracts a single channel of values from an array that is interleaved. An interleaved array is any array that has a count that is a multiple of some channel count. For example, a 32 count array can have 2 channels of 16 values or 32 channels of 1 value, or 8 channels of four values. Sets the source values to every [i]th value in the destination. Using [NNNN] as the source and [SDDDSDDDSDDDSDDD] as the destination for channel 0 results in [NDDDNDDDNDDDNDDD].
int32 Deinterleave( Int16Iterator first, Int16Iterator last, int32 p_nChannelCount, int32 p_nChannelIndex, Int16Iterator dest )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Int16Iterator> | first | An iterator at the starting value for the deinterleave. |
<Int16Iterator> | last | An iterator at the ending value for the deinterleave. |
int32 | p_nChannelCount | The number of 'channels' in the data. Typically this would be something like 2, 3, or 4, but it could be more. The array count must be divisible with no remainder by this value. |
int32 | p_nChannelIndex | The index of the channel to extract. |
<Int16Iterator> | dest | An iterator at the destination. Only as much data will be deinterleaved as is available here. All iterators store information about the beginning and end of the collection to which they refer, which is why you can specify a single iterator as the destination. |
None published. Please look for an example in the Scenome Scripting Language code base.