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
f1ecd080
Commit
f1ecd080
authored
Feb 03, 2012
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacdec: Support native channel layout when requested.
parent
37bed6ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
aacdec.c
libavcodec/aacdec.c
+9
-5
aacdectab.h
libavcodec/aacdectab.h
+5
-5
No files found.
libavcodec/aacdec.c
View file @
f1ecd080
...
...
@@ -416,11 +416,13 @@ static av_cold int output_configure(AACContext *ac,
}
if
(
channel_config
)
{
if
(
avctx
->
request_channel_layout
!=
AV_CH_LAYOUT_NATIVE
)
sniff_channel_order
(
layout_map
,
tags
);
for
(
i
=
0
;
i
<
tags_per_config
[
channel_config
];
i
++
)
{
int
type
=
aac_channel_layout_map
[
channel_config
-
1
]
[
i
][
0
];
int
id
=
aac_channel_layout_map
[
channel_config
-
1
]
[
i
][
1
];
int
posit
on
=
aac_channel_layout_map
[
channel_config
-
1
]
[
i
][
2
];
if
((
ret
=
che_configure
(
ac
,
positon
,
int
type
=
layout_map
[
i
][
0
];
int
id
=
layout_map
[
i
][
1
];
int
posit
ion
=
layout_map
[
i
][
2
];
if
((
ret
=
che_configure
(
ac
,
posit
i
on
,
type
,
id
,
&
channels
)))
return
ret
;
...
...
@@ -437,7 +439,9 @@ static av_cold int output_configure(AACContext *ac,
* channels in the order the PCE declared them.
*/
uint64_t
layout
=
sniff_channel_order
(
layout_map
,
tags
);
uint64_t
layout
=
0
;
if
(
avctx
->
request_channel_layout
!=
AV_CH_LAYOUT_NATIVE
)
layout
=
sniff_channel_order
(
layout_map
,
tags
);
for
(
i
=
0
;
i
<
tags
;
i
++
)
{
int
type
=
layout_map
[
i
][
0
];
int
id
=
layout_map
[
i
][
1
];
...
...
libavcodec/aacdectab.h
View file @
f1ecd080
...
...
@@ -83,11 +83,11 @@ static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 0,
static
const
uint8_t
aac_channel_layout_map
[
7
][
5
][
3
]
=
{
{
{
TYPE_SCE
,
0
,
AAC_CHANNEL_FRONT
},
},
{
{
TYPE_CPE
,
0
,
AAC_CHANNEL_FRONT
},
},
{
{
TYPE_
CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SC
E
,
0
,
AAC_CHANNEL_FRONT
},
},
{
{
TYPE_
CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SC
E
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SCE
,
1
,
AAC_CHANNEL_BACK
},
},
{
{
TYPE_
CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SC
E
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
1
,
AAC_CHANNEL_BACK
},
},
{
{
TYPE_
CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_LFE
,
0
,
AAC_CHANNEL_LFE
},
{
TYPE_CPE
,
1
,
AAC_CHANNEL_BACK
},
},
{
{
TYPE_
CPE
,
1
,
AAC_CHANNEL_FRONT
},
{
TYPE_SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_LFE
,
0
,
AAC_CHANNEL_LFE
},
{
TYPE_CPE
,
2
,
AAC_CHANNEL_BACK
},
{
TYPE_CPE
,
0
,
AAC_CHANNEL_FRONT
},
},
{
{
TYPE_
SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CP
E
,
0
,
AAC_CHANNEL_FRONT
},
},
{
{
TYPE_
SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CP
E
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_SCE
,
1
,
AAC_CHANNEL_BACK
},
},
{
{
TYPE_
SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CP
E
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
1
,
AAC_CHANNEL_BACK
},
},
{
{
TYPE_
SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
1
,
AAC_CHANNEL_BACK
},
{
TYPE_LFE
,
0
,
AAC_CHANNEL_LFE
},
},
{
{
TYPE_
SCE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
0
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
1
,
AAC_CHANNEL_FRONT
},
{
TYPE_CPE
,
2
,
AAC_CHANNEL_BACK
},
{
TYPE_LFE
,
0
,
AAC_CHANNEL_LFE
},
},
};
static
const
uint64_t
aac_channel_layout
[
8
]
=
{
...
...
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