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
3913a4ce
Commit
3913a4ce
authored
Mar 01, 2013
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.m2x.eu:vlc-gpu
parents
7639d019
30cf73d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
29 deletions
+19
-29
modules/codec/avcodec/va.h
modules/codec/avcodec/va.h
+0
-2
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+19
-27
No files found.
modules/codec/avcodec/va.h
View file @
3913a4ce
...
...
@@ -30,8 +30,6 @@ struct vlc_va_t {
char
*
description
;
vlc_object_t
*
obj
;
bool
b_direct
;
int
(
*
setup
)(
vlc_va_t
*
,
void
**
hw
,
vlc_fourcc_t
*
output
,
int
width
,
int
height
);
int
(
*
get
)(
vlc_va_t
*
,
AVFrame
*
frame
);
...
...
modules/codec/avcodec/video.c
View file @
3913a4ce
...
...
@@ -754,7 +754,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if
(
p_sys
->
p_va
&&
p_sys
->
p_ff_pic
->
opaque
)
{
p_pic
=
(
picture_t
*
)
p_sys
->
p_ff_pic
->
opaque
;
decoder_LinkPicture
(
p_dec
,
p_pic
);
if
(
p_pic
)
decoder_LinkPicture
(
p_dec
,
p_pic
);
/* Fill p_picture_t from AVVideoFrame and do chroma conversion
* if needed */
...
...
@@ -796,7 +796,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
}
/* Send decoded frame to vout */
if
(
i_pts
>
VLC_TS_INVALID
)
if
(
i_pts
>
VLC_TS_INVALID
)
{
p_pic
->
date
=
i_pts
;
...
...
@@ -999,25 +999,25 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
if
(
p_sys
->
p_va
)
{
do
{
if
(
p_dec
->
b_die
)
return
-
1
;
p_pic
=
ffmpeg_NewPictBuf
(
p_dec
,
p_sys
->
p_context
);
}
while
(
p_sys
->
p_va
->
b_direct
&&
p_pic
==
NULL
);
/* */
p_ff_pic
->
type
=
FF_BUFFER_TYPE_USER
;
#if LIBAVCODEC_VERSION_MAJOR < 54
/* FIXME what is that, should give good value */
p_ff_pic
->
age
=
256
*
256
*
256
*
64
;
// FIXME FIXME from ffmpeg
#endif
if
(
p_pic
&&
p_pic
->
format
.
i_chroma
==
VLC_CODEC_VAAPI_SURFACE
)
/* 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
* video output module.
*/
p_pic
=
ffmpeg_NewPictBuf
(
p_dec
,
p_sys
->
p_context
);
if
(
p_pic
&&
(
p_pic
->
format
.
i_chroma
==
VLC_CODEC_VAAPI_SURFACE
)
)
{
p_sys
->
p_va
->
b_direct
=
true
;
p_ff_pic
->
opaque
=
(
void
*
)
p_pic
;
p_ff_pic
->
type
=
FF_BUFFER_TYPE_USER
;
#if LIBAVCODEC_VERSION_MAJOR < 54
/* FIXME what is that, should give good value */
p_ff_pic
->
age
=
256
*
256
*
256
*
64
;
// FIXME FIXME from ffmpeg
#endif
vlc_va_Put
(
p_sys
->
p_va
,
p_ff_pic
,
p_pic
);
}
else
if
(
!
p_sys
->
p_va
->
b_direct
)
else
{
if
(
p_pic
)
picture_Release
(
p_pic
);
#ifdef HAVE_AVCODEC_VA
...
...
@@ -1029,18 +1029,10 @@ static int ffmpeg_GetFrameBuf( struct AVCodecContext *p_context,
msg_Err
(
p_dec
,
"vlc_va_Setup failed"
);
return
-
1
;
}
msg_Info
(
p_dec
,
"vlc_va_Setup"
);
#else
assert
(
0
);
#endif
/* */
p_ff_pic
->
type
=
FF_BUFFER_TYPE_USER
;
#if LIBAVCODEC_VERSION_MAJOR < 54
/* FIXME what is that, should give good value */
p_ff_pic
->
age
=
256
*
256
*
256
*
64
;
// FIXME FIXME from ffmpeg
#endif
if
(
vlc_va_Get
(
p_sys
->
p_va
,
p_ff_pic
)
)
{
msg_Err
(
p_dec
,
"vaGrabSurface failed"
);
...
...
@@ -1163,7 +1155,7 @@ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *p_context,
if
(
p_sys
->
p_va
)
{
picture_t
*
p_pic
=
(
picture_t
*
)
p_ff_pic
->
opaque
;
if
(
p_pic
&&
p_pic
->
format
.
i_chroma
==
VLC_CODEC_VAAPI_SURFACE
)
if
(
p_pic
)
decoder_UnlinkPicture
(
p_dec
,
p_pic
);
else
vlc_va_Release
(
p_sys
->
p_va
,
p_ff_pic
);
...
...
@@ -1180,8 +1172,8 @@ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *p_context,
else
{
picture_t
*
p_pic
=
(
picture_t
*
)
p_ff_pic
->
opaque
;
decoder_UnlinkPicture
(
p_dec
,
p_pic
);
if
(
p_pic
)
decoder_UnlinkPicture
(
p_dec
,
p_pic
);
}
for
(
int
i
=
0
;
i
<
4
;
i
++
)
p_ff_pic
->
data
[
i
]
=
NULL
;
...
...
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