summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'media/ffvpx/libavutil/tx.c')
-rw-r--r--media/ffvpx/libavutil/tx.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/media/ffvpx/libavutil/tx.c b/media/ffvpx/libavutil/tx.c
index a1f767039b..426303d1f3 100644
--- a/media/ffvpx/libavutil/tx.c
+++ b/media/ffvpx/libavutil/tx.c
@@ -19,6 +19,7 @@
#include "avassert.h"
#include "intmath.h"
#include "cpu.h"
+#include "mem.h"
#include "qsort.h"
#include "bprint.h"
@@ -593,7 +594,8 @@ static void print_type(AVBPrint *bp, enum AVTXType type)
"unknown");
}
-static void print_cd_info(const FFTXCodelet *cd, int prio, int len, int print_prio)
+static void print_cd_info(const FFTXCodelet *cd, int prio, int len, int print_prio,
+ int log_level)
{
AVBPrint bp;
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
@@ -643,7 +645,7 @@ static void print_cd_info(const FFTXCodelet *cd, int prio, int len, int print_pr
if (print_prio)
av_bprintf(&bp, ", prio: %i", prio);
- av_log(NULL, AV_LOG_DEBUG, "%s\n", bp.str);
+ av_log(NULL, log_level, "%s\n", bp.str);
}
static void print_tx_structure(AVTXContext *s, int depth)
@@ -653,7 +655,7 @@ static void print_tx_structure(AVTXContext *s, int depth)
for (int i = 0; i <= depth; i++)
av_log(NULL, AV_LOG_DEBUG, " ");
- print_cd_info(cd, cd->prio, s->len, 0);
+ print_cd_info(cd, cd->prio, s->len, 0, AV_LOG_DEBUG);
for (int i = 0; i < s->nb_sub; i++)
print_tx_structure(&s->sub[i], depth + 1);
@@ -816,11 +818,11 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
AV_QSORT(cd_matches, nb_cd_matches, TXCodeletMatch, cmp_matches);
#if !CONFIG_SMALL
- av_log(NULL, AV_LOG_DEBUG, "%s\n", bp.str);
+ av_log(NULL, AV_LOG_TRACE, "%s\n", bp.str);
for (int i = 0; i < nb_cd_matches; i++) {
- av_log(NULL, AV_LOG_DEBUG, " %i: ", i + 1);
- print_cd_info(cd_matches[i].cd, cd_matches[i].prio, 0, 1);
+ av_log(NULL, AV_LOG_TRACE, " %i: ", i + 1);
+ print_cd_info(cd_matches[i].cd, cd_matches[i].prio, 0, 1, AV_LOG_TRACE);
}
#endif
@@ -914,10 +916,12 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type,
if (!(flags & AV_TX_INPLACE))
flags |= FF_TX_OUT_OF_PLACE;
- if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT)))
- scale = &default_scale_f;
- else if (!scale && (type == AV_TX_DOUBLE_MDCT))
+ if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_DCT) ||
+ (type == AV_TX_DOUBLE_DCT_I) || (type == AV_TX_DOUBLE_DST_I) ||
+ (type == AV_TX_DOUBLE_RDFT)))
scale = &default_scale_d;
+ else if (!scale && !TYPE_IS(FFT, type))
+ scale = &default_scale_f;
ret = ff_tx_init_subtx(&tmp, type, flags, NULL, len, inv, scale);
if (ret < 0)