'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_SignalFFT_1 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_SignalFFT_1, mlib_SignalFFT_1_S16_S16_Mod, mlib_SignalFFT_1_S16C_S16C_Mod, mlib_SignalFFT_1_S16C_S16_Mod, mlib_SignalFFT_1_S16_Mod, mlib_SignalFFT_1_S16C_Mod, mlib_SignalFFT_1_F32_F32, mlib_SignalFFT_1_F32C_F32C, mlib_SignalFFT_1_F32C_F32, mlib_SignalFFT_1_F32, mlib_SignalFFT_1_F32C, mlib_SignalFFT_1_D64_D64, mlib_SignalFFT_1_D64C_D64C, mlib_SignalFFT_1_D64C_D64, mlib_SignalFFT_1_D64, mlib_SignalFFT_1_D64C \- signal Fast Fourier Transform (FFT) .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_SignalFFT_1_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, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_S16C_S16C_Mod\fR(\fBmlib_s16 *\fR\fIdstc\fR, \fBconst mlib_s16 *\fR\fIsrcc\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_S16C_S16_Mod\fR(\fBmlib_s16 *\fR\fIdstc\fR, \fBconst mlib_s16 *\fR\fIsrcr\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_S16_Mod\fR(\fBmlib_s16 *\fR\fIsrcdstr\fR, \fBmlib_s16 *\fR\fIsrcdsti\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_S16C_Mod\fR(\fBmlib_s16 *\fR\fIsrcdstc\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_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, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_F32C_F32C\fR(\fBmlib_f32 *\fR\fIdstc\fR, \fBconst mlib_f32 *\fR\fIsrcc\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_F32C_F32\fR(\fBmlib_f32 *\fR\fIdstc\fR, \fBconst mlib_f32 *\fR\fIsrcr\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_F32\fR(\fBmlib_f32 *\fR\fIsrcdstr\fR, \fBmlib_f32 *\fR\fIsrcdsti\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_F32C\fR(\fBmlib_f32 *\fR\fIsrcdstc\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_D64_D64\fR(\fBmlib_d64 *\fR\fIdstr\fR, \fBmlib_d64 *\fR\fIdsti\fR,\fBconst mlib_d64 *\fR\fIsrcr\fR, \fBconst mlib_d64 *\fR\fIsrci\fR, \fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_D64C_D64C\fR(\fBmlib_d64 *\fR\fIdstc\fR, \fBconst mlib_d64 *\fR\fIsrcc\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_D64C_D64\fR(\fBmlib_d64 *\fR\fIdstc\fR, \fBconst mlib_d64 *\fR\fIsrcr\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_D64\fR(\fBmlib_d64 *\fR\fIsrcdstr\fR, \fBmlib_d64 *\fR\fIsrcdsti\fR,\fBmlib_s32\fR \fIorder\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_SignalFFT_1_D64C\fR(\fBmlib_d64 *\fR\fIsrcdstc\fR, \fBmlib_s32\fR \fIorder\fR); .fi .SH DESCRIPTION .sp .LP Each of the functions in this group performs Fast Fourier Transform (FFT). .sp .LP The following equation is used for forward FFT: .sp .in +2 .nf 1 N-1 dst[k] = ---- SUM {src[n] * exp(-j2*PI*n*k/N)} C1 n=0 .fi .in -2 .sp .LP and the following equation is used for inverse FFT (IFFT): .sp .in +2 .nf 1 N-1 dst[n] = ---- SUM {src[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 FFT/IFFT 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[FFT|IFFT]_ScaleMode_OutType_InType_OpMode() mlib_Signal[FFT|IFFT]_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\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 The 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_SignalFFT_2\fR(3MLIB), \fBmlib_SignalFFT_3\fR(3MLIB), \fBmlib_SignalFFT_4\fR(3MLIB), \fBmlib_SignalIFFT_1\fR(3MLIB), \fBmlib_SignalIFFT_2\fR(3MLIB), \fBmlib_SignalIFFT_3\fR(3MLIB), \fBmlib_SignalIFFT_4\fR(3MLIB), \fBattributes\fR(5)