Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
d2d79ed7
Commit
d2d79ed7
authored
Oct 02, 2018
by
Henrik Gramner
Committed by
Jean-Baptiste Kempf
Oct 03, 2018
Browse files
Remove dav1d_init()
Perform the library initialization as part of dav1d_open() instead.
parent
c6788ed5
Pipeline
#857
passed with stage
in 1 minute and 58 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/dav1d/dav1d.h
View file @
d2d79ed7
...
...
@@ -40,11 +40,6 @@ typedef struct Dav1dSettings {
int
n_tile_threads
;
}
Dav1dSettings
;
/*
* Init the library.
*/
DAV1D_API
void
dav1d_init
(
void
);
/**
* Get library version.
*/
...
...
src/lib.c
View file @
d2d79ed7
...
...
@@ -50,12 +50,6 @@ static void init_internal(void) {
av1_init_qm_tables
();
}
static
pthread_once_t
initted
=
PTHREAD_ONCE_INIT
;
void
dav1d_init
(
void
)
{
pthread_once
(
&
initted
,
init_internal
);
}
const
char
*
dav1d_version
(
void
)
{
return
DAV1D_VERSION
;
}
...
...
@@ -68,6 +62,9 @@ void dav1d_default_settings(Dav1dSettings *const s) {
int
dav1d_open
(
Dav1dContext
**
const
c_out
,
const
Dav1dSettings
*
const
s
)
{
static
pthread_once_t
initted
=
PTHREAD_ONCE_INIT
;
pthread_once
(
&
initted
,
init_internal
);
validate_input_or_ret
(
c_out
!=
NULL
,
-
EINVAL
);
validate_input_or_ret
(
s
!=
NULL
,
-
EINVAL
);
validate_input_or_ret
(
s
->
n_tile_threads
>=
1
&&
...
...
src/qm.c
View file @
d2d79ed7
...
...
@@ -3105,7 +3105,7 @@ static void untriangle(uint8_t *dst, const uint8_t *src, const int sz) {
}
void av1_init_qm_tables(void) {
// This function is guaranteed to be called only once
by dav1d_init
// This function is guaranteed to be called only once
for (int i = 0; i < 15; i++)
for (int j = 0; j < 2; j++) {
...
...
src/wedge.c
View file @
d2d79ed7
...
...
@@ -223,7 +223,7 @@ static void fill2d_16x2(uint8_t *dst, const int w, const int h,
}
void
av1_init_wedge_masks
(
void
)
{
// This function is guaranteed to be called only once
by dav1d_init
// This function is guaranteed to be called only once
enum
WedgeMasterLineType
{
WEDGE_MASTER_LINE_ODD
,
...
...
@@ -322,7 +322,7 @@ static void build_nondc_ii_masks(uint8_t *const mask_v,
}
void
av1_init_interintra_masks
(
void
)
{
// This function is guaranteed to be called only once
by dav1d_init
// This function is guaranteed to be called only once
memset
(
ii_dc_mask
,
32
,
32
*
32
);
#define set(a) a[II_VERT_PRED - 1], a[II_HOR_PRED - 1], a[II_SMOOTH_PRED - 1]
...
...
tools/dav1d.c
View file @
d2d79ed7
...
...
@@ -78,7 +78,6 @@ int main(const int argc, char *const *const argv) {
return
-
1
;
}
dav1d_init
();
init_demuxers
();
init_muxers
();
parse
(
argc
,
argv
,
&
cli_settings
,
&
lib_settings
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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