[FFmpeg-cvslog] lavu/tx: zero-out imaginary of last coefficient in forward RDFTs
Lynne
git at videolan.org
Sat Dec 3 22:03:29 EET 2022
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sat Dec 3 20:16:19 2022 +0100| [710d83bdde6d598c88e9696bc4b9f6ea4b84f541] | committer: Lynne
lavu/tx: zero-out imaginary of last coefficient in forward RDFTs
We didn't do this, because it's zero anyway, but it prevents users from using
uninitialized memory in calculations.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=710d83bdde6d598c88e9696bc4b9f6ea4b84f541
---
libavutil/tx_template.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c
index 56e4f6b04d..ac3dc22a2c 100644
--- a/libavutil/tx_template.c
+++ b/libavutil/tx_template.c
@@ -1688,7 +1688,7 @@ static void TX_NAME(ff_tx_rdft_ ##name)(AVTXContext *s, void *_dst, \
} else { \
/* Move [0].im to the last position, as convention requires */ \
data[len2].re = data[0].im; \
- data[ 0].im = 0; \
+ data[ 0].im = data[len2].im = 0; \
} \
}
More information about the ffmpeg-cvslog
mailing list