Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFT数据结构体是否有误? #138

Open
1 task
TheOnlyoe opened this issue Feb 7, 2023 · 0 comments
Open
1 task

FFT数据结构体是否有误? #138

TheOnlyoe opened this issue Feb 7, 2023 · 0 comments

Comments

@TheOnlyoe
Copy link

TheOnlyoe commented Feb 7, 2023

  • BUG REPORT

BUG REPORT

FFT数据结构体实部与虚部顺序不对应

根据寄存器手册,SDK中的数据模式为64bit,虚实交替(RIRI),但是fft.h中的结构题定义顺序确是(IRIR),在虽然不影响FFT对结果影响不大,因为大多数应用中会对结果求绝对值,但是如果进行IFFT,则无法恢复成原始数据。

typedef struct _complex_hard
{
    int16_t real;
    int16_t imag;
} complex_hard_t;

typedef struct _fft_data
{
    int16_t I1;
    int16_t R1;
    int16_t I2;
    int16_t R2;
} fft_data_t;```


### Actual behavior
在交换fft_data_t结构体中虚实顺序为RIRI后可以正常IFFT可以正常恢复到原始数据
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant