mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 20:37:04 +00:00
lavu/tx: disable debugging information when CONFIG_SMALL
This commit is contained in:
parent
3bbe9c5e38
commit
eac4c3574b
@ -292,6 +292,7 @@ static const FFTXCodelet * const ff_tx_null_list[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if !CONFIG_SMALL
|
||||||
static void print_flags(AVBPrint *bp, uint64_t f)
|
static void print_flags(AVBPrint *bp, uint64_t f)
|
||||||
{
|
{
|
||||||
int prev = 0;
|
int prev = 0;
|
||||||
@ -371,6 +372,20 @@ static void print_cd_info(const FFTXCodelet *cd, int prio, int print_prio)
|
|||||||
av_log(NULL, AV_LOG_VERBOSE, "%s\n", bp.str);
|
av_log(NULL, AV_LOG_VERBOSE, "%s\n", bp.str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void print_tx_structure(AVTXContext *s, int depth)
|
||||||
|
{
|
||||||
|
const FFTXCodelet *cd = s->cd_self;
|
||||||
|
|
||||||
|
for (int i = 0; i <= depth; i++)
|
||||||
|
av_log(NULL, AV_LOG_VERBOSE, " ");
|
||||||
|
|
||||||
|
print_cd_info(cd, cd->prio, 0);
|
||||||
|
|
||||||
|
for (int i = 0; i < s->nb_sub; i++)
|
||||||
|
print_tx_structure(&s->sub[i], depth + 1);
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_SMALL */
|
||||||
|
|
||||||
typedef struct TXCodeletMatch {
|
typedef struct TXCodeletMatch {
|
||||||
const FFTXCodelet *cd;
|
const FFTXCodelet *cd;
|
||||||
int prio;
|
int prio;
|
||||||
@ -431,7 +446,9 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
|
|||||||
TXCodeletMatch *cd_tmp, *cd_matches = NULL;
|
TXCodeletMatch *cd_tmp, *cd_matches = NULL;
|
||||||
unsigned int cd_matches_size = 0;
|
unsigned int cd_matches_size = 0;
|
||||||
int nb_cd_matches = 0;
|
int nb_cd_matches = 0;
|
||||||
|
#if !CONFIG_SMALL
|
||||||
AVBPrint bp = { 0 };
|
AVBPrint bp = { 0 };
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Array of all compiled codelet lists. Order is irrelevant. */
|
/* Array of all compiled codelet lists. Order is irrelevant. */
|
||||||
const FFTXCodelet * const * const codelet_list[] = {
|
const FFTXCodelet * const * const codelet_list[] = {
|
||||||
@ -543,6 +560,7 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !CONFIG_SMALL
|
||||||
/* Print debugging info */
|
/* Print debugging info */
|
||||||
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||||
av_bprintf(&bp, "For transform of length %i, %s, ", len,
|
av_bprintf(&bp, "For transform of length %i, %s, ", len,
|
||||||
@ -552,6 +570,7 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
|
|||||||
print_flags(&bp, flags);
|
print_flags(&bp, flags);
|
||||||
av_bprintf(&bp, ", found %i matches%s", nb_cd_matches,
|
av_bprintf(&bp, ", found %i matches%s", nb_cd_matches,
|
||||||
nb_cd_matches ? ":" : ".");
|
nb_cd_matches ? ":" : ".");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* No matches found */
|
/* No matches found */
|
||||||
if (!nb_cd_matches)
|
if (!nb_cd_matches)
|
||||||
@ -560,12 +579,14 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
|
|||||||
/* Sort the list */
|
/* Sort the list */
|
||||||
AV_QSORT(cd_matches, nb_cd_matches, TXCodeletMatch, cmp_matches);
|
AV_QSORT(cd_matches, nb_cd_matches, TXCodeletMatch, cmp_matches);
|
||||||
|
|
||||||
|
#if !CONFIG_SMALL
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "%s\n", bp.str);
|
av_log(NULL, AV_LOG_VERBOSE, "%s\n", bp.str);
|
||||||
|
|
||||||
for (int i = 0; i < nb_cd_matches; i++) {
|
for (int i = 0; i < nb_cd_matches; i++) {
|
||||||
av_log(NULL, AV_LOG_VERBOSE, " %i: ", i + 1);
|
av_log(NULL, AV_LOG_VERBOSE, " %i: ", i + 1);
|
||||||
print_cd_info(cd_matches[i].cd, cd_matches[i].prio, 1);
|
print_cd_info(cd_matches[i].cd, cd_matches[i].prio, 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!s->sub) {
|
if (!s->sub) {
|
||||||
s->sub = sub = av_mallocz(TX_MAX_SUB*sizeof(*sub));
|
s->sub = sub = av_mallocz(TX_MAX_SUB*sizeof(*sub));
|
||||||
@ -614,19 +635,6 @@ end:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_tx_structure(AVTXContext *s, int depth)
|
|
||||||
{
|
|
||||||
const FFTXCodelet *cd = s->cd_self;
|
|
||||||
|
|
||||||
for (int i = 0; i <= depth; i++)
|
|
||||||
av_log(NULL, AV_LOG_VERBOSE, " ");
|
|
||||||
|
|
||||||
print_cd_info(cd, cd->prio, 0);
|
|
||||||
|
|
||||||
for (int i = 0; i < s->nb_sub; i++)
|
|
||||||
print_tx_structure(&s->sub[i], depth + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type,
|
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type,
|
||||||
int inv, int len, const void *scale, uint64_t flags)
|
int inv, int len, const void *scale, uint64_t flags)
|
||||||
{
|
{
|
||||||
@ -655,8 +663,10 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type,
|
|||||||
*ctx = &tmp.sub[0];
|
*ctx = &tmp.sub[0];
|
||||||
*tx = tmp.fn[0];
|
*tx = tmp.fn[0];
|
||||||
|
|
||||||
|
#if !CONFIG_SMALL
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Transform tree:\n");
|
av_log(NULL, AV_LOG_VERBOSE, "Transform tree:\n");
|
||||||
print_tx_structure(*ctx, 0);
|
print_tx_structure(*ctx, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
#ifdef TX_FLOAT
|
#ifdef TX_FLOAT
|
||||||
#define TX_TAB(x) x ## _float
|
#define TX_TAB(x) x ## _float
|
||||||
#define TX_NAME(x) x ## _float_c
|
#define TX_NAME(x) x ## _float_c
|
||||||
#define TX_NAME_STR(x) x "_float_c"
|
#define TX_NAME_STR(x) NULL_IF_CONFIG_SMALL(x "_float_c")
|
||||||
#define TX_TYPE(x) AV_TX_FLOAT_ ## x
|
#define TX_TYPE(x) AV_TX_FLOAT_ ## x
|
||||||
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _float_ ## suffix
|
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _float_ ## suffix
|
||||||
#define TX_FN_NAME_STR(fn, suffix) #fn "_float_" #suffix
|
#define TX_FN_NAME_STR(fn, suffix) NULL_IF_CONFIG_SMALL(#fn "_float_" #suffix)
|
||||||
#define MULT(x, m) ((x) * (m))
|
#define MULT(x, m) ((x) * (m))
|
||||||
#define SCALE_TYPE float
|
#define SCALE_TYPE float
|
||||||
typedef float TXSample;
|
typedef float TXSample;
|
||||||
@ -38,10 +38,10 @@ typedef AVComplexFloat TXComplex;
|
|||||||
#elif defined(TX_DOUBLE)
|
#elif defined(TX_DOUBLE)
|
||||||
#define TX_TAB(x) x ## _double
|
#define TX_TAB(x) x ## _double
|
||||||
#define TX_NAME(x) x ## _double_c
|
#define TX_NAME(x) x ## _double_c
|
||||||
#define TX_NAME_STR(x) x "_double_c"
|
#define TX_NAME_STR(x) NULL_IF_CONFIG_SMALL(x "_double_c")
|
||||||
#define TX_TYPE(x) AV_TX_DOUBLE_ ## x
|
#define TX_TYPE(x) AV_TX_DOUBLE_ ## x
|
||||||
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _double_ ## suffix
|
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _double_ ## suffix
|
||||||
#define TX_FN_NAME_STR(fn, suffix) #fn "_double_" #suffix
|
#define TX_FN_NAME_STR(fn, suffix) NULL_IF_CONFIG_SMALL(#fn "_double_" #suffix)
|
||||||
#define MULT(x, m) ((x) * (m))
|
#define MULT(x, m) ((x) * (m))
|
||||||
#define SCALE_TYPE double
|
#define SCALE_TYPE double
|
||||||
typedef double TXSample;
|
typedef double TXSample;
|
||||||
@ -49,10 +49,10 @@ typedef AVComplexDouble TXComplex;
|
|||||||
#elif defined(TX_INT32)
|
#elif defined(TX_INT32)
|
||||||
#define TX_TAB(x) x ## _int32
|
#define TX_TAB(x) x ## _int32
|
||||||
#define TX_NAME(x) x ## _int32_c
|
#define TX_NAME(x) x ## _int32_c
|
||||||
#define TX_NAME_STR(x) x "_int32_c"
|
#define TX_NAME_STR(x) NULL_IF_CONFIG_SMALL(x "_int32_c")
|
||||||
#define TX_TYPE(x) AV_TX_INT32_ ## x
|
#define TX_TYPE(x) AV_TX_INT32_ ## x
|
||||||
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _int32_ ## suffix
|
#define TX_FN_NAME(fn, suffix) ff_tx_ ## fn ## _int32_ ## suffix
|
||||||
#define TX_FN_NAME_STR(fn, suffix) #fn "_int32_" #suffix
|
#define TX_FN_NAME_STR(fn, suffix) NULL_IF_CONFIG_SMALL(#fn "_int32_" #suffix)
|
||||||
#define MULT(x, m) (((((int64_t)(x)) * (int64_t)(m)) + 0x40000000) >> 31)
|
#define MULT(x, m) (((((int64_t)(x)) * (int64_t)(m)) + 0x40000000) >> 31)
|
||||||
#define SCALE_TYPE float
|
#define SCALE_TYPE float
|
||||||
typedef int32_t TXSample;
|
typedef int32_t TXSample;
|
||||||
|
Loading…
Reference in New Issue
Block a user