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
1183d6cd
Commit
1183d6cd
authored
Sep 25, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp3on4: set channel layout
parent
fff0f831
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
mpegaudiodec.c
libavcodec/mpegaudiodec.c
+12
-0
No files found.
libavcodec/mpegaudiodec.c
View file @
1183d6cd
...
@@ -1913,6 +1913,17 @@ static const uint8_t chan_offset[8][5] = {
...
@@ -1913,6 +1913,17 @@ static const uint8_t chan_offset[8][5] = {
{
2
,
0
,
6
,
4
,
3
},
// C FLR BLRS BLR LFE
{
2
,
0
,
6
,
4
,
3
},
// C FLR BLRS BLR LFE
};
};
/* mp3on4 channel layouts */
static
const
int16_t
chan_layout
[
8
]
=
{
0
,
AV_CH_LAYOUT_MONO
,
AV_CH_LAYOUT_STEREO
,
AV_CH_LAYOUT_SURROUND
,
AV_CH_LAYOUT_4POINT0
,
AV_CH_LAYOUT_5POINT0
,
AV_CH_LAYOUT_5POINT1
,
AV_CH_LAYOUT_7POINT1
};
static
av_cold
int
decode_close_mp3on4
(
AVCodecContext
*
avctx
)
static
av_cold
int
decode_close_mp3on4
(
AVCodecContext
*
avctx
)
{
{
...
@@ -1947,6 +1958,7 @@ static int decode_init_mp3on4(AVCodecContext * avctx)
...
@@ -1947,6 +1958,7 @@ static int decode_init_mp3on4(AVCodecContext * avctx)
s
->
frames
=
mp3Frames
[
cfg
.
chan_config
];
s
->
frames
=
mp3Frames
[
cfg
.
chan_config
];
s
->
coff
=
chan_offset
[
cfg
.
chan_config
];
s
->
coff
=
chan_offset
[
cfg
.
chan_config
];
avctx
->
channels
=
ff_mpeg4audio_channels
[
cfg
.
chan_config
];
avctx
->
channels
=
ff_mpeg4audio_channels
[
cfg
.
chan_config
];
avctx
->
channel_layout
=
chan_layout
[
cfg
.
chan_config
];
if
(
cfg
.
sample_rate
<
16000
)
if
(
cfg
.
sample_rate
<
16000
)
s
->
syncword
=
0xffe00000
;
s
->
syncword
=
0xffe00000
;
...
...
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