Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e7460479
Commit
e7460479
authored
May 02, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda: minor cleanup
parent
150834c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
modules/codec/avcodec/vda.c
modules/codec/avcodec/vda.c
+18
-13
No files found.
modules/codec/avcodec/vda.c
View file @
e7460479
...
...
@@ -91,6 +91,9 @@ static void vda_Copy420YpCbCr8Planar( picture_t *p_pic,
uint8_t
*
pp_plane
[
3
];
size_t
pi_pitch
[
3
];
if
(
!
buffer
)
return
;
CVPixelBufferLockBaseAddress
(
buffer
,
0
);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
...
...
@@ -137,11 +140,10 @@ static void vda_Copy422YpCbCr8( picture_t *p_pic,
CVPixelBufferRelease
(
buffer
);
}
static
int
Setup
(
vlc_va_t
*
p_
external
,
void
**
pp_hw_ctx
,
vlc_fourcc_t
*
pi_chroma
,
static
int
Setup
(
vlc_va_t
*
external
,
void
**
pp_hw_ctx
,
vlc_fourcc_t
*
pi_chroma
,
int
i_width
,
int
i_height
)
{
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
p_external
);
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
external
);
if
(
p_va
->
hw_ctx
.
width
==
i_width
&&
p_va
->
hw_ctx
.
height
==
i_height
...
...
@@ -200,9 +202,10 @@ ok:
return
VLC_SUCCESS
;
}
static
int
Get
(
vlc_va_t
*
p_
external
,
AVFrame
*
p_ff
)
static
int
Get
(
vlc_va_t
*
external
,
AVFrame
*
p_ff
)
{
VLC_UNUSED
(
p_external
);
msg_Dbg
(
external
,
"Get"
);
VLC_UNUSED
(
external
);
/* */
for
(
int
i
=
0
;
i
<
4
;
i
++
)
...
...
@@ -217,9 +220,9 @@ static int Get( vlc_va_t *p_external, AVFrame *p_ff )
return
VLC_SUCCESS
;
}
static
int
Extract
(
vlc_va_t
*
p_
external
,
picture_t
*
p_picture
,
AVFrame
*
p_ff
)
static
int
Extract
(
vlc_va_t
*
external
,
picture_t
*
p_picture
,
AVFrame
*
p_ff
)
{
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
p_
external
);
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
external
);
CVPixelBufferRef
cv_buffer
=
(
CVPixelBufferRef
)
p_ff
->
data
[
3
];
if
(
!
cv_buffer
)
...
...
@@ -230,8 +233,10 @@ static int Extract( vlc_va_t *p_external, picture_t *p_picture, AVFrame *p_ff )
if
(
p_va
->
hw_ctx
.
cv_pix_fmt_type
==
kCVPixelFormatType_420YpCbCr8Planar
)
{
if
(
!
p_va
->
image_cache
.
buffer
)
if
(
!
p_va
->
image_cache
.
buffer
)
{
CVPixelBufferRelease
(
cv_buffer
);
return
VLC_EGENERIC
;
}
vda_Copy420YpCbCr8Planar
(
p_picture
,
cv_buffer
,
...
...
@@ -245,18 +250,18 @@ static int Extract( vlc_va_t *p_external, picture_t *p_picture, AVFrame *p_ff )
return
VLC_SUCCESS
;
}
static
void
Release
(
vlc_va_t
*
p_
external
,
AVFrame
*
p_ff
)
static
void
Release
(
vlc_va_t
*
external
,
AVFrame
*
p_ff
)
{
VLC_UNUSED
(
p_
external
);
VLC_UNUSED
(
external
);
CVPixelBufferRef
cv_buffer
=
(
CVPixelBufferRef
)
p_ff
->
data
[
3
];
if
(
cv_buffer
)
C
F
Release
(
cv_buffer
);
C
VPixelBuffer
Release
(
cv_buffer
);
}
static
void
Close
(
vlc_va_t
*
p_
external
)
static
void
Close
(
vlc_va_t
*
external
)
{
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
p_
external
);
vlc_va_vda_t
*
p_va
=
vlc_va_vda_Get
(
external
);
msg_Dbg
(
p_va
->
p_log
,
"destroying VDA decoder"
);
...
...
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