Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a8919763
Commit
a8919763
authored
Sep 27, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva: move initialization from setup to open
parent
978dedc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
modules/codec/avcodec/d3d11va.c
modules/codec/avcodec/d3d11va.c
+6
-3
modules/codec/avcodec/dxva2.c
modules/codec/avcodec/dxva2.c
+6
-3
No files found.
modules/codec/avcodec/d3d11va.c
View file @
a8919763
...
@@ -147,10 +147,7 @@ static picture_t *DxAllocPicture(vlc_va_t *, const video_format_t *, unsigned in
...
@@ -147,10 +147,7 @@ static picture_t *DxAllocPicture(vlc_va_t *, const video_format_t *, unsigned in
static
int
Setup
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
,
vlc_fourcc_t
*
chroma
)
static
int
Setup
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
,
vlc_fourcc_t
*
chroma
)
{
{
vlc_va_sys_t
*
sys
=
va
->
sys
;
vlc_va_sys_t
*
sys
=
va
->
sys
;
if
(
directx_va_Setup
(
va
,
&
sys
->
dx_sys
,
avctx
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
avctx
->
hwaccel_context
=
&
sys
->
hw
;
*
chroma
=
sys
->
filter
==
NULL
?
VLC_CODEC_D3D11_OPAQUE
:
VLC_CODEC_YV12
;
*
chroma
=
sys
->
filter
==
NULL
?
VLC_CODEC_D3D11_OPAQUE
:
VLC_CODEC_YV12
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -361,6 +358,12 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
...
@@ -361,6 +358,12 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
goto
error
;
goto
error
;
}
}
err
=
directx_va_Setup
(
va
,
&
sys
->
dx_sys
,
ctx
);
if
(
err
!=
VLC_SUCCESS
)
goto
error
;
ctx
->
hwaccel_context
=
&
sys
->
hw
;
/* TODO print the hardware name/vendor for debugging purposes */
/* TODO print the hardware name/vendor for debugging purposes */
va
->
description
=
DxDescribe
(
dx_sys
);
va
->
description
=
DxDescribe
(
dx_sys
);
va
->
setup
=
Setup
;
va
->
setup
=
Setup
;
...
...
modules/codec/avcodec/dxva2.c
View file @
a8919763
...
@@ -207,10 +207,7 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
...
@@ -207,10 +207,7 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
static
int
Setup
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
,
vlc_fourcc_t
*
chroma
)
static
int
Setup
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
,
vlc_fourcc_t
*
chroma
)
{
{
vlc_va_sys_t
*
sys
=
va
->
sys
;
vlc_va_sys_t
*
sys
=
va
->
sys
;
if
(
directx_va_Setup
(
va
,
&
sys
->
dx_sys
,
avctx
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
avctx
->
hwaccel_context
=
&
sys
->
hw
;
*
chroma
=
sys
->
filter
==
NULL
?
VLC_CODEC_D3D9_OPAQUE
:
VLC_CODEC_YV12
;
*
chroma
=
sys
->
filter
==
NULL
?
VLC_CODEC_D3D9_OPAQUE
:
VLC_CODEC_YV12
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -368,6 +365,12 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
...
@@ -368,6 +365,12 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
goto
error
;
goto
error
;
}
}
err
=
directx_va_Setup
(
va
,
&
sys
->
dx_sys
,
ctx
);
if
(
err
!=
VLC_SUCCESS
)
goto
error
;
ctx
->
hwaccel_context
=
&
sys
->
hw
;
/* TODO print the hardware name/vendor for debugging purposes */
/* TODO print the hardware name/vendor for debugging purposes */
va
->
description
=
DxDescribe
(
sys
);
va
->
description
=
DxDescribe
(
sys
);
va
->
setup
=
Setup
;
va
->
setup
=
Setup
;
...
...
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