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
501bf022
Commit
501bf022
authored
Jun 11, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: fallback to NV12 if YV12 is unsupported (fixes #8495)
parent
76d20512
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
modules/codec/avcodec/vdpau.c
modules/codec/avcodec/vdpau.c
+20
-7
No files found.
modules/codec/avcodec/vdpau.c
View file @
501bf022
...
...
@@ -57,9 +57,11 @@ struct vlc_va_sys_t
{
VdpDevice
device
;
VdpDecoderProfile
profile
;
VdpYCbCrFormat
format
;
AVVDPAUContext
context
;
VdpVideoSurface
surfaces
[
MAX_SURFACES
];
uint32_t
available
;
vlc_fourcc_t
chroma
;
uint16_t
width
;
uint16_t
height
;
void
*
display
;
...
...
@@ -133,7 +135,7 @@ static int Copy (vlc_va_t *va, picture_t *pic, AVFrame *ff)
pitches
[
i
]
=
pic
->
p
[
i
].
i_pitch
;
}
err
=
sys
->
VideoSurfaceGetBitsYCbCr
(
*
surface
,
VDP_YCBCR_FORMAT_YV12
,
err
=
sys
->
VideoSurfaceGetBitsYCbCr
(
*
surface
,
sys
->
format
,
planes
,
pitches
);
if
(
err
!=
VDP_STATUS_OK
)
{
...
...
@@ -193,7 +195,7 @@ static int Init (vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
}
*
ctxp
=
&
sys
->
context
;
*
chromap
=
VLC_CODEC_YV12
;
*
chromap
=
sys
->
chroma
;
return
VLC_SUCCESS
;
}
...
...
@@ -425,12 +427,23 @@ static int Open (vlc_va_t *va, int codec, const es_format_t *fmt)
"YUV 4:2:0"
,
width
,
height
);
if
(
sys
->
VideoSurfaceQueryGetPutBitsYCbCrCapabilities
(
device
,
VDP_CHROMA_TYPE_420
,
VDP_YCBCR_FORMAT_YV12
,
&
support
)
!=
VDP_STATUS_OK
)
support
=
VDP_FALSE
;
if
(
!
support
)
VDP_CHROMA_TYPE_420
,
VDP_YCBCR_FORMAT_YV12
,
&
support
)
==
VDP_STATUS_OK
&&
support
==
VDP_TRUE
)
{
sys
->
format
=
VDP_YCBCR_FORMAT_YV12
;
sys
->
chroma
=
VLC_CODEC_YV12
;
}
else
if
(
sys
->
VideoSurfaceQueryGetPutBitsYCbCrCapabilities
(
device
,
VDP_CHROMA_TYPE_420
,
VDP_YCBCR_FORMAT_NV12
,
&
support
)
==
VDP_STATUS_OK
&&
support
==
VDP_TRUE
)
{
sys
->
format
=
VDP_YCBCR_FORMAT_NV12
;
sys
->
chroma
=
VLC_CODEC_NV12
;
}
else
{
msg_Err
(
va
,
"video surface reading not supported: %s as %s"
,
"YUV 4:2:0"
,
"YV12"
);
msg_Err
(
va
,
"video surface reading not supported: %s"
,
"YUV 4:2:0"
);
goto
error
;
}
...
...
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