]> git.sesse.net Git - ffmpeg/commitdiff
lavu/tx: require output argument to match input for inplace transforms
authorLynne <dev@lynne.ee>
Fri, 26 Feb 2021 04:40:07 +0000 (05:40 +0100)
committerLynne <dev@lynne.ee>
Fri, 26 Feb 2021 04:42:24 +0000 (05:42 +0100)
This simplifies some assembly code by a lot, by either saving a branch
or saving an entire duplicated function.

libavutil/tx.h
libavutil/tx_template.c

index 983b5e9307c2ea4cb03245cebbcdfa6109f31a0d..bfc0c7f2a3c76255cff01e8337fd884e64414e33 100644 (file)
@@ -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,
index f43173e920ed479e6c4415858dfb01b07dac3328..711013c35239d57c9a785cd59c60cbe9680bbf35 100644 (file)
@@ -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 {