'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_SignalIFFTW_2 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_SignalIFFTW_2, mlib_SignalIFFTW_2_S16_S16_Mod, mlib_SignalIFFTW_2_S16C_S16C_Mod, mlib_SignalIFFTW_2_S16_S16C_Mod, mlib_SignalIFFTW_2_S16_Mod, mlib_SignalIFFTW_2_S16C_Mod, mlib_SignalIFFTW_2_F32_F32, mlib_SignalIFFTW_2_F32C_F32C, mlib_SignalIFFTW_2_F32_F32C, mlib_SignalIFFTW_2_F32, mlib_SignalIFFTW_2_F32C \- signal Inverse Fast Fourier Transform with windowing (IFFTW) .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_SignalIFFTW_2_S16_S16_Mod\fR(\fBmlib_s16 *\fR\fIdstr\fR, \fBmlib_s16 *\fR\fIdsti\fR, \fBconst mlib_s16 *\fR\fIsrcr\fR, \fBconst mlib_s16 *\fR\fIsrci\fR, \fBconst mlib_s16 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_S16C_S16C_Mod\fR(\fBmlib_s16 *\fR\fIdstc\fR, \fBconst mlib_s16 *\fR\fIsrcc\fR, \fBconst mlib_s16 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_S16_S16C_Mod\fR(\fBmlib_s16 *\fR\fIdstr\fR, \fBconst mlib_s16 *\fR\fIsrcc\fR, \fBconst mlib_s16 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_S16_Mod\fR(\fBmlib_s16 *\fR\fIsrcdstr\fR, \fBmlib_s16 *\fR\fIsrcdsti\fR, \fBconst mlib_s16 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_S16C_Mod\fR(\fBmlib_s16 *\fR\fIsrcdstc\fR, \fBconst mlib_s16 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_F32_F32\fR(\fBmlib_f32 *\fR\fIdstr\fR, \fBmlib_f32 *\fR\fIdsti\fR, \fBconst mlib_f32 *\fR\fIsrcr\fR, \fBconst mlib_f32 *\fR\fIsrci\fR, \fBconst mlib_f32 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_F32C_F32C\fR(\fBmlib_f32 *\fR\fIdstc\fR, \fBconst mlib_f32 *\fR\fIsrcc\fR, \fBconst mlib_f32 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_F32_F32C\fR(\fBmlib_f32 *\fR\fIdstr\fR, \fBconst mlib_f32 *\fR\fIsrcc\fR, \fBconst mlib_f32 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_F32\fR(\fBmlib_f32 *\fR\fIsrcdstr\fR, \fBmlib_f32 *\fR\fIsrcdsti\fR, \fBconst mlib_f32 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalIFFTW_2_F32C\fR(\fBmlib_f32 *\fR\fIsrcdstc\fR, \fBconst mlib_f32 *\fR\fIwindow\fR, \fBmlib_s32\fR \fIorder\fR); .fi .SH DESCRIPTION .sp .LP Each of the functions in this group performs Inverse Fast Fourier Transform with windowing (IFFTW). .sp .LP The FFTW functions use the following equation: .sp .in +2 .nf 1 N-1 dst[k] = ---- SUM {src[n] * window[n] * exp(-j2*PI*n*k/N)} C1 n=0 .fi .in -2 .sp .LP and the IFFTW functions use the following equation: .sp .in +2 .nf 1 N-1 dst[n] = ---- SUM {src[k] * window[k] * exp(j2*PI*n*k/N)} C2 k=0 .fi .in -2 .sp .LP where .sp .in +2 .nf k = 0, 1, ..., (N - 1) n = 0, 1, ..., (N - 1) N = 2**order .fi .in -2 .sp .LP The signal FFTW/IFFTW functions can be categorized into four groups according to the \fBScaleMode\fR in the function names in the following form: .sp .in +2 .nf mlib_Signal[FFTW|IFFTW]_ScaleMode_OutType_InType_OpMode() mlib_Signal[FFTW|IFFTW]_ScaleMode_DataType_OpMode() .fi .in -2 .sp .LP The scaling factors C1 and C2 used in the equations are defined as follows: .RS +4 .TP .ie t \(bu .el o For \fBScaleMode = 1\fR, \fBC1 = 1\fR and \fBC2 = 2**order\fR. .RE .RS +4 .TP .ie t \(bu .el o For \fBScaleMode = 2\fR, \fBC1 = 2**order\fR and \fBC2 = 1\fR. .RE .RS +4 .TP .ie t \(bu .el o For \fBScaleMode = 3\fR, \fBC1 = C2 = 2**(order/2)\fR when \fBorder\fR is even, or \fBC1 = 2**((order+1)/2)\fR and \fBC2 = 2**((order-1)/2)\fR when \fBorder\fR is odd. .RE .RS +4 .TP .ie t \(bu .el o For \fBScaleMode = 4\fR, \fBC1 = 2**P\fR and \fBC2 = 2**Q\fR, where \fBP\fR and \fBQ\fR are adaptive scaling factors and are generated by the functions. .RE .sp .LP For functions with only real parts for the source signal, the imaginary parts are assumed to be all zero. For functions with only real parts for the destination signal, the imaginary parts are discarded. The functions with only one data type in their names perform the operation in place. .SH PARAMETERS .sp .LP Each function takes some of the following arguments: .sp .ne 2 .mk .na \fB\fIdstr\fR\fR .ad .RS 11n .rt Destination signal array that contains the real parts. .RE .sp .ne 2 .mk .na \fB\fIdsti\fR\fR .ad .RS 11n .rt Destination signal array that contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIsrcr\fR\fR .ad .RS 11n .rt Source signal array that contains the real parts. .RE .sp .ne 2 .mk .na \fB\fIsrci\fR\fR .ad .RS 11n .rt Source signal array that contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIdstc\fR\fR .ad .RS 11n .rt Complex destination signal array. \fBdstc[2*i]\fR contains the real parts, and \fBdstc[2*i+1]\fR contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIsrcc\fR\fR .ad .RS 11n .rt Complex source signal array. \fBsrcc[2*i]\fR contains the real parts, and \fBsrcc[2*i+1]\fR contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIsrcdstr\fR\fR .ad .RS 11n .rt Source and destination signal array that contains the real parts. .RE .sp .ne 2 .mk .na \fB\fIsrcdsti\fR\fR .ad .RS 11n .rt Source and destination signal array that contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIsrcdstc\fR\fR .ad .RS 11n .rt Complex source and destination signal array. \fBsrcdstc[2*i]\fR contains the real parts, and \fBsrcdstc[2*i+1]\fR contains the imaginary parts. .RE .sp .ne 2 .mk .na \fB\fIwindow\fR\fR .ad .RS 11n .rt Window coefficient array with \fB2**order\fR real elements. The window coefficients are in \fBQ15\fR format for the \fBS16\fR data type, or in \fBfloat\fR format for the \fBF32\fR data type. .RE .sp .ne 2 .mk .na \fB\fIorder\fR\fR .ad .RS 11n .rt Order of the transformation. The base-2 logarithm of the number of data samples. .RE .SH RETURN VALUES .sp .LP Each function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_SignalFFTW_1\fR(3MLIB), \fBmlib_SignalFFTW_2\fR(3MLIB), \fBmlib_SignalFFTW_3\fR(3MLIB), \fBmlib_SignalFFTW_4\fR(3MLIB), \fBmlib_SignalIFFTW_1\fR(3MLIB), \fBmlib_SignalIFFTW_3\fR(3MLIB), \fBmlib_SignalIFFTW_4\fR(3MLIB), \fBattributes\fR(5)