Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
613866f9
Commit
613866f9
authored
Feb 21, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: simplify VAAPI ffmpeg_GetFramebuf()
parent
44eee00d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+16
-16
No files found.
modules/codec/avcodec/video.c
View file @
613866f9
...
...
@@ -1006,6 +1006,19 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
p_ff_pic
->
age
=
256
*
256
*
256
*
64
;
// FIXME FIXME from ffmpeg
#endif
#ifdef HAVE_AVCODEC_VA
/* hwaccel_context is not present in old fffmpeg version */
if
(
vlc_va_Setup
(
p_sys
->
p_va
,
&
p_sys
->
p_context
->
hwaccel_context
,
&
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_sys
->
p_context
->
width
,
p_sys
->
p_context
->
height
)
)
{
msg_Err
(
p_dec
,
"vlc_va_Setup failed"
);
return
-
1
;
}
#else
assert
(
0
);
#endif
/* NOTE: Get first picture from video output instead of from the
* normal (non-accellerated vouts) mechanism. The drawback is that
* decoding the first pictures is delayed with the creation of the
...
...
@@ -1020,18 +1033,6 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
else
{
if
(
p_pic
)
picture_Release
(
p_pic
);
#ifdef HAVE_AVCODEC_VA
/* hwaccel_context is not present in old fffmpeg version */
if
(
vlc_va_Setup
(
p_sys
->
p_va
,
&
p_sys
->
p_context
->
hwaccel_context
,
&
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_sys
->
p_context
->
width
,
p_sys
->
p_context
->
height
)
)
{
msg_Err
(
p_dec
,
"vlc_va_Setup failed"
);
return
-
1
;
}
#else
assert
(
0
);
#endif
if
(
vlc_va_Get
(
p_sys
->
p_va
,
p_ff_pic
)
)
{
...
...
@@ -1248,10 +1249,9 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
if
(
p_sys
->
p_va
->
description
)
msg_Info
(
p_dec
,
"Using %s for hardware decoding."
,
p_sys
->
p_va
->
description
);
/* FIXME this will disabled direct rendering
* even if a new pixel format is renegociated
*/
p_sys
->
b_direct_rendering
=
false
;
p_sys
->
b_direct_rendering
=
p_sys
->
p_va
->
direct_rendering
;
msg_Info
(
p_dec
,
"VAAPI uses direct rendering: %s"
,
p_sys
->
b_direct_rendering
?
"yes"
:
"no"
);
p_context
->
draw_horiz_band
=
NULL
;
return
pi_fmt
[
i
];
}
...
...
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