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
80712886
Commit
80712886
authored
Jan 23, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlpdec: move ch_assign setup code down to after ch layout is set.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6747b0be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
mlpdec.c
libavcodec/mlpdec.c
+14
-13
No files found.
libavcodec/mlpdec.c
View file @
80712886
...
...
@@ -519,19 +519,6 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s
->
ch_assign
[
ch_assign
]
=
ch
;
}
if
(
m
->
avctx
->
codec_id
==
AV_CODEC_ID_MLP
&&
m
->
needs_reordering
)
{
if
(
m
->
avctx
->
channel_layout
==
(
AV_CH_LAYOUT_QUAD
|
AV_CH_LOW_FREQUENCY
)
||
m
->
avctx
->
channel_layout
==
AV_CH_LAYOUT_5POINT0_BACK
)
{
int
i
=
s
->
ch_assign
[
4
];
s
->
ch_assign
[
4
]
=
s
->
ch_assign
[
3
];
s
->
ch_assign
[
3
]
=
s
->
ch_assign
[
2
];
s
->
ch_assign
[
2
]
=
i
;
}
else
if
(
m
->
avctx
->
channel_layout
==
AV_CH_LAYOUT_5POINT1_BACK
)
{
FFSWAP
(
int
,
s
->
ch_assign
[
2
],
s
->
ch_assign
[
4
]);
FFSWAP
(
int
,
s
->
ch_assign
[
3
],
s
->
ch_assign
[
5
]);
}
}
checksum
=
ff_mlp_restart_checksum
(
buf
,
get_bits_count
(
gbp
)
-
start_count
);
if
(
checksum
!=
get_bits
(
gbp
,
8
))
...
...
@@ -563,6 +550,20 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
if
(
substr
==
m
->
max_decoded_substream
)
{
m
->
avctx
->
channels
=
s
->
max_matrix_channel
+
1
;
m
->
avctx
->
channel_layout
=
s
->
ch_layout
;
if
(
m
->
avctx
->
codec_id
==
AV_CODEC_ID_MLP
&&
m
->
needs_reordering
)
{
if
(
m
->
avctx
->
channel_layout
==
(
AV_CH_LAYOUT_QUAD
|
AV_CH_LOW_FREQUENCY
)
||
m
->
avctx
->
channel_layout
==
AV_CH_LAYOUT_5POINT0_BACK
)
{
int
i
=
s
->
ch_assign
[
4
];
s
->
ch_assign
[
4
]
=
s
->
ch_assign
[
3
];
s
->
ch_assign
[
3
]
=
s
->
ch_assign
[
2
];
s
->
ch_assign
[
2
]
=
i
;
}
else
if
(
m
->
avctx
->
channel_layout
==
AV_CH_LAYOUT_5POINT1_BACK
)
{
FFSWAP
(
int
,
s
->
ch_assign
[
2
],
s
->
ch_assign
[
4
]);
FFSWAP
(
int
,
s
->
ch_assign
[
3
],
s
->
ch_assign
[
5
]);
}
}
}
return
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