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
1cdb5439
Commit
1cdb5439
authored
Feb 09, 2015
by
hkuang
Committed by
Gerrit Code Review
Feb 09, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Set the maximum decode threads to be 8."
parents
07eb8c8d
dd88f482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
vp9/common/vp9_thread.h
vp9/common/vp9_thread.h
+6
-2
vp9/vp9_dx_iface.c
vp9/vp9_dx_iface.c
+2
-0
No files found.
vp9/common/vp9_thread.h
View file @
1cdb5439
...
...
@@ -22,6 +22,10 @@
extern
"C"
{
#endif
// Set maximum decode threads to be 8 due to the limit of frame buffers
// and not enough semaphores in the emulation layer on windows.
#define MAX_DECODE_THREADS 8
#if CONFIG_MULTITHREAD
#if defined(_WIN32)
...
...
@@ -103,8 +107,8 @@ static INLINE int pthread_cond_destroy(pthread_cond_t *const condition) {
static
INLINE
int
pthread_cond_init
(
pthread_cond_t
*
const
condition
,
void
*
cond_attr
)
{
(
void
)
cond_attr
;
condition
->
waiting_sem_
=
CreateSemaphore
(
NULL
,
0
,
1
,
NULL
);
condition
->
received_sem_
=
CreateSemaphore
(
NULL
,
0
,
1
,
NULL
);
condition
->
waiting_sem_
=
CreateSemaphore
(
NULL
,
0
,
MAX_DECODE_THREADS
,
NULL
);
condition
->
received_sem_
=
CreateSemaphore
(
NULL
,
0
,
MAX_DECODE_THREADS
,
NULL
);
condition
->
signal_event_
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
if
(
condition
->
waiting_sem_
==
NULL
||
condition
->
received_sem_
==
NULL
||
...
...
vp9/vp9_dx_iface.c
View file @
1cdb5439
...
...
@@ -363,6 +363,8 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) {
ctx
->
num_cache_frames
=
0
;
ctx
->
num_frame_workers
=
(
ctx
->
frame_parallel_decode
==
1
)
?
ctx
->
cfg
.
threads
:
1
;
if
(
ctx
->
num_frame_workers
>
MAX_DECODE_THREADS
)
ctx
->
num_frame_workers
=
MAX_DECODE_THREADS
;
ctx
->
available_threads
=
ctx
->
num_frame_workers
;
ctx
->
flushed
=
0
;
...
...
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