30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Description: DCTIPcomputes the Discrete Cosine Transform of a source vector<br />

in<br />

place.<br />

Include: dsp.h<br />

Prototype: extern fractional* DCTIP (<br />

int log2N,<br />

fractional* srcV,<br />

fractcomplex* cosFactors,<br />

fractcomplex* twidFactors,<br />

int factPage<br />

);<br />

Arguments: log2N based 2 logarithm of N (number of complex elements<br />

in source vector)<br />

srcCV pointer to source vector<br />

cosFactors pointer to cosine factors<br />

twidFactors pointer to twiddle factors<br />

factPage memory page for transform factors<br />

Return Value: Pointer to base address of destination vector.<br />

Remarks: N mustbe an integer power of 2.<br />

This function expects that the sourcevector has been zero padded to<br />

length 2N.<br />

The srcVvector must be allocated at a modulo alignment of N.<br />

The results of computation are stored in the first N elements of source<br />

vector.<br />

To avoid saturation (overflow) during computation, the values of the<br />

source vector shouldbe in the range [-0.5, 0.5].<br />

Only the first N/2 cosine factors are needed.<br />

Only the first N/2 twiddle factors are needed.<br />

If the transform factors are stored in X-Data space, cosFactorsand<br />

twidFactorspoint to the actual address where the factors are<br />

allocated. If the transform factors are stored in program memory,<br />

cosFactorsand twidFactorsare the offset from the program page<br />

boundary where the factors are allocated. This latter value can be<br />

calculated using the inline assembly operator psvoffset().<br />

If the transform factors are stored in X-Data space, factPagemust be<br />

set to 0xFF00 (defined value COEFFS_IN_DATA). If they are stored in<br />

program memory, factPageis the program page number containing<br />

the factors. This latter value can be calculated using the inline<br />

assembly operator psvpage().<br />

Chu kỳ (bao gồm cả cuộc gọi C-chức năng và trả các chi phí):<br />

71 + 10N, hoặc<br />

73 + 11N nếu các yếu tố trong bộ nhớ chương trình,<br />

cộng với chu kỳ từ IFFTComplexIP<br />

Lưu ý: Trong các mô tả về số IFFTComplexIPthe của chu kỳ<br />

báo cáo bao gồm 4 chu kỳ của C-chức năng gọi điện trên không. Như vậy,<br />

số chu kỳ thực tế từ IFFTComplexIPto thêm vào DCTIPis 4<br />

ít hơn bất cứ số được báo cáo cho một đứng một mình<br />

IFFTComplexIP.<br />

FFTComplex<br />

Mô tả: FFTComplexcomputes rời rạc đổi Fourier của một nguồn<br />

vector phức tạp, và lưu trữ các kết quả trong các địa điểm phức tạp<br />

vector.<br />

Bao gồm: dsp.h<br />

Prototype: fractcomplex extern * FFTComplex (<br />

int log2N,<br />

fractcomplex * dstCV,<br />

fractcomplex * srcCV,<br />

fractcomplex * twidFactors,<br />

int factPage<br />

);<br />

Đối số: log2N dựa 2 logarit của N (số yếu tố phức tạp<br />

trong vector nguồn)<br />

dstCV con trỏ đến đích vector phức tạp<br />

srcCV con trỏ đến nguồn vector phức tạp<br />

địa chỉ twidFactors cơ sở các yếu tố quay vòng<br />

trang bộ nhớ factPage cho chuyển đổi các yếu tố<br />

Quay trở lại giá trị: Con trỏ trỏ tới địa chỉ cơ sở của địa điểm vector phức tạp.<br />

DCTIP (Tiếp theo)<br />

DSP Thư viện<br />

2004 Microchip Technology Inc DS51456B trang 65<br />

Bình luận: N mustbe một sức mạnh nguyên 2.<br />

Chức năng này hoạt động trên place.A vector phức tạp, đủ để lớn<br />

nhận được kết quả của hoạt động này, mustalready đã được giao<br />

và giao cho dstCV.<br />

Các dstCVvector phải được phân bổ tại một liên kết modulo N.<br />

Các yếu tố trong nguồn vector phức tạp được dự kiến trong trật tự tự nhiên.<br />

Các yếu tố trong điểm đến vector phức tạp được tạo ra trong tự nhiên<br />

trật tự.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!