Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
2ff97529
Commit
2ff97529
authored
Jun 12, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsv: simplify busy loop
parent
a1a7db8e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/codec/qsv.c
modules/codec/qsv.c
+4
-3
No files found.
modules/codec/qsv.c
View file @
2ff97529
...
@@ -723,12 +723,13 @@ static block_t *Encode(encoder_t *this, picture_t *pic)
...
@@ -723,12 +723,13 @@ static block_t *Encode(encoder_t *this, picture_t *pic)
task
->
bs
.
MaxLength
=
sys
->
params
.
mfx
.
BufferSizeInKB
*
1000
;
task
->
bs
.
MaxLength
=
sys
->
params
.
mfx
.
BufferSizeInKB
*
1000
;
task
->
bs
.
Data
=
task
->
block
->
p_buffer
;
task
->
bs
.
Data
=
task
->
block
->
p_buffer
;
for
(;;)
{
sts
=
MFXVideoENCODE_EncodeFrameAsync
(
sys
->
session
,
0
,
frame
,
&
task
->
bs
,
&
task
->
syncp
);
sts
=
MFXVideoENCODE_EncodeFrameAsync
(
sys
->
session
,
0
,
frame
,
&
task
->
bs
,
&
task
->
syncp
);
while
(
sts
==
MFX_WRN_DEVICE_BUSY
)
{
if
(
sts
!=
MFX_WRN_DEVICE_BUSY
)
break
;
if
(
sys
->
busy_warn_counter
++
%
16
==
0
)
if
(
sys
->
busy_warn_counter
++
%
16
==
0
)
msg_Dbg
(
enc
,
"Device is busy, let's wait and retry"
);
msg_Dbg
(
enc
,
"Device is busy, let's wait and retry"
);
msleep
(
QSV_BUSYWAIT_TIME
);
msleep
(
QSV_BUSYWAIT_TIME
);
sts
=
MFXVideoENCODE_EncodeFrameAsync
(
sys
->
session
,
0
,
frame
,
&
task
->
bs
,
&
task
->
syncp
);
}
}
// msg_Dbg(enc, "Encode async status: %d, Syncpoint = %tx", sts, (ptrdiff_t)task->syncp);
// msg_Dbg(enc, "Encode async status: %d, Syncpoint = %tx", sts, (ptrdiff_t)task->syncp);
...
...
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