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
82bd8a57
Commit
82bd8a57
authored
Jan 22, 2015
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aacdec: Refactor decode_ics_info.
parent
898276c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
aacdec.c
libavcodec/aacdec.c
+14
-12
No files found.
libavcodec/aacdec.c
View file @
82bd8a57
...
@@ -1137,7 +1137,9 @@ static void decode_ltp(LongTermPrediction *ltp,
...
@@ -1137,7 +1137,9 @@ static void decode_ltp(LongTermPrediction *ltp,
static
int
decode_ics_info
(
AACContext
*
ac
,
IndividualChannelStream
*
ics
,
static
int
decode_ics_info
(
AACContext
*
ac
,
IndividualChannelStream
*
ics
,
GetBitContext
*
gb
)
GetBitContext
*
gb
)
{
{
int
aot
=
ac
->
oc
[
1
].
m4ac
.
object_type
;
const
MPEG4AudioConfig
*
const
m4ac
=
&
ac
->
oc
[
1
].
m4ac
;
const
int
aot
=
m4ac
->
object_type
;
const
int
sampling_index
=
m4ac
->
sampling_index
;
if
(
aot
!=
AOT_ER_AAC_ELD
)
{
if
(
aot
!=
AOT_ER_AAC_ELD
)
{
if
(
get_bits1
(
gb
))
{
if
(
get_bits1
(
gb
))
{
av_log
(
ac
->
avctx
,
AV_LOG_ERROR
,
"Reserved bit set.
\n
"
);
av_log
(
ac
->
avctx
,
AV_LOG_ERROR
,
"Reserved bit set.
\n
"
);
...
@@ -1170,23 +1172,23 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
...
@@ -1170,23 +1172,23 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
}
}
}
}
ics
->
num_windows
=
8
;
ics
->
num_windows
=
8
;
ics
->
swb_offset
=
ff_swb_offset_128
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
swb_offset
=
ff_swb_offset_128
[
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_128
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_128
[
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_128
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_128
[
sampling_index
];
ics
->
predictor_present
=
0
;
ics
->
predictor_present
=
0
;
}
else
{
}
else
{
ics
->
max_sfb
=
get_bits
(
gb
,
6
);
ics
->
max_sfb
=
get_bits
(
gb
,
6
);
ics
->
num_windows
=
1
;
ics
->
num_windows
=
1
;
if
(
aot
==
AOT_ER_AAC_LD
||
aot
==
AOT_ER_AAC_ELD
)
{
if
(
aot
==
AOT_ER_AAC_LD
||
aot
==
AOT_ER_AAC_ELD
)
{
ics
->
swb_offset
=
ff_swb_offset_512
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
swb_offset
=
ff_swb_offset_512
[
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_512
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_512
[
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_512
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_512
[
sampling_index
];
if
(
!
ics
->
num_swb
||
!
ics
->
swb_offset
)
if
(
!
ics
->
num_swb
||
!
ics
->
swb_offset
)
return
AVERROR_BUG
;
return
AVERROR_BUG
;
}
else
{
}
else
{
ics
->
swb_offset
=
ff_swb_offset_1024
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
swb_offset
=
ff_swb_offset_1024
[
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_1024
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
num_swb
=
ff_aac_num_swb_1024
[
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_1024
[
ac
->
oc
[
1
].
m4ac
.
sampling_index
];
ics
->
tns_max_bands
=
ff_tns_max_bands_1024
[
sampling_index
];
}
}
if
(
aot
!=
AOT_ER_AAC_ELD
)
{
if
(
aot
!=
AOT_ER_AAC_ELD
)
{
ics
->
predictor_present
=
get_bits1
(
gb
);
ics
->
predictor_present
=
get_bits1
(
gb
);
...
...
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