mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
lavu/tx: support output stride in naive transforms
Allows them to be used in general PFAs.
This commit is contained in:
parent
68cabf8750
commit
fbe4fd992f
@ -880,6 +880,8 @@ static void TX_NAME(ff_tx_fft_naive)(AVTXContext *s, void *_dst, void *_src,
|
|||||||
const int n = s->len;
|
const int n = s->len;
|
||||||
double phase = s->inv ? 2.0*M_PI/n : -2.0*M_PI/n;
|
double phase = s->inv ? 2.0*M_PI/n : -2.0*M_PI/n;
|
||||||
|
|
||||||
|
stride /= sizeof(*dst);
|
||||||
|
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
TXComplex tmp = { 0 };
|
TXComplex tmp = { 0 };
|
||||||
for (int j = 0; j < n; j++) {
|
for (int j = 0; j < n; j++) {
|
||||||
@ -893,7 +895,7 @@ static void TX_NAME(ff_tx_fft_naive)(AVTXContext *s, void *_dst, void *_src,
|
|||||||
tmp.re += res.re;
|
tmp.re += res.re;
|
||||||
tmp.im += res.im;
|
tmp.im += res.im;
|
||||||
}
|
}
|
||||||
dst[i] = tmp;
|
dst[i*stride] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -904,6 +906,8 @@ static void TX_NAME(ff_tx_fft_naive_small)(AVTXContext *s, void *_dst, void *_sr
|
|||||||
TXComplex *dst = _dst;
|
TXComplex *dst = _dst;
|
||||||
const int n = s->len;
|
const int n = s->len;
|
||||||
|
|
||||||
|
stride /= sizeof(*dst);
|
||||||
|
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
TXComplex tmp = { 0 };
|
TXComplex tmp = { 0 };
|
||||||
for (int j = 0; j < n; j++) {
|
for (int j = 0; j < n; j++) {
|
||||||
@ -913,7 +917,7 @@ static void TX_NAME(ff_tx_fft_naive_small)(AVTXContext *s, void *_dst, void *_sr
|
|||||||
tmp.re += res.re;
|
tmp.re += res.re;
|
||||||
tmp.im += res.im;
|
tmp.im += res.im;
|
||||||
}
|
}
|
||||||
dst[i] = tmp;
|
dst[i*stride] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user