Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
40bcdbcf
Commit
40bcdbcf
authored
Oct 18, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Fix warning when discarding const qualifier." into nextgenv2
parents
65147563
19698a70
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
aom_dsp/entdec.c
aom_dsp/entdec.c
+2
-2
aom_dsp/entdec.h
aom_dsp/entdec.h
+4
-2
aom_dsp/entenc.c
aom_dsp/entenc.c
+2
-2
aom_dsp/entenc.h
aom_dsp/entenc.h
+3
-2
No files found.
aom_dsp/entdec.c
View file @
40bcdbcf
...
...
@@ -518,7 +518,7 @@ uint32_t od_ec_dec_bits_(od_ec_dec *dec, unsigned ftb OD_ACC_STR) {
Return: The number of bits.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
int
od_ec_dec_tell
(
od_ec_dec
*
dec
)
{
int
od_ec_dec_tell
(
const
od_ec_dec
*
dec
)
{
return
((
dec
->
end
-
dec
->
eptr
)
+
(
dec
->
bptr
-
dec
->
buf
))
*
8
-
dec
->
cnt
-
dec
->
nend_bits
+
dec
->
tell_offs
;
}
...
...
@@ -529,6 +529,6 @@ int od_ec_dec_tell(od_ec_dec *dec) {
Return: The number of bits scaled by 2**OD_BITRES.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
uint32_t
od_ec_dec_tell_frac
(
od_ec_dec
*
dec
)
{
uint32_t
od_ec_dec_tell_frac
(
const
od_ec_dec
*
dec
)
{
return
od_ec_tell_frac
(
od_ec_dec_tell
(
dec
),
dec
->
rng
);
}
aom_dsp/entdec.h
View file @
40bcdbcf
...
...
@@ -133,8 +133,10 @@ OD_WARN_UNUSED_RESULT uint32_t od_ec_dec_bits_(od_ec_dec *dec,
unsigned
ftb
OD_ACC_STR
)
OD_ARG_NONNULL
(
1
);
OD_WARN_UNUSED_RESULT
int
od_ec_dec_tell
(
od_ec_dec
*
dec
)
OD_ARG_NONNULL
(
1
);
uint32_t
od_ec_dec_tell_frac
(
od_ec_dec
*
dec
)
OD_ARG_NONNULL
(
1
);
OD_WARN_UNUSED_RESULT
int
od_ec_dec_tell
(
const
od_ec_dec
*
dec
)
OD_ARG_NONNULL
(
1
);
OD_WARN_UNUSED_RESULT
uint32_t
od_ec_dec_tell_frac
(
const
od_ec_dec
*
dec
)
OD_ARG_NONNULL
(
1
);
#ifdef __cplusplus
}
// extern "C"
...
...
aom_dsp/entenc.c
View file @
40bcdbcf
...
...
@@ -647,7 +647,7 @@ unsigned char *od_ec_enc_done(od_ec_enc *enc, uint32_t *nbytes) {
Return: The number of bits.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
int
od_ec_enc_tell
(
od_ec_enc
*
enc
)
{
int
od_ec_enc_tell
(
const
od_ec_enc
*
enc
)
{
/*The 10 here counteracts the offset of -9 baked into cnt, and adds 1 extra
bit, which we reserve for terminating the stream.*/
return
(
enc
->
offs
+
enc
->
end_offs
)
*
8
+
enc
->
cnt
+
enc
->
nend_bits
+
10
;
...
...
@@ -662,7 +662,7 @@ int od_ec_enc_tell(od_ec_enc *enc) {
Return: The number of bits scaled by 2**OD_BITRES.
This will always be slightly larger than the exact value (e.g., all
rounding error is in the positive direction).*/
uint32_t
od_ec_enc_tell_frac
(
od_ec_enc
*
enc
)
{
uint32_t
od_ec_enc_tell_frac
(
const
od_ec_enc
*
enc
)
{
return
od_ec_tell_frac
(
od_ec_enc_tell
(
enc
),
enc
->
rng
);
}
...
...
aom_dsp/entenc.h
View file @
40bcdbcf
...
...
@@ -101,8 +101,9 @@ OD_WARN_UNUSED_RESULT unsigned char *od_ec_enc_done(od_ec_enc *enc,
uint32_t
*
nbytes
)
OD_ARG_NONNULL
(
1
)
OD_ARG_NONNULL
(
2
);
OD_WARN_UNUSED_RESULT
int
od_ec_enc_tell
(
od_ec_enc
*
enc
)
OD_ARG_NONNULL
(
1
);
OD_WARN_UNUSED_RESULT
uint32_t
od_ec_enc_tell_frac
(
od_ec_enc
*
enc
)
OD_WARN_UNUSED_RESULT
int
od_ec_enc_tell
(
const
od_ec_enc
*
enc
)
OD_ARG_NONNULL
(
1
);
OD_WARN_UNUSED_RESULT
uint32_t
od_ec_enc_tell_frac
(
const
od_ec_enc
*
enc
)
OD_ARG_NONNULL
(
1
);
void
od_ec_enc_checkpoint
(
od_ec_enc
*
dst
,
const
od_ec_enc
*
src
);
...
...
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