Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
eac4c357
Unverified
Commit
eac4c357
authored
Feb 07, 2022
by
Lynne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/tx: disable debugging information when CONFIG_SMALL
parent
3bbe9c5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
tx.c
libavutil/tx.c
+23
-13
tx_priv.h
libavutil/tx_priv.h
+6
-6
No files found.
libavutil/tx.c
View file @
eac4c357
...
...
@@ -292,6 +292,7 @@ static const FFTXCodelet * const ff_tx_null_list[] = {
NULL
,
};
#if !CONFIG_SMALL
static
void
print_flags
(
AVBPrint
*
bp
,
uint64_t
f
)
{
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
);
}
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
{
const
FFTXCodelet
*
cd
;
int
prio
;
...
...
@@ -431,7 +446,9 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
TXCodeletMatch
*
cd_tmp
,
*
cd_matches
=
NULL
;
unsigned
int
cd_matches_size
=
0
;
int
nb_cd_matches
=
0
;
#if !CONFIG_SMALL
AVBPrint
bp
=
{
0
};
#endif
/* Array of all compiled codelet lists. Order is irrelevant. */
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 */
av_bprint_init
(
&
bp
,
0
,
AV_BPRINT_SIZE_AUTOMATIC
);
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
);
av_bprintf
(
&
bp
,
", found %i matches%s"
,
nb_cd_matches
,
nb_cd_matches
?
":"
:
"."
);
#endif
/* No matches found */
if
(
!
nb_cd_matches
)
...
...
@@ -560,12 +579,14 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
/* Sort the list */
AV_QSORT
(
cd_matches
,
nb_cd_matches
,
TXCodeletMatch
,
cmp_matches
);
#if !CONFIG_SMALL
av_log
(
NULL
,
AV_LOG_VERBOSE
,
"%s
\n
"
,
bp
.
str
);
for
(
int
i
=
0
;
i
<
nb_cd_matches
;
i
++
)
{
av_log
(
NULL
,
AV_LOG_VERBOSE
,
" %i: "
,
i
+
1
);
print_cd_info
(
cd_matches
[
i
].
cd
,
cd_matches
[
i
].
prio
,
1
);
}
#endif
if
(
!
s
->
sub
)
{
s
->
sub
=
sub
=
av_mallocz
(
TX_MAX_SUB
*
sizeof
(
*
sub
));
...
...
@@ -614,19 +635,6 @@ end:
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
,
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
];
*
tx
=
tmp
.
fn
[
0
];
#if !CONFIG_SMALL
av_log
(
NULL
,
AV_LOG_VERBOSE
,
"Transform tree:
\n
"
);
print_tx_structure
(
*
ctx
,
0
);
#endif
return
ret
;
}
libavutil/tx_priv.h
View file @
eac4c357
...
...
@@ -27,10 +27,10 @@
#ifdef TX_FLOAT
#define TX_TAB(x) x ## _float
#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_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 SCALE_TYPE float
typedef
float
TXSample
;
...
...
@@ -38,10 +38,10 @@ typedef AVComplexFloat TXComplex;
#elif defined(TX_DOUBLE)
#define TX_TAB(x) x ## _double
#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_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 SCALE_TYPE double
typedef
double
TXSample
;
...
...
@@ -49,10 +49,10 @@ typedef AVComplexDouble TXComplex;
#elif defined(TX_INT32)
#define TX_TAB(x) x ## _int32
#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_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 SCALE_TYPE float
typedef
int32_t
TXSample
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment