espressif / esp-dsp

DSP library for ESP-IDF
Apache License 2.0
465 stars 87 forks source link

Matrix subtraction does not work correctly #33

Closed chibi314 closed 2 years ago

chibi314 commented 2 years ago

Hi.

I found a serious problem on matrix subtraction. The subtraction function returns the opposite sign matrix. In other words, when you calculate A - B, the function returns B - A.

Please try this code replacing the matrix example here.

In addition, I try this code on M5Stack Fire.

How could we fix this problem?

chibi314 commented 2 years ago

Hi. Sorry to send a post again.

I just fixed this line to

        sub.s    f2, f0, f1     // f2 = f0 - f1

and it works well now.

Can I send a PR about this?

dmitry1945 commented 2 years ago

Hi @chibi314

Thank you for the fix. Yes, you can make an PR, or I can make it. It's up to you.

Thanks, Dmitry

chibi314 commented 2 years ago

@dmitry1945

Hi. I sent a PR #34 .

I'm grateful for this good library. I'm sorry to forgot to say this at first.

Thanks.