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
8a8c283e
Commit
8a8c283e
authored
Feb 20, 2011
by
Peter Ross
Committed by
Ronald S. Bultje
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
binkaudio: simplify frame_len_bits and frame_len calculation
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
a304def1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
binkaudio.c
libavcodec/binkaudio.c
+2
-4
No files found.
libavcodec/binkaudio.c
View file @
8a8c283e
...
...
@@ -81,7 +81,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
else
{
frame_len_bits
=
11
;
}
s
->
frame_len
=
1
<<
frame_len_bits
;
if
(
avctx
->
channels
>
MAX_CHANNELS
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"too many channels: %d
\n
"
,
avctx
->
channels
);
...
...
@@ -91,14 +90,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
if
(
avctx
->
codec
->
id
==
CODEC_ID_BINKAUDIO_RDFT
)
{
// audio is already interleaved for the RDFT format variant
sample_rate
*=
avctx
->
channels
;
s
->
frame_len
*=
avctx
->
channels
;
s
->
channels
=
1
;
if
(
avctx
->
channels
==
2
)
frame_len_bits
++
;
frame_len_bits
+=
av_log2
(
avctx
->
channels
);
}
else
{
s
->
channels
=
avctx
->
channels
;
}
s
->
frame_len
=
1
<<
frame_len_bits
;
s
->
overlap_len
=
s
->
frame_len
/
16
;
s
->
block_size
=
(
s
->
frame_len
-
s
->
overlap_len
)
*
s
->
channels
;
sample_rate_half
=
(
sample_rate
+
1
)
/
2
;
...
...
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