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
3889dfde
Commit
3889dfde
authored
Apr 24, 2017
by
Anton Khirnov
Committed by
Luca Barbato
Apr 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dca: Move the downmix request check outside the loop
parent
2e1ab6a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
dcadec.c
libavcodec/dcadec.c
+7
-4
No files found.
libavcodec/dcadec.c
View file @
3889dfde
...
...
@@ -932,7 +932,7 @@ static int dca_subsubframe(DCAContext *s, int base_channel, int block_index)
return
0
;
}
static
int
dca_filter_channels
(
DCAContext
*
s
,
int
block_index
,
int
upsample
)
static
int
dca_filter_channels
(
DCAContext
*
s
,
int
block_index
,
int
upsample
,
int
downmix
)
{
int
k
;
...
...
@@ -1000,8 +1000,7 @@ static int dca_filter_channels(DCAContext *s, int block_index, int upsample)
/* FIXME: This downmixing is probably broken with upsample.
* Probably totally broken also with XLL in general. */
/* Downmixing to Stereo */
if
(
s
->
audio_header
.
prim_channels
+
!!
s
->
lfe
>
2
&&
s
->
avctx
->
request_channel_layout
==
AV_CH_LAYOUT_STEREO
)
{
if
(
downmix
)
{
dca_downmix
(
s
->
samples_chanptr
,
s
->
amode
,
!!
s
->
lfe
,
s
->
downmix_coef
,
s
->
channel_order_tab
);
}
...
...
@@ -1378,6 +1377,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
DCAContext
*
s
=
avctx
->
priv_data
;
int
channels
,
full_channels
;
int
upsample
=
0
;
int
downmix
;
s
->
exss_ext_mask
=
0
;
s
->
xch_present
=
0
;
...
...
@@ -1488,6 +1488,9 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
return
ret
;
}
downmix
=
s
->
audio_header
.
prim_channels
>
2
&&
avctx
->
request_channel_layout
==
AV_CH_LAYOUT_STEREO
;
/* filter to get final output */
for
(
i
=
0
;
i
<
(
s
->
sample_blocks
/
SAMPLES_PER_SUBBAND
);
i
++
)
{
int
ch
;
...
...
@@ -1497,7 +1500,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
for
(;
ch
<
full_channels
;
ch
++
)
s
->
samples_chanptr
[
ch
]
=
s
->
extra_channels
[
ch
-
channels
]
+
i
*
block
;
dca_filter_channels
(
s
,
i
,
upsample
);
dca_filter_channels
(
s
,
i
,
upsample
,
downmix
);
/* If this was marked as a DTS-ES stream we need to subtract back- */
/* channel from SL & SR to remove matrixed back-channel signal */
...
...
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