Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c1bb567c
Commit
c1bb567c
authored
Aug 07, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transform: use single optimized (memcpy()) function for vflip
parent
9c6ce5b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
modules/video_filter/transform.c
modules/video_filter/transform.c
+17
-2
No files found.
modules/video_filter/transform.c
View file @
c1bb567c
...
...
@@ -132,6 +132,19 @@ static void Plane##bits##_##f(plane_t *restrict dst, const plane_t *restrict src
} \
}
static
void
Plane_VFlip
(
plane_t
*
restrict
dst
,
const
plane_t
*
restrict
src
)
{
const
uint8_t
*
src_pixels
=
src
->
p_pixels
;
uint8_t
*
restrict
dst_pixels
=
dst
->
p_pixels
;
dst_pixels
+=
dst
->
i_pitch
*
dst
->
i_visible_lines
;
for
(
int
y
=
0
;
y
<
dst
->
i_visible_lines
;
y
++
)
{
dst_pixels
-=
dst
->
i_pitch
;
memcpy
(
dst_pixels
,
src_pixels
,
dst
->
i_visible_pitch
);
src_pixels
+=
src
->
i_pitch
;
}
}
#define YUY2(f) \
static void PlaneYUY2_##f(plane_t *restrict dst, const plane_t *restrict src) \
{ \
...
...
@@ -171,7 +184,9 @@ static void PlaneYUY2_##f(plane_t *restrict dst, const plane_t *restrict src) \
PLANE(f,8) PLANE(f,16) PLANE(f,32)
PLANES
(
HFlip
)
PLANES
(
VFlip
)
#define Plane8_VFlip Plane_VFlip
#define Plane16_VFlip Plane_VFlip
#define Plane32_VFlip Plane_VFlip
PLANES
(
Transpose
)
PLANES
(
AntiTranspose
)
PLANES
(
R90
)
...
...
@@ -179,7 +194,7 @@ PLANES(R180)
PLANES
(
R270
)
#define PlaneYUY2_HFlip Plane32_HFlip
#define PlaneYUY2_VFlip Plane
32
_VFlip
#define PlaneYUY2_VFlip Plane_VFlip
#define PlaneYUY2_R180 Plane32_R180
YUY2
(
Transpose
)
YUY2
(
AntiTranspose
)
...
...
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