Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a46a4f72
Commit
a46a4f72
authored
Mar 14, 2017
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dca: Refactor dca_filter_channels() a little
Signed-off-by:
Luca Barbato
<
lu_zero@gentoo.org
>
parent
e245d4f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
dcadec.c
libavcodec/dcadec.c
+6
-4
No files found.
libavcodec/dcadec.c
View file @
a46a4f72
...
...
@@ -947,15 +947,16 @@ static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
/* 64 subbands QMF */
for
(
k
=
0
;
k
<
s
->
audio_header
.
prim_channels
;
k
++
)
{
int
channel
=
s
->
channel_order_tab
[
k
];
int32_t
(
*
subband_samples
)[
SAMPLES_PER_SUBBAND
]
=
s
->
dca_chan
[
k
].
subband_samples
[
block_index
];
s
->
fmt_conv
.
int32_to_float
(
samples
[
0
],
subband_samples
[
0
],
DCA_SUBBANDS_X96K
*
SAMPLES_PER_SUBBAND
);
if
(
s
->
channel_order_tab
[
k
]
>=
0
)
if
(
channel
>=
0
)
qmf_64_subbands
(
s
,
k
,
samples
,
s
->
samples_chanptr
[
s
->
channel_order_tab
[
k
]
],
s
->
samples_chanptr
[
channel
],
/* Upsampling needs a factor 2 here. */
M_SQRT2
/
32768
.
0
);
}
...
...
@@ -964,15 +965,16 @@ static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
LOCAL_ALIGNED
(
32
,
float
,
samples
,
[
DCA_SUBBANDS
],
[
SAMPLES_PER_SUBBAND
]);
for
(
k
=
0
;
k
<
s
->
audio_header
.
prim_channels
;
k
++
)
{
int
channel
=
s
->
channel_order_tab
[
k
];
int32_t
(
*
subband_samples
)[
SAMPLES_PER_SUBBAND
]
=
s
->
dca_chan
[
k
].
subband_samples
[
block_index
];
s
->
fmt_conv
.
int32_to_float
(
samples
[
0
],
subband_samples
[
0
],
DCA_SUBBANDS
*
SAMPLES_PER_SUBBAND
);
if
(
s
->
channel_order_tab
[
k
]
>=
0
)
if
(
channel
>=
0
)
qmf_32_subbands
(
s
,
k
,
samples
,
s
->
samples_chanptr
[
s
->
channel_order_tab
[
k
]
],
s
->
samples_chanptr
[
channel
],
M_SQRT1_2
/
32768
.
0
);
}
}
...
...
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