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
9ce72981
Commit
9ce72981
authored
Nov 26, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pf_mem{set,cpy} when possible
parent
3fada58d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
45 deletions
+60
-45
modules/video_filter/colorthres.c
modules/video_filter/colorthres.c
+10
-8
modules/video_filter/gradient.c
modules/video_filter/gradient.c
+3
-2
modules/video_filter/magnify.c
modules/video_filter/magnify.c
+16
-14
modules/video_filter/mosaic.c
modules/video_filter/mosaic.c
+1
-1
modules/video_filter/psychedelic.c
modules/video_filter/psychedelic.c
+4
-2
modules/video_filter/puzzle.c
modules/video_filter/puzzle.c
+18
-14
modules/video_filter/ripple.c
modules/video_filter/ripple.c
+4
-2
modules/video_filter/wave.c
modules/video_filter/wave.c
+4
-2
No files found.
modules/video_filter/colorthres.c
View file @
9ce72981
...
...
@@ -169,14 +169,16 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_out_v
=
p_outpic
->
p
[
V_PLANE
].
p_pixels
;
/* Create grayscale version of input */
memcpy
(
p_out_y
,
p_in_y
,
p_pic
->
p
[
Y_PLANE
].
i_visible_lines
*
p_pic
->
p
[
Y_PLANE
].
i_pitch
-
8
);
memset
(
p_out_u
,
0x80
,
p_pic
->
p
[
U_PLANE
].
i_visible_lines
*
p_pic
->
p
[
U_PLANE
].
i_pitch
-
8
);
memset
(
p_out_v
,
0x80
,
p_pic
->
p
[
U_PLANE
].
i_visible_lines
*
p_pic
->
p
[
U_PLANE
].
i_pitch
-
8
);
p_filter
->
p_libvlc
->
pf_memcpy
(
p_out_y
,
p_in_y
,
p_pic
->
p
[
Y_PLANE
].
i_visible_lines
*
p_pic
->
p
[
Y_PLANE
].
i_pitch
-
8
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out_u
,
0x80
,
p_pic
->
p
[
U_PLANE
].
i_visible_lines
*
p_pic
->
p
[
U_PLANE
].
i_pitch
-
8
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out_v
,
0x80
,
p_pic
->
p
[
U_PLANE
].
i_visible_lines
*
p_pic
->
p
[
U_PLANE
].
i_pitch
-
8
);
/*
* Do the U and V planes
*/
...
...
modules/video_filter/gradient.c
View file @
9ce72981
...
...
@@ -501,7 +501,7 @@ static void FilterEdge( filter_t *p_filter, picture_t *p_inpic,
p_outpic
->
p
[
Y_PLANE
].
i_lines
*
p_outpic
->
p
[
Y_PLANE
].
i_pitch
);
p_filter
->
p_libvlc
->
pf_memset
(
p_outpic
->
p
[
U_PLANE
].
p_pixels
,
0x80
,
p_outpic
->
p
[
U_PLANE
].
i_lines
*
p_outpic
->
p
[
U_PLANE
].
i_pitch
);
memset
(
p_outpic
->
p
[
V_PLANE
].
p_pixels
,
0x80
,
p_filter
->
p_libvlc
->
pf_
memset
(
p_outpic
->
p
[
V_PLANE
].
p_pixels
,
0x80
,
p_outpic
->
p
[
V_PLANE
].
i_lines
*
p_outpic
->
p
[
V_PLANE
].
i_pitch
);
}
...
...
@@ -658,7 +658,8 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic,
msg_Dbg
(
p_filter
,
"Precalculation done"
);
}
memset
(
p_hough
,
0
,
i_diag
*
i_nb_steps
*
sizeof
(
int
)
);
p_filter
->
p_libvlc
->
pf_memset
(
p_hough
,
0
,
i_diag
*
i_nb_steps
*
sizeof
(
int
)
);
p_filter
->
p_libvlc
->
pf_memcpy
(
p_outpic
->
p
[
Y_PLANE
].
p_pixels
,
p_inpic
->
p
[
Y_PLANE
].
p_pixels
,
...
...
modules/video_filter/magnify.c
View file @
9ce72981
...
...
@@ -261,7 +261,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
else
{
#define copy( plane ) \
memcpy( p_outpic->p[plane].p_pixels, p_pic->p[plane].p_pixels, \
p_vout->p_libvlc-> \
pf_memcpy( p_outpic->p[plane].p_pixels, p_pic->p[plane].p_pixels, \
p_outpic->p[plane].i_lines * p_outpic->p[plane].i_pitch );
copy
(
Y_PLANE
);
copy
(
U_PLANE
);
...
...
@@ -280,7 +281,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
#define copyimage( plane ) \
for( y=0; y<p_converted->p[plane].i_visible_lines; y++) \
{ \
memcpy( p_outpic->p[plane].p_pixels+y*p_outpic->p[plane].i_pitch, \
p_vout->p_libvlc->pf_memcpy( \
p_outpic->p[plane].p_pixels+y*p_outpic->p[plane].i_pitch, \
p_converted->p[plane].p_pixels+y*p_converted->p[plane].i_pitch, \
p_converted->p[plane].i_visible_pitch ); \
}
...
...
@@ -294,9 +296,9 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
v_w
=
p_oyp
->
i_pitch
*
ZOOM_FACTOR
/
(
VIS_ZOOM
*
o_zoom
);
v_h
=
(
o_y
+
p_oyp
->
i_lines
*
ZOOM_FACTOR
/
o_zoom
)
/
VIS_ZOOM
;
/* top line */
memset
(
p_oyp
->
p_pixels
+
o_y
/
VIS_ZOOM
*
p_oyp
->
i_pitch
+
o_x
/
VIS_ZOOM
,
0xff
,
v_w
+
1
);
p_vout
->
p_libvlc
->
pf_
memset
(
p_oyp
->
p_pixels
+
o_y
/
VIS_ZOOM
*
p_oyp
->
i_pitch
+
o_x
/
VIS_ZOOM
,
0xff
,
v_w
+
1
);
for
(
y
=
o_y
/
VIS_ZOOM
+
1
;
y
<
v_h
;
y
++
)
{
...
...
@@ -310,9 +312,9 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
]
=
0xff
;
}
/* bottom line */
memset
(
p_oyp
->
p_pixels
+
v_h
*
p_oyp
->
i_pitch
+
o_x
/
VIS_ZOOM
,
0xff
,
v_w
+
1
);
p_vout
->
p_libvlc
->
pf_
memset
(
p_oyp
->
p_pixels
+
v_h
*
p_oyp
->
i_pitch
+
o_x
/
VIS_ZOOM
,
0xff
,
v_w
+
1
);
/* */
v_h
=
p_oyp
->
i_lines
/
VIS_ZOOM
;
...
...
@@ -353,18 +355,18 @@ o o X o o o X X X X X o o X X X X o o o X X X X X o o X X X o o o X X X o o X o
if
(
p_vout
->
p_sys
->
b_visible
)
{
/* zoom gauge */
memset
(
p_oyp
->
p_pixels
+
(
v_h
+
9
)
*
p_oyp
->
i_pitch
,
0xff
,
41
);
p_vout
->
p_libvlc
->
pf_
memset
(
p_oyp
->
p_pixels
+
(
v_h
+
9
)
*
p_oyp
->
i_pitch
,
0xff
,
41
);
for
(
y
=
v_h
+
10
;
y
<
v_h
+
90
;
y
++
)
{
int
width
=
v_h
+
90
-
y
;
width
=
(
width
*
width
)
/
160
;
if
(
(
80
-
y
+
v_h
)
*
10
<
o_zoom
)
{
memset
(
p_oyp
->
p_pixels
+
y
*
p_oyp
->
i_pitch
,
0xff
,
width
);
p_vout
->
p_libvlc
->
pf_
memset
(
p_oyp
->
p_pixels
+
y
*
p_oyp
->
i_pitch
,
0xff
,
width
);
}
else
{
...
...
modules/video_filter/mosaic.c
View file @
9ce72981
...
...
@@ -699,7 +699,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
}
}
/* Gaussian convolution to make it look cleaner */
memset
(
p_a
,
0
,
2
*
i_pitch
);
p_filter
->
p_libvlc
->
pf_
memset
(
p_a
,
0
,
2
*
i_pitch
);
for
(
i
=
2
;
i
<
i_lines
-
2
;
i
++
)
{
p_a
[
i
*
i_pitch
]
=
0x00
;
...
...
modules/video_filter/psychedelic.c
View file @
9ce72981
...
...
@@ -157,9 +157,11 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
v
=
p_filter
->
p_sys
->
v
;
for
(
y
=
0
;
y
<
p_outpic
->
p
[
U_PLANE
].
i_lines
;
y
++
)
{
memset
(
p_outpic
->
p
[
U_PLANE
].
p_pixels
+
y
*
p_outpic
->
p
[
U_PLANE
].
i_pitch
,
p_filter
->
p_libvlc
->
pf_memset
(
p_outpic
->
p
[
U_PLANE
].
p_pixels
+
y
*
p_outpic
->
p
[
U_PLANE
].
i_pitch
,
u
,
p_outpic
->
p
[
U_PLANE
].
i_pitch
);
memset
(
p_outpic
->
p
[
V_PLANE
].
p_pixels
+
y
*
p_outpic
->
p
[
V_PLANE
].
i_pitch
,
p_filter
->
p_libvlc
->
pf_memset
(
p_outpic
->
p
[
V_PLANE
].
p_pixels
+
y
*
p_outpic
->
p
[
V_PLANE
].
i_pitch
,
v
,
p_outpic
->
p
[
V_PLANE
].
i_pitch
);
if
(
v
==
0
&&
u
!=
0
)
u
--
;
...
...
modules/video_filter/puzzle.c
View file @
9ce72981
...
...
@@ -373,20 +373,22 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
uint8_t
color
=
(
i_plane
==
Y_PLANE
?
0x0
:
0x80
);
for
(
;
i_row
<
i_last_row
;
i_row
++
,
i_orow
++
)
{
memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
color
,
i_pitch
/
i_cols
);
p_vout
->
p_libvlc
->
pf_memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
color
,
i_pitch
/
i_cols
);
}
}
else
{
for
(
;
i_row
<
i_last_row
;
i_row
++
,
i_orow
++
)
{
memcpy
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
p_in
->
p_pixels
+
i_orow
*
i_pitch
+
i_ocol
*
i_pitch
/
i_cols
,
i_pitch
/
i_cols
);
p_vout
->
p_libvlc
->
pf_memcpy
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
p_in
->
p_pixels
+
i_orow
*
i_pitch
+
i_ocol
*
i_pitch
/
i_cols
,
i_pitch
/
i_cols
);
}
}
}
...
...
@@ -403,9 +405,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
int
i_last_row
=
i_row
+
1
;
i_row
*=
p_in
->
i_lines
/
i_rows
;
i_last_row
*=
p_in
->
i_lines
/
i_rows
;
memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
0xff
,
i_pitch
/
i_cols
);
p_vout
->
p_libvlc
->
pf_memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
0xff
,
i_pitch
/
i_cols
);
for
(
;
i_row
<
i_last_row
;
i_row
++
)
{
p_out
->
p_pixels
[
i_row
*
i_pitch
...
...
@@ -414,9 +417,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
+
(
i_col
+
1
)
*
i_pitch
/
i_cols
-
1
]
=
0xff
;
}
i_row
--
;
memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
0xff
,
i_pitch
/
i_cols
);
p_vout
->
p_libvlc
->
pf_memset
(
p_out
->
p_pixels
+
i_row
*
i_pitch
+
i_col
*
i_pitch
/
i_cols
,
0xff
,
i_pitch
/
i_cols
);
}
if
(
p_vout
->
p_sys
->
b_finished
==
VLC_TRUE
)
...
...
modules/video_filter/ripple.c
View file @
9ce72981
...
...
@@ -176,13 +176,15 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_pic
->
p
[
i_index
].
i_visible_pitch
+
i_offset
);
p_in
-=
p_pic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
}
else
{
p_filter
->
p_libvlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_pic
->
p
[
i_index
].
i_visible_pitch
-
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out
,
black_pixel
,
i_offset
);
p_in
-=
p_pic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
}
...
...
modules/video_filter/wave.c
View file @
9ce72981
...
...
@@ -164,13 +164,15 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_pic
->
p
[
i_index
].
i_visible_pitch
+
i_offset
);
p_in
+=
p_pic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
}
else
{
p_filter
->
p_libvlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_pic
->
p
[
i_index
].
i_visible_pitch
-
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
p_filter
->
p_libvlc
->
pf_memset
(
p_out
,
black_pixel
,
i_offset
);
p_in
+=
p_pic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
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