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
ba939b2d
Commit
ba939b2d
authored
Jul 27, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow picture_Copy to work on different sized pictures.
parent
15335d09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
include/vlc_vout.h
include/vlc_vout.h
+2
-0
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+8
-3
No files found.
include/vlc_vout.h
View file @
ba939b2d
...
...
@@ -167,6 +167,8 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_
/**
* This function will copy the picture pixels.
* You can safely copy between pictures that do not have the same size,
* only the compatible(smaller) part will be copied.
*/
VLC_EXPORT
(
void
,
picture_CopyPixels
,
(
picture_t
*
p_dst
,
const
picture_t
*
p_src
)
);
...
...
src/video_output/vout_pictures.c
View file @
ba939b2d
...
...
@@ -1033,11 +1033,16 @@ void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src )
for
(
i
=
0
;
i
<
p_src
->
i_planes
;
i
++
)
{
const
unsigned
i_width
=
__MIN
(
p_dst
->
p
[
i
].
i_visible_pitch
,
p_src
->
p
[
i
].
i_visible_pitch
);
const
unsigned
i_height
=
__MIN
(
p_dst
->
p
[
i
].
i_visible_lines
,
p_src
->
p
[
i
].
i_visible_lines
);
if
(
p_src
->
p
[
i
].
i_pitch
==
p_dst
->
p
[
i
].
i_pitch
)
{
/* There are margins, but with the same width : perfect ! */
vlc_memcpy
(
p_dst
->
p
[
i
].
p_pixels
,
p_src
->
p
[
i
].
p_pixels
,
p_src
->
p
[
i
].
i_pitch
*
p_src
->
p
[
i
].
i_visible_lines
);
p_src
->
p
[
i
].
i_pitch
*
i_height
);
}
else
{
...
...
@@ -1049,9 +1054,9 @@ void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src )
assert
(
p_in
);
assert
(
p_out
);
for
(
i_line
=
p_src
->
p
[
i
].
i_visible_lines
;
i_line
--
;
)
for
(
i_line
=
i_height
;
i_line
--
;
)
{
vlc_memcpy
(
p_out
,
p_in
,
p_src
->
p
[
i
].
i_visible_pitc
h
);
vlc_memcpy
(
p_out
,
p_in
,
i_widt
h
);
p_in
+=
p_src
->
p
[
i
].
i_pitch
;
p_out
+=
p_dst
->
p
[
i
].
i_pitch
;
}
...
...
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