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
3468ff10
Commit
3468ff10
authored
Oct 29, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sipr: set mode based on block_align instead of bit_rate
the user is not required to set bit_rate
parent
0005f9a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
sipr.c
libavcodec/sipr.c
+9
-4
No files found.
libavcodec/sipr.c
View file @
3468ff10
...
...
@@ -480,10 +480,15 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
SiprContext
*
ctx
=
avctx
->
priv_data
;
int
i
;
if
(
avctx
->
bit_rate
>
12200
)
ctx
->
mode
=
MODE_16k
;
else
if
(
avctx
->
bit_rate
>
7500
)
ctx
->
mode
=
MODE_8k5
;
else
if
(
avctx
->
bit_rate
>
5750
)
ctx
->
mode
=
MODE_6k5
;
else
ctx
->
mode
=
MODE_5k0
;
switch
(
avctx
->
block_align
)
{
case
20
:
ctx
->
mode
=
MODE_16k
;
break
;
case
19
:
ctx
->
mode
=
MODE_8k5
;
break
;
case
29
:
ctx
->
mode
=
MODE_6k5
;
break
;
case
37
:
ctx
->
mode
=
MODE_5k0
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid block_align: %d
\n
"
,
avctx
->
block_align
);
return
AVERROR
(
EINVAL
);
}
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Mode: %s
\n
"
,
modes
[
ctx
->
mode
].
mode_name
);
...
...
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