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
c358dd00
Commit
c358dd00
authored
Oct 15, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Oct 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11va: better logging of decoder configuration
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
fabb0362
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
modules/codec/avcodec/d3d11va.c
modules/codec/avcodec/d3d11va.c
+7
-2
modules/codec/avcodec/directx_va.c
modules/codec/avcodec/directx_va.c
+10
-9
modules/codec/avcodec/directx_va.h
modules/codec/avcodec/directx_va.h
+1
-0
No files found.
modules/codec/avcodec/d3d11va.c
View file @
c358dd00
...
...
@@ -638,16 +638,18 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input)
processorInput
[
idx
++
]
=
DXGI_FORMAT_NV12
;
processorInput
[
idx
++
]
=
DXGI_FORMAT_UNKNOWN
;
char
*
psz_decoder_name
=
directx_va_GetDecoderName
(
input
);
/* */
for
(
idx
=
0
;
processorInput
[
idx
]
!=
DXGI_FORMAT_UNKNOWN
;
++
idx
)
{
BOOL
is_supported
=
false
;
hr
=
ID3D11VideoDevice_CheckVideoDecoderFormat
((
ID3D11VideoDevice
*
)
dx_sys
->
d3ddec
,
input
,
processorInput
[
idx
],
&
is_supported
);
if
(
SUCCEEDED
(
hr
)
&&
is_supported
)
msg_Dbg
(
va
,
"%s
is supported for output"
,
DxgiFormatToStr
(
processorInput
[
idx
])
);
msg_Dbg
(
va
,
"%s
output is supported for decoder %s."
,
DxgiFormatToStr
(
processorInput
[
idx
]),
psz_decoder_name
);
else
{
msg_Dbg
(
va
,
"Can't get a decoder
for output format %s."
,
DxgiFormatToStr
(
processorInput
[
idx
])
);
msg_Dbg
(
va
,
"Can't get a decoder
output format %s for decoder %s."
,
DxgiFormatToStr
(
processorInput
[
idx
]),
psz_decoder_name
);
continue
;
}
...
...
@@ -664,10 +666,13 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input)
if
(
!
b_needsProcessor
)
{
msg_Dbg
(
va
,
"Using output format %s for decoder %s"
,
DxgiFormatToStr
(
processorInput
[
idx
]),
psz_decoder_name
);
va
->
sys
->
render
=
processorInput
[
idx
];
free
(
psz_decoder_name
);
return
VLC_SUCCESS
;
}
}
free
(
psz_decoder_name
);
msg_Dbg
(
va
,
"Output format from picture source not supported."
);
return
VLC_EGENERIC
;
...
...
modules/codec/avcodec/directx_va.c
View file @
c358dd00
...
...
@@ -242,13 +242,17 @@ static void DestroyVideoService(vlc_va_t *, directx_sys_t *);
static
void
DestroyDeviceManager
(
vlc_va_t
*
,
directx_sys_t
*
);
static
void
DestroyDevice
(
vlc_va_t
*
,
directx_sys_t
*
);
static
const
directx_va_mode_t
*
FindDxvaMod
e
(
const
GUID
*
guid
)
char
*
directx_va_GetDecoderNam
e
(
const
GUID
*
guid
)
{
for
(
unsigned
i
=
0
;
DXVA_MODES
[
i
].
name
;
i
++
)
{
if
(
IsEqualGUID
(
DXVA_MODES
[
i
].
guid
,
guid
))
return
&
DXVA_MODES
[
i
]
;
return
strdup
(
DXVA_MODES
[
i
].
name
)
;
}
return
NULL
;
char
*
psz_name
=
malloc
(
36
);
if
(
likely
(
psz_name
))
asprintf
(
&
psz_name
,
"Unknown decoder "
GUID_FMT
,
GUID_PRINT
(
*
guid
));
return
psz_name
;
}
/* */
...
...
@@ -517,12 +521,9 @@ static int FindVideoServiceConversion(vlc_va_t *va, directx_sys_t *dx_sys, const
/* Retreive supported modes from the decoder service */
for
(
unsigned
i
=
0
;
i
<
p_list
.
count
;
i
++
)
{
const
GUID
*
g
=
&
p_list
.
list
[
i
];
const
directx_va_mode_t
*
mode
=
FindDxvaMode
(
g
);
if
(
mode
)
{
msg_Dbg
(
va
,
"- '%s' is supported by hardware"
,
mode
->
name
);
}
else
{
msg_Warn
(
va
,
"- Unknown GUID = "
GUID_FMT
,
GUID_PRINT
(
*
g
)
);
}
char
*
psz_decoder_name
=
directx_va_GetDecoderName
(
g
);
msg_Dbg
(
va
,
"- '%s' is supported by hardware"
,
psz_decoder_name
);
free
(
psz_decoder_name
);
}
/* Try all supported mode by our priority */
...
...
modules/codec/avcodec/directx_va.h
View file @
c358dd00
...
...
@@ -139,5 +139,6 @@ void directx_va_Close(vlc_va_t *, directx_sys_t *);
int
directx_va_Setup
(
vlc_va_t
*
,
directx_sys_t
*
,
AVCodecContext
*
avctx
);
int
directx_va_Get
(
vlc_va_t
*
,
directx_sys_t
*
,
picture_t
*
pic
,
uint8_t
**
data
);
void
directx_va_Release
(
void
*
opaque
,
uint8_t
*
data
);
char
*
directx_va_GetDecoderName
(
const
GUID
*
guid
);
#endif
/* AVCODEC_DIRECTX_VA_H */
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