Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
880236e8
Commit
880236e8
authored
May 07, 2018
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvdec: pass CUstream in vpp parameters
parent
c8556834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
nvdec.c
libavcodec/nvdec.c
+6
-1
No files found.
libavcodec/nvdec.c
View file @
880236e8
...
...
@@ -39,6 +39,7 @@ typedef struct NVDECDecoder {
AVBufferRef
*
hw_device_ref
;
CUcontext
cuda_ctx
;
CUstream
stream
;
CudaFunctions
*
cudl
;
CuvidFunctions
*
cvdl
;
...
...
@@ -189,6 +190,7 @@ static int nvdec_decoder_create(AVBufferRef **out, AVBufferRef *hw_device_ref,
}
decoder
->
cuda_ctx
=
device_hwctx
->
cuda_ctx
;
decoder
->
cudl
=
device_hwctx
->
internal
->
cuda_dl
;
decoder
->
stream
=
device_hwctx
->
stream
;
ret
=
cuvid_load_functions
(
&
decoder
->
cvdl
,
logctx
);
if
(
ret
<
0
)
{
...
...
@@ -386,7 +388,7 @@ static int nvdec_retrieve_data(void *logctx, AVFrame *frame)
NVDECFrame
*
cf
=
(
NVDECFrame
*
)
fdd
->
hwaccel_priv
;
NVDECDecoder
*
decoder
=
(
NVDECDecoder
*
)
cf
->
decoder_ref
->
data
;
CUVIDPROCPARAMS
vpp
=
{
.
progressive_frame
=
1
};
CUVIDPROCPARAMS
vpp
=
{
0
};
NVDECFrame
*
unmap_data
=
NULL
;
CUresult
err
;
...
...
@@ -397,6 +399,9 @@ static int nvdec_retrieve_data(void *logctx, AVFrame *frame)
unsigned
int
offset
=
0
;
int
ret
=
0
;
vpp
.
progressive_frame
=
1
;
vpp
.
output_stream
=
decoder
->
stream
;
err
=
decoder
->
cudl
->
cuCtxPushCurrent
(
decoder
->
cuda_ctx
);
if
(
err
!=
CUDA_SUCCESS
)
return
AVERROR_UNKNOWN
;
...
...
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