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
c871c8de
Commit
c871c8de
authored
Jun 09, 2009
by
Jean-Marc Valin
Browse files
The 010101 end of stream pattern is no longer needed now that we use the
remaining bits for fine energy
parent
39710536
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/celt.c
View file @
c871c8de
...
...
@@ -902,28 +902,8 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig_t * pcm, celt_si
}
}
/* Finishing the stream with a 0101... pattern so that the
decoder can check is everything's right */
{
int
val
=
0
;
while
(
ec_enc_tell
(
&
enc
,
0
)
<
nbCompressedBytes
*
8
)
{
ec_enc_uint
(
&
enc
,
val
,
2
);
val
=
1
-
val
;
}
}
ec_enc_done
(
&
enc
);
{
/*unsigned char *data;*/
int
nbBytes
=
ec_byte_bytes
(
&
buf
);
if
(
nbBytes
>
nbCompressedBytes
)
{
celt_warning_int
(
"got too many bytes:"
,
nbBytes
);
RESTORE_STACK
;
return
CELT_INTERNAL_ERROR
;
}
}
RESTORE_STACK
;
return
nbCompressedBytes
;
}
...
...
@@ -1441,20 +1421,6 @@ int celt_decode_float(CELTDecoder * restrict st, const unsigned char *data, int
}
}
{
unsigned
int
val
=
0
;
while
(
ec_dec_tell
(
&
dec
,
0
)
<
len
*
8
)
{
if
(
ec_dec_uint
(
&
dec
,
2
)
!=
val
)
{
celt_warning
(
"decode error"
);
RESTORE_STACK
;
return
CELT_CORRUPTED_DATA
;
}
val
=
1
-
val
;
}
}
RESTORE_STACK
;
return
0
;
/*printf ("\n");*/
...
...
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