Deinterleave

Converts signal from interleaved to non-interleaved format.

Syntax

IppStatus ippsDeinterleave_16s(const Ipp16s* pSrc, int ch_num, int len, Ipp16s** pDst);

IppStatus ippsDeinterleave_32f(const Ipp32f* pSrc, int ch_num, int len, Ipp32f** pDst);

Parameters

pSrc

Pointer to vector [ch_num * len] of interleaved samples.

ch_num

Number of channels.

len

Number of samples in each channel.

pDst

Array of pointers to the vectors [len] to be filled with samples of particular channels.

Description

This function is declared in the ippac.h header file. The function ippsDeinterleave transforms the input signal from interleaved to non-interleaved format according to the formula

pDst[i][j] = pSrc[i + j * ch_num], 0 ≤i < ch_num, 0 ≤j < len.

See below code example  of using ippsDeinterleave_16s function.

The function ippsInterleave_16s is used in the AAC and MP3 encoders and the function ippsInterleave_32f is used in the AC3 decoder (float-point version), and AAC and MP3 encoders (float-point version) included into Intel IPP Samples. See introduction to this section.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len or ch_num is less than or equal to 0.

ippStsMisalignedBuf

Indicates misaligned data. Supply aligned data for better performance.

ippsDeinterleave_16s Usage  

IppStatus deinterleave(void) 
{
  Ipp16s i0[5];
  Ipp16s i1[5];
  Ipp16s pSrc[10] = {0,1,2,3,4,5,6,7,8,9};
  Ipp16s *pDst[2];
  IppStatus st;
  int i;
 		
  pDst[0] = i0; pDst[1] = i1;
  st = ippsDeinterleave_16s(pSrc, 2, 5, pDst);

		
  printf("\n pDst[0] = ");
  for (i = 0; i < 5; i++)
    printf("%i ", pDst[0][i]);
  printf("\n pDst[1] = ");

		
  for (i = 0; i < 5; i++)
    printf("%i ", pDst[1][i]);
  printf("\n");
  return st;
}

		
//Output:
//  pDst[0] = 0 2 4 6 8 
//  pDst[1] = 1 3 5 7 9

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.