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
05541378
Unverified
Commit
05541378
authored
Oct 30, 2022
by
Lynne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dca_lbr: convert to lavu/tx
Fully converts the DCA decoder to lavu/tx.
parent
e0661fc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
configure
configure
+0
-1
dca_lbr.c
libavcodec/dca_lbr.c
+6
-4
dca_lbr.h
libavcodec/dca_lbr.h
+3
-2
No files found.
configure
View file @
05541378
...
...
@@ -2807,7 +2807,6 @@ comfortnoise_encoder_select="lpc"
cook_decoder_select
=
"audiodsp sinewin"
cri_decoder_select
=
"mjpeg_decoder"
cscd_decoder_suggest
=
"zlib"
dca_decoder_select
=
"mdct"
dca_encoder_select
=
"mdct"
dds_decoder_select
=
"texturedsp"
dirac_decoder_select
=
"dirac_parse dwt golomb videodsp mpegvideoenc"
...
...
libavcodec/dca_lbr.c
View file @
05541378
...
...
@@ -953,12 +953,14 @@ static int parse_ts2_chunk(DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2)
static
int
init_sample_rate
(
DCALbrDecoder
*
s
)
{
double
scale
=
(
-
1
.
0
/
(
1
<<
17
))
*
sqrt
(
1
<<
(
2
-
s
->
limited_range
));
float
scale_t
=
scale
;
int
i
,
br_per_ch
=
s
->
bit_rate_scaled
/
s
->
nchannels_total
;
int
ret
;
ff_mdct_end
(
&
s
->
imdct
);
av_tx_uninit
(
&
s
->
imdct
);
ret
=
ff_mdct_init
(
&
s
->
imdct
,
s
->
freq_range
+
6
,
1
,
scale
);
ret
=
av_tx_init
(
&
s
->
imdct
,
&
s
->
imdct_fn
,
AV_TX_FLOAT_MDCT
,
1
,
1
<<
(
s
->
freq_range
+
5
),
&
scale_t
,
AV_TX_FULL_IMDCT
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -1714,7 +1716,7 @@ static void transform_channel(DCALbrDecoder *s, int ch, float *output)
base_func_synth
(
s
,
ch
,
values
[
0
],
sf
);
s
->
imdct
.
imdct_calc
(
&
s
->
imdct
,
result
[
0
],
values
[
0
]
);
s
->
imdct
_fn
(
s
->
imdct
,
result
[
0
],
values
[
0
],
sizeof
(
float
)
);
// Long window and overlap-add
s
->
fdsp
->
vector_fmul_add
(
output
,
result
[
0
],
s
->
window
,
...
...
@@ -1834,5 +1836,5 @@ av_cold void ff_dca_lbr_close(DCALbrDecoder *s)
s
->
ts_size
=
0
;
av_freep
(
&
s
->
fdsp
);
ff_mdct_end
(
&
s
->
imdct
);
av_tx_uninit
(
&
s
->
imdct
);
}
libavcodec/dca_lbr.h
View file @
05541378
...
...
@@ -23,13 +23,13 @@
#include "libavutil/float_dsp.h"
#include "libavutil/mem_internal.h"
#include "libavutil/tx.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dca.h"
#include "dca_exss.h"
#include "dcadsp.h"
#include "fft.h"
#define DCA_LBR_CHANNELS 6
#define DCA_LBR_CHANNELS_TOTAL 32
...
...
@@ -119,7 +119,8 @@ typedef struct DCALbrDecoder {
DCALbrTone
tones
[
DCA_LBR_TONES
];
///< Circular buffer of tones
int
ntones
;
///< Circular buffer head position
FFTContext
imdct
;
AVTXContext
*
imdct
;
av_tx_fn
imdct_fn
;
AVFloatDSPContext
*
fdsp
;
DCADSPContext
*
dcadsp
;
}
DCALbrDecoder
;
...
...
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