From bafb404153641a84224d88598659d554cfdf9543 Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Fri, 2 Aug 2019 16:58:27 +0100
Subject: [PATCH] lavu/tx: don't compile double precision transforms on
CONFIG_SMALL
They'll likely only be used in not so small filters, so for embedded users
it makes sense to not compile them in.
---
libavutil/Makefile | 5 +++--
libavutil/tx.c | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
@@ -161,8 +161,9 @@ OBJS = adler32.o \
xtea.o \
tea.o \
tx.o \
- tx_float.o \
- tx_double.o
+ tx_float.o
+
+OBJS-$(!CONFIG_SMALL) += tx_double.o
OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o
OBJS-$(CONFIG_D3D11VA) += hwcontext_d3d11va.o
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#include "tx_priv.h"
/* Calculates the modular multiplicative inverse, not fast, replace */
@@ -123,11 +124,13 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type,
if ((err = ff_tx_init_mdct_fft_float(s, tx, type, inv, len, scale, flags)))
goto fail;
break;
+#if !CONFIG_SMALL
case AV_TX_DOUBLE_FFT:
case AV_TX_DOUBLE_MDCT:
if ((err = ff_tx_init_mdct_fft_double(s, tx, type, inv, len, scale, flags)))
goto fail;
break;
+#endif
default:
err = AVERROR(EINVAL);
goto fail;
--
2.23.0.rc0