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
280a789f
Commit
280a789f
authored
Apr 19, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make MLP/TrueHD channel layout functions visible to the decoder.
parent
a3040715
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
mlp_parser.c
libavcodec/mlp_parser.c
+5
-5
mlp_parser.h
libavcodec/mlp_parser.h
+3
-0
No files found.
libavcodec/mlp_parser.c
View file @
280a789f
...
...
@@ -43,7 +43,7 @@ static const uint8_t mlp_channels[32] = {
5
,
6
,
5
,
5
,
6
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
};
static
const
uint64_t
mlp_layout
[
32
]
=
{
const
uint64_t
ff_
mlp_layout
[
32
]
=
{
AV_CH_LAYOUT_MONO
,
AV_CH_LAYOUT_STEREO
,
AV_CH_LAYOUT_2_1
,
...
...
@@ -107,7 +107,7 @@ static int truehd_channels(int chanmap)
return
channels
;
}
static
int64_t
truehd_layout
(
int
chanmap
)
int64_t
ff_
truehd_layout
(
int
chanmap
)
{
int
layout
=
0
,
i
;
...
...
@@ -316,15 +316,15 @@ static int mlp_parse(AVCodecParserContext *s,
if
(
mh
.
stream_type
==
0xbb
)
{
/* MLP stream */
avctx
->
channels
=
mlp_channels
[
mh
.
channels_mlp
];
avctx
->
channel_layout
=
mlp_layout
[
mh
.
channels_mlp
];
avctx
->
channel_layout
=
ff_
mlp_layout
[
mh
.
channels_mlp
];
}
else
{
/* mh.stream_type == 0xba */
/* TrueHD stream */
if
(
mh
.
channels_thd_stream2
)
{
avctx
->
channels
=
truehd_channels
(
mh
.
channels_thd_stream2
);
avctx
->
channel_layout
=
truehd_layout
(
mh
.
channels_thd_stream2
);
avctx
->
channel_layout
=
ff_
truehd_layout
(
mh
.
channels_thd_stream2
);
}
else
{
avctx
->
channels
=
truehd_channels
(
mh
.
channels_thd_stream1
);
avctx
->
channel_layout
=
truehd_layout
(
mh
.
channels_thd_stream1
);
avctx
->
channel_layout
=
ff_
truehd_layout
(
mh
.
channels_thd_stream1
);
}
if
(
av_get_channel_layout_nb_channels
(
avctx
->
channel_layout
)
!=
avctx
->
channels
)
{
avctx
->
channel_layout
=
0
;
...
...
libavcodec/mlp_parser.h
View file @
280a789f
...
...
@@ -54,6 +54,9 @@ typedef struct MLPHeaderInfo
int
ff_mlp_read_major_sync
(
void
*
log
,
MLPHeaderInfo
*
mh
,
GetBitContext
*
gb
);
int64_t
ff_truehd_layout
(
int
chanmap
);
extern
const
uint64_t
ff_mlp_layout
[
32
];
#endif
/* AVCODEC_MLP_PARSER_H */
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