[FFmpeg-cvslog] lavu/tx: require output argument to match input for inplace transforms

Lynne git at videolan.org
Fri Feb 26 06:42:36 EET 2021


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Feb 26 05:40:07 2021 +0100| [10341743d2a91602321e2ece8c4dd88cd8073f8d] | committer: Lynne

lavu/tx: require output argument to match input for inplace transforms

This simplifies some assembly code by a lot, by either saving a branch
or saving an entire duplicated function.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=10341743d2a91602321e2ece8c4dd88cd8073f8d
---

 libavutil/tx.h          | 4 ++--
 libavutil/tx_template.c | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavutil/tx.h b/libavutil/tx.h
index 983b5e9307..bfc0c7f2a3 100644
--- a/libavutil/tx.h
+++ b/libavutil/tx.h
@@ -103,8 +103,8 @@ typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride);
  */
 enum AVTXFlags {
     /**
-     * Performs an in-place transformation on the input. The output parameter
-     * to av_tn_fn() will be ignored. May be unsupported or slower for some
+     * Performs an in-place transformation on the input. The output argument
+     * of av_tn_fn() MUST match the input. May be unsupported or slower for some
      * transform types.
      */
     AV_TX_INPLACE = 1ULL << 0,
diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c
index f43173e920..711013c352 100644
--- a/libavutil/tx_template.c
+++ b/libavutil/tx_template.c
@@ -397,7 +397,6 @@ static void monolithic_fft(AVTXContext *s, void *_out, void *_in,
         FFTComplex tmp;
         int src, dst, *inplace_idx = s->inplace_idx;
 
-        out = in;
         src = *inplace_idx++;
 
         do {



More information about the ffmpeg-cvslog mailing list