Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
03c1d66b
Commit
03c1d66b
authored
Feb 17, 2011
by
Koen Vos
Committed by
Jean-Marc Valin
Feb 17, 2011
Browse files
SILK can't use more than 80% of the bits in hybrid mode
parent
9078176f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/opus_encoder.c
View file @
03c1d66b
...
...
@@ -128,6 +128,10 @@ int opus_encode(OpusEncoder *st, const short *pcm, int frame_size,
st
->
silk_mode
.
bitRate
=
(
st
->
silk_mode
.
bitRate
+
9000
+
st
->
use_vbr
*
1000
)
/
2
;
}
}
/* don't let SILK use more than 80% */
if
(
st
->
silk_mode
.
bitRate
>
(
st
->
bitrate_bps
-
8
*
st
->
Fs
/
frame_size
)
*
4
/
5
)
{
st
->
silk_mode
.
bitRate
=
(
st
->
bitrate_bps
-
8
*
st
->
Fs
/
frame_size
)
*
4
/
5
;
}
}
st
->
silk_mode
.
payloadSize_ms
=
1000
*
frame_size
/
st
->
Fs
;
...
...
@@ -162,6 +166,8 @@ int opus_encode(OpusEncoder *st, const short *pcm, int frame_size,
}
else
if
(
st
->
silk_mode
.
internalSampleRate
==
16000
)
{
silk_internal_bandwidth
=
BANDWIDTH_WIDEBAND
;
}
}
else
{
SKP_assert
(
st
->
silk_mode
.
internalSampleRate
==
16000
);
}
}
...
...
Write
Preview
Supports
Markdown
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