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
Xiph.Org
aom-rav1e
Commits
d30a563d
Commit
d30a563d
authored
Oct 23, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Add a runtime flag to enable bit accounting." into nextgenv2
parents
d9301c7e
eb64fc28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+12
-4
av1/decoder/decoder.c
av1/decoder/decoder.c
+1
-0
av1/decoder/decoder.h
av1/decoder/decoder.h
+1
-0
No files found.
av1/decoder/decodeframe.c
View file @
d30a563d
...
...
@@ -2792,7 +2792,9 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
pbi
->
allocated_tiles
=
n_tiles
;
}
#if CONFIG_ACCOUNTING
aom_accounting_reset
(
&
pbi
->
accounting
);
if
(
pbi
->
acct_enabled
)
{
aom_accounting_reset
(
&
pbi
->
accounting
);
}
#endif
// Load all tile information into tile_data.
for
(
tile_row
=
tile_rows_start
;
tile_row
<
tile_rows_end
;
++
tile_row
)
{
...
...
@@ -2817,7 +2819,11 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
&
td
->
bit_reader
,
pbi
->
decrypt_cb
,
pbi
->
decrypt_state
);
#endif
#if CONFIG_ACCOUNTING
tile_data
->
bit_reader
.
accounting
=
&
pbi
->
accounting
;
if
(
pbi
->
acct_enabled
)
{
tile_data
->
bit_reader
.
accounting
=
&
pbi
->
accounting
;
}
else
{
tile_data
->
bit_reader
.
accounting
=
NULL
;
}
#endif
av1_init_macroblockd
(
cm
,
&
td
->
xd
,
td
->
dqcoeff
);
#if CONFIG_PALETTE
...
...
@@ -2838,8 +2844,10 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
const
int
col
=
inv_col_order
?
tile_cols
-
1
-
tile_col
:
tile_col
;
TileData
*
const
td
=
pbi
->
tile_data
+
tile_cols
*
row
+
col
;
#if CONFIG_ACCOUNTING
tile_data
->
bit_reader
.
accounting
->
last_tell_frac
=
aom_reader_tell_frac
(
&
tile_data
->
bit_reader
);
if
(
pbi
->
acct_enabled
)
{
tile_data
->
bit_reader
.
accounting
->
last_tell_frac
=
aom_reader_tell_frac
(
&
tile_data
->
bit_reader
);
}
#endif
av1_tile_set_col
(
&
tile_info
,
cm
,
col
);
...
...
av1/decoder/decoder.c
View file @
d30a563d
...
...
@@ -131,6 +131,7 @@ AV1Decoder *av1_decoder_create(BufferPool *const pool) {
av1_loop_restoration_precal
();
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_ACCOUNTING
pbi
->
acct_enabled
=
1
;
aom_accounting_init
(
&
pbi
->
accounting
);
#endif
...
...
av1/decoder/decoder.h
View file @
d30a563d
...
...
@@ -104,6 +104,7 @@ typedef struct AV1Decoder {
int
dec_tile_row
,
dec_tile_col
;
#endif // CONFIG_EXT_TILE
#if CONFIG_ACCOUNTING
int
acct_enabled
;
Accounting
accounting
;
#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