Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Mark Harris
Opus
Commits
14845916
Commit
14845916
authored
Jun 08, 2016
by
Jean-Marc Valin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes equiv_rate for CBR
parent
2ca6df03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
celt/celt_encoder.c
celt/celt_encoder.c
+3
-2
No files found.
celt/celt_encoder.c
View file @
14845916
...
...
@@ -1365,7 +1365,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
opus_val16
surround_masking
=
0
;
opus_val16
temporal_vbr
=
0
;
opus_val16
surround_trim
=
0
;
opus_int32
equiv_rate
=
510000
;
opus_int32
equiv_rate
;
int
hybrid
;
VARDECL
(
opus_val16
,
surround_dynalloc
);
ALLOC_STACK
;
...
...
@@ -1461,8 +1461,9 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
(
tmp
+
4
*
mode
->
Fs
)
/
(
8
*
mode
->
Fs
)
-!!
st
->
signalling
));
effectiveBytes
=
nbCompressedBytes
-
nbFilledBytes
;
}
equiv_rate
=
((
opus_int32
)
nbCompressedBytes
*
8
*
50
>>
(
3
-
LM
))
-
(
40
*
C
+
20
)
*
((
400
>>
LM
)
-
50
);
if
(
st
->
bitrate
!=
OPUS_BITRATE_MAX
)
equiv_rate
=
st
->
bitrate
-
(
40
*
C
+
20
)
*
((
400
>>
LM
)
-
50
);
equiv_rate
=
IMIN
(
equiv_rate
,
st
->
bitrate
-
(
40
*
C
+
20
)
*
((
400
>>
LM
)
-
50
)
)
;
if
(
enc
==
NULL
)
{
...
...
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