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
e34bee32
Commit
e34bee32
authored
May 28, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
May 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
direct3d11: we don't need to keep vlcFormat
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
3071e185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
modules/video_output/msw/common.h
modules/video_output/msw/common.h
+0
-1
modules/video_output/msw/direct3d11.c
modules/video_output/msw/direct3d11.c
+9
-8
No files found.
modules/video_output/msw/common.h
View file @
e34bee32
...
...
@@ -184,7 +184,6 @@ struct vout_display_sys_t
ID3D11RenderTargetView
*
d3drenderTargetView
;
ID3D11DepthStencilView
*
d3ddepthStencilView
;
picture_sys_t
*
picsys
;
vlc_fourcc_t
vlcFormat
;
const
char
*
d3dPxShader
;
// SPU
...
...
modules/video_output/msw/direct3d11.c
View file @
e34bee32
...
...
@@ -860,12 +860,15 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
# endif
#endif
vlc_fourcc_t
i_src_chroma
=
fmt
->
i_chroma
;
fmt
->
i_chroma
=
0
;
// look for the request pixel format first
UINT
i_quadSupportFlags
=
D3D11_FORMAT_SUPPORT_TEXTURE2D
|
D3D11_FORMAT_SUPPORT_SHADER_LOAD
;
UINT
i_formatSupport
;
for
(
unsigned
i
=
0
;
d3d_formats
[
i
].
name
!=
0
;
i
++
)
{
if
(
fmt
->
i
_chroma
==
d3d_formats
[
i
].
fourcc
)
if
(
i_src
_chroma
==
d3d_formats
[
i
].
fourcc
)
{
if
(
SUCCEEDED
(
ID3D11Device_CheckFormatSupport
(
sys
->
d3ddevice
,
d3d_formats
[
i
].
formatTexture
,
...
...
@@ -873,7 +876,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
(
i_formatSupport
&
i_quadSupportFlags
)
==
i_quadSupportFlags
)
{
msg_Dbg
(
vd
,
"Using pixel format %s"
,
d3d_formats
[
i
].
name
);
sys
->
vlcFormat
=
d3d_formats
[
i
].
fourcc
;
fmt
->
i_chroma
=
d3d_formats
[
i
].
fourcc
;
sys
->
picQuadConfig
.
textureFormat
=
d3d_formats
[
i
].
formatTexture
;
sys
->
picQuadConfig
.
resourceFormatYRGB
=
d3d_formats
[
i
].
formatY
;
sys
->
picQuadConfig
.
resourceFormatUV
=
d3d_formats
[
i
].
formatUV
;
...
...
@@ -883,7 +886,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
}
// look for any pixel format that we can handle
if
(
!
sys
->
vlcFormat
)
if
(
!
fmt
->
i_chroma
)
{
for
(
unsigned
i
=
0
;
d3d_formats
[
i
].
name
!=
0
;
i
++
)
{
...
...
@@ -893,7 +896,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
(
i_formatSupport
&
i_quadSupportFlags
)
==
i_quadSupportFlags
)
{
msg_Dbg
(
vd
,
"Using pixel format %s"
,
d3d_formats
[
i
].
name
);
sys
->
vlcFormat
=
d3d_formats
[
i
].
fourcc
;
fmt
->
i_chroma
=
d3d_formats
[
i
].
fourcc
;
sys
->
picQuadConfig
.
textureFormat
=
d3d_formats
[
i
].
formatTexture
;
sys
->
picQuadConfig
.
resourceFormatYRGB
=
d3d_formats
[
i
].
formatY
;
sys
->
picQuadConfig
.
resourceFormatUV
=
d3d_formats
[
i
].
formatUV
;
...
...
@@ -901,7 +904,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
}
}
}
if
(
!
sys
->
vlcFormat
)
if
(
!
fmt
->
i_chroma
)
{
msg_Err
(
vd
,
"Could not get a suitable texture pixel format"
);
return
VLC_EGENERIC
;
...
...
@@ -927,7 +930,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
sys
->
d3dregion_format
=
DXGI_FORMAT_UNKNOWN
;
}
switch
(
sys
->
vlcFormat
)
switch
(
fmt
->
i_chroma
)
{
case
VLC_CODEC_NV12
:
if
(
fmt
->
i_height
>
576
)
...
...
@@ -1000,8 +1003,6 @@ static int Direct3D11CreateResources(vout_display_t *vd, video_format_t *fmt)
vout_display_sys_t
*
sys
=
vd
->
sys
;
HRESULT
hr
;
fmt
->
i_chroma
=
sys
->
vlcFormat
;
hr
=
UpdateBackBuffer
(
vd
);
if
(
FAILED
(
hr
))
{
msg_Err
(
vd
,
"Could not update the backbuffer. (hr=0x%lX)"
,
hr
);
...
...
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