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
85c55665
Commit
85c55665
authored
Oct 18, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Port aom_reader_tell() support" into nextgenv2
parents
d8ff1986
868fc0b0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
5 deletions
+28
-5
aom_dsp/bitreader.h
aom_dsp/bitreader.h
+12
-0
aom_dsp/buf_ans.h
aom_dsp/buf_ans.h
+0
-2
aom_dsp/daalaboolreader.c
aom_dsp/daalaboolreader.c
+4
-0
aom_dsp/daalaboolreader.h
aom_dsp/daalaboolreader.h
+1
-0
aom_dsp/dkboolreader.c
aom_dsp/dkboolreader.c
+1
-1
aom_dsp/dkboolreader.h
aom_dsp/dkboolreader.h
+8
-0
av1/common/entropymode.h
av1/common/entropymode.h
+2
-2
No files found.
aom_dsp/bitreader.h
View file @
85c55665
...
...
@@ -79,6 +79,18 @@ static INLINE int aom_reader_has_error(aom_reader *r) {
#endif
}
static
INLINE
ptrdiff_t
aom_reader_tell
(
const
aom_reader
*
r
)
{
#if CONFIG_ANS
(
void
)
r
;
assert
(
0
&&
"aom_reader_tell() is unimplemented for ANS"
);
return
0
;
#elif CONFIG_DAALA_EC
return
aom_daala_reader_tell
(
r
);
#else
return
aom_dk_reader_tell
(
r
);
#endif
}
static
INLINE
int
aom_read
(
aom_reader
*
r
,
int
prob
)
{
#if CONFIG_ANS
return
uabs_read
(
r
,
prob
);
...
...
aom_dsp/buf_ans.h
View file @
85c55665
...
...
@@ -28,8 +28,6 @@ extern "C" {
#define ANS_METHOD_UABS 0
#define ANS_METHOD_RANS 1
struct
aom_internal_error_info
*
error
;
struct
buffered_ans_symbol
{
unsigned
int
method
:
1
;
// one of ANS_METHOD_UABS or ANS_METHOD_RANS
// TODO(aconverse): Should be possible to write this in terms of start for ABS
...
...
aom_dsp/daalaboolreader.c
View file @
85c55665
...
...
@@ -24,3 +24,7 @@ int aom_daala_reader_init(daala_reader *r, const uint8_t *buffer, int size) {
const
uint8_t
*
aom_daala_reader_find_end
(
daala_reader
*
r
)
{
return
r
->
buffer_end
;
}
ptrdiff_t
aom_daala_reader_tell
(
const
daala_reader
*
r
)
{
return
od_ec_dec_tell
(
&
r
->
ec
);
}
aom_dsp/daalaboolreader.h
View file @
85c55665
...
...
@@ -29,6 +29,7 @@ typedef struct daala_reader daala_reader;
int
aom_daala_reader_init
(
daala_reader
*
r
,
const
uint8_t
*
buffer
,
int
size
);
const
uint8_t
*
aom_daala_reader_find_end
(
daala_reader
*
r
);
ptrdiff_t
aom_daala_reader_tell
(
const
daala_reader
*
r
);
static
INLINE
int
aom_daala_read
(
daala_reader
*
r
,
int
prob
)
{
if
(
prob
==
128
)
{
...
...
aom_dsp/dkboolreader.c
View file @
85c55665
...
...
@@ -29,7 +29,7 @@ int aom_dk_reader_init(struct aom_dk_reader *r, const uint8_t *buffer,
return
1
;
}
else
{
r
->
buffer_end
=
buffer
+
size
;
r
->
buffer
=
buffer
;
r
->
buffer_start
=
r
->
buffer
=
buffer
;
r
->
value
=
0
;
r
->
count
=
-
8
;
r
->
range
=
255
;
...
...
aom_dsp/dkboolreader.h
View file @
85c55665
...
...
@@ -45,6 +45,7 @@ struct aom_dk_reader {
BD_VALUE
value
;
unsigned
int
range
;
int
count
;
const
uint8_t
*
buffer_start
;
const
uint8_t
*
buffer_end
;
const
uint8_t
*
buffer
;
aom_decrypt_cb
decrypt_cb
;
...
...
@@ -60,6 +61,13 @@ void aom_dk_reader_fill(struct aom_dk_reader *r);
const
uint8_t
*
aom_dk_reader_find_end
(
struct
aom_dk_reader
*
r
);
static
INLINE
ptrdiff_t
aom_dk_reader_tell
(
const
struct
aom_dk_reader
*
r
)
{
const
size_t
bits_read
=
(
r
->
buffer
-
r
->
buffer_start
)
*
CHAR_BIT
;
const
int
count
=
(
r
->
count
<
LOTS_OF_BITS
)
?
r
->
count
:
r
->
count
-
LOTS_OF_BITS
;
return
bits_read
+
BD_VALUE_SIZE
-
(
count
+
CHAR_BIT
);
}
static
INLINE
int
aom_dk_reader_has_error
(
struct
aom_dk_reader
*
r
)
{
// Check if we have reached the end of the buffer.
//
...
...
av1/common/entropymode.h
View file @
85c55665
...
...
@@ -133,8 +133,8 @@ typedef struct frame_contexts {
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_DAALA_EC
aom_cdf_prob
partition_cdf
[
PARTITION_CONTEXTS
][
PARTITION_TYPES
];
aom_cdf_prob
switchable_interp_cdf
[
SWITCHABLE_FILTER_CONTEXTS
]
[
SWITCHABLE_FILTERS
];
aom_cdf_prob
switchable_interp_cdf
[
SWITCHABLE_FILTER_CONTEXTS
]
[
SWITCHABLE_FILTERS
];
aom_cdf_prob
intra_ext_tx_cdf
[
EXT_TX_SIZES
][
TX_TYPES
][
TX_TYPES
];
aom_cdf_prob
inter_ext_tx_cdf
[
EXT_TX_SIZES
][
TX_TYPES
];
#endif
...
...
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