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
63757e15
Commit
63757e15
authored
Nov 29, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- direct3d: make sure a sensible default RGB format is picked up
parent
947b0e35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
modules/video_output/directx/direct3d.c
modules/video_output/directx/direct3d.c
+20
-2
No files found.
modules/video_output/directx/direct3d.c
View file @
63757e15
...
...
@@ -873,8 +873,26 @@ D3DFORMAT Direct3DVoutFindFormat(vout_thread_t *p_vout, int i_chroma, D3DFORMAT
HRESULT
hr
=
IDirect3D9_GetAdapterDisplayMode
(
p_d3dobj
,
D3DADAPTER_DEFAULT
,
&
d3ddm
);
if
(
SUCCEEDED
(
hr
))
{
msg_Dbg
(
p_vout
,
"defaulting to adpater pixel format"
);
return
Direct3DVoutSelectFormat
(
p_vout
,
target
,
&
d3ddm
.
Format
,
1
);
/*
** some professional cards could use some advanced pixel format as default,
** make sure we stick with chromas that we can handle internally
*/
switch
(
d3ddm
.
Format
)
{
case
D3DFMT_R8G8B8
:
case
D3DFMT_X8R8G8B8
:
case
D3DFMT_A8R8G8B8
:
msg_Dbg
(
p_vout
,
"defaulting to adpater pixel format"
);
return
Direct3DVoutSelectFormat
(
p_vout
,
target
,
&
d3ddm
.
Format
,
1
);
default:
{
/* if we fall here, that probably means that we need to render some YUV format */
static
const
D3DFORMAT
formats
[]
=
{
D3DFMT_R8G8B8
,
D3DFMT_X8R8G8B8
,
D3DFMT_A8R8G8B8
};
msg_Dbg
(
p_vout
,
"defaulting to built-in pixel format"
);
return
Direct3DVoutSelectFormat
(
p_vout
,
target
,
formats
,
sizeof
(
formats
)
/
sizeof
(
D3DFORMAT
));
}
}
}
}
}
...
...
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