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
d9301c7e
Commit
d9301c7e
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 decoder control to retrieve accounting data." into nextgenv2
parents
958077ab
c9862e05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
aom/aomdx.h
aom/aomdx.h
+15
-1
av1/av1_dx_iface.c
av1/av1_dx_iface.c
+19
-0
av1/common/accounting.h
av1/common/accounting.h
+4
-2
No files found.
aom/aomdx.h
View file @
d9301c7e
...
...
@@ -37,6 +37,10 @@ extern aom_codec_iface_t aom_codec_av1_dx_algo;
extern
aom_codec_iface_t
*
aom_codec_av1_dx
(
void
);
/*!@} - end algorithm interface member group*/
/** Data structure that stores bit accounting for debug
*/
typedef
struct
Accounting
Accounting
;
/*!\enum aom_dec_control_id
* \brief AOM decoder control functions
*
...
...
@@ -103,6 +107,14 @@ enum aom_dec_control_id {
*/
AV1_SET_SKIP_LOOP_FILTER
,
/** control function to retrieve a pointer to the Accounting struct. When
* compiled without --enable-accounting, this returns AOM_CODEC_INCAPABLE.
* If called before a frame has been decoded, this returns AOM_CODEC_ERROR.
* The caller should ensure that AOM_CODEC_OK is returned before attempting
* to dereference the Accounting pointer.
*/
AV1_GET_ACCOUNTING
,
AOM_DECODER_CTRL_ID_MAX
,
/** control function to set the range of tile decoding. A value that is
...
...
@@ -163,12 +175,14 @@ AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_SIZE, int *)
#define AOM_CTRL_AV1D_GET_FRAME_SIZE
AOM_CTRL_USE_TYPE
(
AV1_INVERT_TILE_DECODE_ORDER
,
int
)
#define AOM_CTRL_AV1_INVERT_TILE_DECODE_ORDER
AOM_CTRL_USE_TYPE
(
AV1_GET_ACCOUNTING
,
Accounting
**
)
#define AOM_CTRL_AV1_GET_ACCOUNTING
AOM_CTRL_USE_TYPE
(
AV1_SET_DECODE_TILE_ROW
,
int
)
#define AOM_CTRL_AV1_SET_DECODE_TILE_ROW
AOM_CTRL_USE_TYPE
(
AV1_SET_DECODE_TILE_COL
,
int
)
#define AOM_CTRL_AV1_SET_DECODE_TILE_COL
/*!\endcond */
/*! @} - end defgroup
vp8
_decoder */
/*! @} - end defgroup
aom
_decoder */
#ifdef __cplusplus
}
// extern "C"
...
...
av1/av1_dx_iface.c
View file @
d9301c7e
...
...
@@ -1083,6 +1083,24 @@ static aom_codec_err_t ctrl_set_skip_loop_filter(aom_codec_alg_priv_t *ctx,
return
AOM_CODEC_OK
;
}
static
aom_codec_err_t
ctrl_get_accounting
(
aom_codec_alg_priv_t
*
ctx
,
va_list
args
)
{
#if !CONFIG_ACCOUNTING
(
void
)
ctx
;
(
void
)
args
;
return
AOM_CODEC_INCAPABLE
;
#else
if
(
ctx
->
frame_workers
)
{
AVxWorker
*
const
worker
=
ctx
->
frame_workers
;
FrameWorkerData
*
const
frame_worker_data
=
(
FrameWorkerData
*
)
worker
->
data1
;
AV1Decoder
*
pbi
=
frame_worker_data
->
pbi
;
Accounting
**
acct
=
va_arg
(
args
,
Accounting
**
);
*
acct
=
&
pbi
->
accounting
;
return
AOM_CODEC_OK
;
}
return
AOM_CODEC_ERROR
;
#endif
}
static
aom_codec_err_t
ctrl_set_decode_tile_row
(
aom_codec_alg_priv_t
*
ctx
,
va_list
args
)
{
ctx
->
decode_tile_row
=
va_arg
(
args
,
int
);
...
...
@@ -1119,6 +1137,7 @@ static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
{
AV1D_GET_DISPLAY_SIZE
,
ctrl_get_render_size
},
{
AV1D_GET_BIT_DEPTH
,
ctrl_get_bit_depth
},
{
AV1D_GET_FRAME_SIZE
,
ctrl_get_frame_size
},
{
AV1_GET_ACCOUNTING
,
ctrl_get_accounting
},
{
AV1_GET_NEW_FRAME_IMAGE
,
ctrl_get_new_frame_image
},
{
-
1
,
NULL
},
...
...
av1/common/accounting.h
View file @
d9301c7e
...
...
@@ -54,14 +54,16 @@ typedef struct {
AccountingDictionary
dictionary
;
}
AccountingSymbols
;
typedef
struct
{
typedef
struct
Accounting
Accounting
;
struct
Accounting
{
AccountingSymbols
syms
;
/** Size allocated for symbols (not all may be used). */
int
num_syms_allocated
;
int16_t
hash_dictionary
[
AOM_ACCOUNTING_HASH_SIZE
];
AccountingSymbolContext
context
;
uint32_t
last_tell_frac
;
}
Accounting
;
};
void
aom_accounting_init
(
Accounting
*
accounting
);
void
aom_accounting_reset
(
Accounting
*
accounting
);
...
...
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