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
81f8f88d
Commit
81f8f88d
authored
Dec 11, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added picture_BlendSubpicture helper.
It blends a subpicture onto a picture.
parent
212661f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
include/vlc_picture.h
include/vlc_picture.h
+13
-0
src/libvlccore.sym
src/libvlccore.sym
+1
-0
src/misc/picture.c
src/misc/picture.c
+19
-0
No files found.
include/vlc_picture.h
View file @
81f8f88d
...
...
@@ -279,6 +279,19 @@ VLC_EXPORT( int, picture_Export, ( vlc_object_t *p_obj, block_t **pp_image, vide
*/
VLC_EXPORT
(
int
,
picture_Setup
,
(
picture_t
*
,
vlc_fourcc_t
i_chroma
,
int
i_width
,
int
i_height
,
int
i_sar_num
,
int
i_sar_den
)
);
/**
* This function will blend a given subpicture onto a picture.
*
* The subpicture and all its region must:
* - be absolute.
* - not be ephemere.
* - not have the fade flag.
* - contains only picture (no text rendering).
*/
VLC_EXPORT
(
void
,
picture_BlendSubpicture
,
(
picture_t
*
,
filter_t
*
p_blend
,
subpicture_t
*
)
);
/*****************************************************************************
* Flags used to describe the status of a picture
*****************************************************************************/
...
...
src/libvlccore.sym
View file @
81f8f88d
...
...
@@ -309,6 +309,7 @@ osd_ShowTextAbsolute
osd_ShowTextRelative
osd_Volume
path_sanitize
picture_BlendSubpicture
picture_CopyPixels
picture_Delete
picture_Export
...
...
src/misc/picture.c
View file @
81f8f88d
...
...
@@ -389,3 +389,22 @@ int picture_Export( vlc_object_t *p_obj,
return
VLC_SUCCESS
;
}
void
picture_BlendSubpicture
(
picture_t
*
dst
,
filter_t
*
blend
,
subpicture_t
*
src
)
{
assert
(
blend
&&
dst
&&
blend
->
fmt_out
.
video
.
i_chroma
==
dst
->
format
.
i_chroma
);
assert
(
src
&&
!
src
->
b_fade
&&
src
->
b_absolute
);
for
(
subpicture_region_t
*
r
=
src
->
p_region
;
r
!=
NULL
;
r
=
r
->
p_next
)
{
assert
(
r
->
p_picture
&&
r
->
i_align
==
0
);
if
(
filter_ConfigureBlend
(
blend
,
dst
->
format
.
i_width
,
dst
->
format
.
i_height
,
&
r
->
fmt
)
||
filter_Blend
(
blend
,
dst
,
r
->
i_x
,
r
->
i_y
,
r
->
p_picture
,
src
->
i_alpha
*
r
->
i_alpha
/
255
))
{
msg_Err
(
blend
,
"blending %4.4s to %4.4s failed"
,
(
char
*
)
&
blend
->
fmt_in
.
video
.
i_chroma
,
(
char
*
)
&
blend
->
fmt_out
.
video
.
i_chroma
);
}
}
}
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