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
00a30b7b
Commit
00a30b7b
authored
Jan 09, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/video_filter/*.c: all filters now properly use i_visible_pitch
instead of i_pitch for pixel access (Closes: #30).
parent
b7529857
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
210 additions
and
152 deletions
+210
-152
modules/video_filter/adjust.c
modules/video_filter/adjust.c
+24
-23
modules/video_filter/clone.c
modules/video_filter/clone.c
+20
-12
modules/video_filter/crop.c
modules/video_filter/crop.c
+22
-21
modules/video_filter/distort.c
modules/video_filter/distort.c
+28
-27
modules/video_filter/invert.c
modules/video_filter/invert.c
+34
-25
modules/video_filter/motionblur.c
modules/video_filter/motionblur.c
+59
-31
modules/video_filter/transform.c
modules/video_filter/transform.c
+12
-3
modules/video_filter/wall.c
modules/video_filter/wall.c
+11
-10
No files found.
modules/video_filter/adjust.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: adjust.c,v 1.
7 2003/01/09 16:26:14
sam Exp $
* $Id: adjust.c,v 1.
8 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Simon Latapie <garf@via.ecp.fr>, Samuel Hocevar <sam@zoy.org>
* Authors: Simon Latapie <garf@via.ecp.fr>, Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -195,8 +195,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -195,8 +195,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
int
pi_luma
[
256
];
int
pi_luma
[
256
];
picture_t
*
p_outpic
;
picture_t
*
p_outpic
;
uint8_t
*
p_in
,
*
p_in_
u
,
*
p_in_
v
,
*
p_in_end
,
*
p_line_end
;
uint8_t
*
p_in
,
*
p_in_v
,
*
p_in_end
,
*
p_line_end
;
uint8_t
*
p_out
,
*
p_out_
u
,
*
p_out_
v
;
uint8_t
*
p_out
,
*
p_out_v
;
double
f_hue
;
double
f_hue
;
int32_t
i_cont
,
i_lum
;
int32_t
i_cont
,
i_lum
;
...
@@ -263,17 +263,18 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -263,17 +263,18 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
}
}
p_in
+=
p_pic
->
p
[
0
].
i_pitch
-
p_pic
->
p
[
0
].
i_visible_pitch
;
p_in
+=
p_pic
->
p
[
0
].
i_pitch
-
p_pic
->
p
[
0
].
i_visible_pitch
;
p_out
+=
p_outpic
->
p
[
0
].
i_pitch
-
p_outpic
->
p
[
0
].
i_visible_pitch
;
}
}
/*
/*
* Do the U and V planes
* Do the U and V planes
*/
*/
p_in
_u
=
p_pic
->
p
[
1
].
p_pixels
;
p_in
=
p_pic
->
p
[
1
].
p_pixels
;
p_in_v
=
p_pic
->
p
[
2
].
p_pixels
;
p_in_v
=
p_pic
->
p
[
2
].
p_pixels
;
p_in_end
=
p_in
_u
+
p_pic
->
p
[
1
].
i_lines
*
p_pic
->
p
[
1
].
i_pitch
-
8
;
p_in_end
=
p_in
+
p_pic
->
p
[
1
].
i_lines
*
p_pic
->
p
[
1
].
i_pitch
-
8
;
p_out
_u
=
p_outpic
->
p
[
1
].
p_pixels
;
p_out
=
p_outpic
->
p
[
1
].
p_pixels
;
p_out_v
=
p_outpic
->
p
[
2
].
p_pixels
;
p_out_v
=
p_outpic
->
p
[
2
].
p_pixels
;
i_sin
=
sin
(
f_hue
)
*
256
;
i_sin
=
sin
(
f_hue
)
*
256
;
...
@@ -285,19 +286,19 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -285,19 +286,19 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
if
(
i_sat
>
256
)
if
(
i_sat
>
256
)
{
{
#define WRITE_UV_CLIP() \
#define WRITE_UV_CLIP() \
i_u = *p_in
_u
++ ; i_v = *p_in_v++ ; \
i_u = *p_in++ ; i_v = *p_in_v++ ; \
*p_out
_u
++ = clip( (( ((i_u * i_cos + i_v * i_sin - i_x) >> 8) \
*p_out++ = clip( (( ((i_u * i_cos + i_v * i_sin - i_x) >> 8) \
* i_sat) >> 8) + 128); \
* i_sat) >> 8) + 128); \
*p_out_v++ = clip( (( ((i_v * i_cos - i_u * i_sin - i_y) >> 8) \
*p_out_v++ = clip( (( ((i_v * i_cos - i_u * i_sin - i_y) >> 8) \
* i_sat) >> 8) + 128)
* i_sat) >> 8) + 128)
uint8_t
i_u
,
i_v
;
uint8_t
i_u
,
i_v
;
for
(
;
p_in
_u
<
p_in_end
;
)
for
(
;
p_in
<
p_in_end
;
)
{
{
p_line_end
=
p_in
_u
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
p_line_end
=
p_in
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
for
(
;
p_in
_u
<
p_line_end
;
)
for
(
;
p_in
<
p_line_end
;
)
{
{
/* Do 8 pixels at a time */
/* Do 8 pixels at a time */
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
...
@@ -308,33 +309,33 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -308,33 +309,33 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
p_line_end
+=
8
;
p_line_end
+=
8
;
for
(
;
p_in
_u
<
p_line_end
;
)
for
(
;
p_in
<
p_line_end
;
)
{
{
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
}
}
p_in
_u
+=
p_pic
->
p
[
1
].
i_pitch
-
p_pic
->
p
[
1
].
i_visible_pitch
;
p_in
+=
p_pic
->
p
[
1
].
i_pitch
-
p_pic
->
p
[
1
].
i_visible_pitch
;
p_in_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
p_in_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
p_out
_u
+=
p_pic
->
p
[
1
].
i_pitch
-
p_
pic
->
p
[
1
].
i_visible_pitch
;
p_out
+=
p_outpic
->
p
[
1
].
i_pitch
-
p_out
pic
->
p
[
1
].
i_visible_pitch
;
p_out_v
+=
p_
pic
->
p
[
2
].
i_pitch
-
p_
pic
->
p
[
2
].
i_visible_pitch
;
p_out_v
+=
p_
outpic
->
p
[
2
].
i_pitch
-
p_out
pic
->
p
[
2
].
i_visible_pitch
;
}
}
}
}
else
else
{
{
#define WRITE_UV() \
#define WRITE_UV() \
i_u = *p_in
_u
++ ; i_v = *p_in_v++ ; \
i_u = *p_in++ ; i_v = *p_in_v++ ; \
*p_out
_u
++ = (( ((i_u * i_cos + i_v * i_sin - i_x) >> 8) \
*p_out++ = (( ((i_u * i_cos + i_v * i_sin - i_x) >> 8) \
* i_sat) >> 8) + 128; \
* i_sat) >> 8) + 128; \
*p_out_v++ = (( ((i_v * i_cos - i_u * i_sin - i_y) >> 8) \
*p_out_v++ = (( ((i_v * i_cos - i_u * i_sin - i_y) >> 8) \
* i_sat) >> 8) + 128
* i_sat) >> 8) + 128
uint8_t
i_u
,
i_v
;
uint8_t
i_u
,
i_v
;
for
(
;
p_in
_u
<
p_in_end
;
)
for
(
;
p_in
<
p_in_end
;
)
{
{
p_line_end
=
p_in
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
p_line_end
=
p_in
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
for
(
;
p_in
_u
<
p_line_end
;
)
for
(
;
p_in
<
p_line_end
;
)
{
{
/* Do 8 pixels at a time */
/* Do 8 pixels at a time */
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
...
@@ -343,15 +344,15 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -343,15 +344,15 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
p_line_end
+=
8
;
p_line_end
+=
8
;
for
(
;
p_in
_u
<
p_line_end
;
)
for
(
;
p_in
<
p_line_end
;
)
{
{
WRITE_UV
();
WRITE_UV
();
}
}
p_in
_u
+=
p_pic
->
p
[
1
].
i_pitch
-
p_pic
->
p
[
1
].
i_visible_pitch
;
p_in
+=
p_pic
->
p
[
1
].
i_pitch
-
p_pic
->
p
[
1
].
i_visible_pitch
;
p_in_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
p_in_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
p_out
_u
+=
p_pic
->
p
[
1
].
i_pitch
-
p_
pic
->
p
[
1
].
i_visible_pitch
;
p_out
+=
p_outpic
->
p
[
1
].
i_pitch
-
p_out
pic
->
p
[
1
].
i_visible_pitch
;
p_out_v
+=
p_
pic
->
p
[
2
].
i_pitch
-
p_
pic
->
p
[
2
].
i_visible_pitch
;
p_out_v
+=
p_
outpic
->
p
[
2
].
i_pitch
-
p_out
pic
->
p
[
2
].
i_visible_pitch
;
}
}
}
}
...
...
modules/video_filter/clone.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* clone.c : Clone video plugin for vlc
* clone.c : Clone video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: clone.c,v 1.
3 2002/11/28 17:35:00
sam Exp $
* $Id: clone.c,v 1.
4 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -121,7 +121,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -121,7 +121,7 @@ static int Init( vout_thread_t *p_vout )
{
{
int
i_index
,
i_vout
;
int
i_index
,
i_vout
;
picture_t
*
p_pic
;
picture_t
*
p_pic
;
I_OUTPUTPICTURES
=
0
;
I_OUTPUTPICTURES
=
0
;
/* Initialize the output structure */
/* Initialize the output structure */
...
@@ -217,22 +217,30 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -217,22 +217,30 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
{
u
8
*
p_in
,
*
p_in_end
,
*
p_out
;
u
int8_t
*
p_in
,
*
p_in_end
,
*
p_out
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
const
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
const
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
const
int
i_copy_pitch
=
p_outpic
->
p
[
i_plane
].
i_visible_pitch
;
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
;
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
;
p_in_end
=
p_in
+
p_outpic
->
p
[
i_plane
].
i_lines
*
p_pic
->
p
[
i_plane
].
i_pitch
;
p_out
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
while
(
p_in
<
p_in_end
)
if
(
i_in_pitch
==
i_copy_pitch
&&
i_out_pitch
==
i_copy_pitch
)
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_in_pitch
*
p_outpic
->
p
[
i_plane
].
i_lines
);
}
else
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_out_pitch
);
p_in_end
=
p_in
+
i_in_pitch
*
p_outpic
->
p
[
i_plane
].
i_lines
;
p_in
+=
i_in_pitch
;
p_out
+=
i_out_pitch
;
while
(
p_in
<
p_in_end
)
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_copy_pitch
);
p_in
+=
i_in_pitch
;
p_out
+=
i_out_pitch
;
}
}
}
}
}
...
...
modules/video_filter/crop.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* crop.c : Crop video plugin for vlc
* crop.c : Crop video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: crop.c,v 1.
5 2002/12/06 16:34:07
sam Exp $
* $Id: crop.c,v 1.
6 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -98,7 +98,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -98,7 +98,7 @@ static int Create( vlc_object_t *p_this )
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
return
1
;
return
VLC_ENOMEM
;
}
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
...
@@ -107,7 +107,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -107,7 +107,7 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_render
=
Render
;
p_vout
->
pf_render
=
Render
;
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_display
=
NULL
;
return
0
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -118,11 +118,11 @@ static int Init( vout_thread_t *p_vout )
...
@@ -118,11 +118,11 @@ static int Init( vout_thread_t *p_vout )
int
i_index
;
int
i_index
;
char
*
psz_var
;
char
*
psz_var
;
picture_t
*
p_pic
;
picture_t
*
p_pic
;
I_OUTPUTPICTURES
=
0
;
I_OUTPUTPICTURES
=
0
;
p_vout
->
p_sys
->
i_lastchange
=
0
;
p_vout
->
p_sys
->
i_lastchange
=
0
;
p_vout
->
p_sys
->
b_changed
=
0
;
p_vout
->
p_sys
->
b_changed
=
VLC_FALSE
;
/* Initialize the output structure */
/* Initialize the output structure */
p_vout
->
output
.
i_chroma
=
p_vout
->
render
.
i_chroma
;
p_vout
->
output
.
i_chroma
=
p_vout
->
render
.
i_chroma
;
...
@@ -238,12 +238,12 @@ static int Init( vout_thread_t *p_vout )
...
@@ -238,12 +238,12 @@ static int Init( vout_thread_t *p_vout )
if
(
p_vout
->
p_sys
->
p_vout
==
NULL
)
if
(
p_vout
->
p_sys
->
p_vout
==
NULL
)
{
{
msg_Err
(
p_vout
,
"failed to create vout"
);
msg_Err
(
p_vout
,
"failed to create vout"
);
return
0
;
return
VLC_EGENERIC
;
}
}
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
return
0
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -284,7 +284,7 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -284,7 +284,7 @@ static int Manage( vout_thread_t *p_vout )
{
{
if
(
!
p_vout
->
p_sys
->
b_changed
)
if
(
!
p_vout
->
p_sys
->
b_changed
)
{
{
return
0
;
return
VLC_SUCCESS
;
}
}
vout_Destroy
(
p_vout
->
p_sys
->
p_vout
);
vout_Destroy
(
p_vout
->
p_sys
->
p_vout
);
...
@@ -295,13 +295,13 @@ static int Manage( vout_thread_t *p_vout )
...
@@ -295,13 +295,13 @@ static int Manage( vout_thread_t *p_vout )
if
(
p_vout
->
p_sys
->
p_vout
==
NULL
)
if
(
p_vout
->
p_sys
->
p_vout
==
NULL
)
{
{
msg_Err
(
p_vout
,
"failed to create vout"
);
msg_Err
(
p_vout
,
"failed to create vout"
);
return
1
;
return
VLC_EGENERIC
;
}
}
p_vout
->
p_sys
->
b_changed
=
0
;
p_vout
->
p_sys
->
b_changed
=
VLC_FALSE
;
p_vout
->
p_sys
->
i_lastchange
=
0
;
p_vout
->
p_sys
->
i_lastchange
=
0
;
return
0
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -339,9 +339,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -339,9 +339,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
{
u
8
*
p_in
,
*
p_out
,
*
p_out_end
;
u
int8_t
*
p_in
,
*
p_out
,
*
p_out_end
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
const
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
const
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
const
int
i_copy_pitch
=
p_outpic
->
p
[
i_plane
].
i_visible_pitch
;
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
/* Skip the right amount of lines */
/* Skip the right amount of lines */
...
@@ -355,7 +356,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -355,7 +356,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
while
(
p_out
<
p_out_end
)
while
(
p_out
<
p_out_end
)
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_
out
_pitch
);
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_
copy
_pitch
);
p_in
+=
i_in_pitch
;
p_in
+=
i_in_pitch
;
p_out
+=
i_out_pitch
;
p_out
+=
i_out_pitch
;
}
}
...
@@ -365,18 +366,17 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -365,18 +366,17 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
vout_DisplayPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
vout_DisplayPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
/* The source image may still be in the cache ... parse it! */
/* The source image may still be in the cache ... parse it! */
if
(
!
p_vout
->
p_sys
->
b_autocrop
)
if
(
p_vout
->
p_sys
->
b_autocrop
)
{
{
return
;
UpdateStats
(
p_vout
,
p_pic
)
;
}
}
UpdateStats
(
p_vout
,
p_pic
);
}
}
static
void
UpdateStats
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
static
void
UpdateStats
(
vout_thread_t
*
p_vout
,
picture_t
*
p_pic
)
{
{
uint8_t
*
p_in
=
p_pic
->
p
[
0
].
p_pixels
;
uint8_t
*
p_in
=
p_pic
->
p
[
0
].
p_pixels
;
int
i_pitch
=
p_pic
->
p
[
0
].
i_pitch
;
int
i_pitch
=
p_pic
->
p
[
0
].
i_pitch
;
int
i_visible_pitch
=
p_pic
->
p
[
0
].
i_visible_pitch
;
int
i_lines
=
p_pic
->
p
[
0
].
i_lines
;
int
i_lines
=
p_pic
->
p
[
0
].
i_lines
;
int
i_firstwhite
=
-
1
,
i_lastwhite
=
-
1
,
i
;
int
i_firstwhite
=
-
1
,
i_lastwhite
=
-
1
,
i
;
...
@@ -391,8 +391,8 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -391,8 +391,8 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
const
int
i_col
=
i
*
i_pitch
/
i_lines
;
const
int
i_col
=
i
*
i_pitch
/
i_lines
;
if
(
p_in
[
i_col
/
2
]
>
40
if
(
p_in
[
i_col
/
2
]
>
40
&&
p_in
[
i_
pitch
/
2
]
>
40
&&
p_in
[
i_
visible_pitch
/
2
]
>
40
&&
p_in
[
i_pitch
/
2
+
i_col
/
2
]
>
40
)
&&
p_in
[
i_
visible_
pitch
/
2
+
i_col
/
2
]
>
40
)
{
{
if
(
i_lastwhite
==
-
1
)
if
(
i_lastwhite
==
-
1
)
{
{
...
@@ -457,5 +457,6 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -457,5 +457,6 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
*
p_vout
->
output
.
i_height
/
p_vout
->
p_sys
->
i_height
*
p_vout
->
output
.
i_height
/
p_vout
->
p_sys
->
i_height
*
p_vout
->
p_sys
->
i_width
/
p_vout
->
output
.
i_width
;
*
p_vout
->
p_sys
->
i_width
/
p_vout
->
output
.
i_width
;
p_vout
->
p_sys
->
b_changed
=
1
;
p_vout
->
p_sys
->
b_changed
=
VLC_TRUE
;
}
}
modules/video_filter/distort.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* distort.c : Misc video effects plugin for vlc
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: distort.c,v 1.
4 2002/11/28 17:35:00
sam Exp $
* $Id: distort.c,v 1.
5 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -99,7 +99,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -99,7 +99,7 @@ static int Create( vlc_object_t *p_this )
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
return
(
1
)
;
return
VLC_ENOMEM
;
}
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
...
@@ -113,7 +113,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -113,7 +113,7 @@ static int Create( vlc_object_t *p_this )
if
(
!
(
psz_method
=
psz_method_tmp
=
config_GetPsz
(
p_vout
,
"filter"
))
)
if
(
!
(
psz_method
=
psz_method_tmp
=
config_GetPsz
(
p_vout
,
"filter"
))
)
{
{
msg_Err
(
p_vout
,
"configuration variable %s empty"
,
"filter"
);
msg_Err
(
p_vout
,
"configuration variable %s empty"
,
"filter"
);
return
(
1
)
;
return
VLC_EGENERIC
;
}
}
while
(
*
psz_method
&&
*
psz_method
!=
':'
)
while
(
*
psz_method
&&
*
psz_method
!=
':'
)
{
{
...
@@ -141,7 +141,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -141,7 +141,7 @@ static int Create( vlc_object_t *p_this )
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_WAVE
;
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_WAVE
;
}
}
else
{
else
{
if
(
!
strcmp
(
psz_method
,
"wave"
)
)
if
(
!
strcmp
(
psz_method
,
"wave"
)
)
{
{
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_WAVE
;
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_WAVE
;
...
@@ -150,7 +150,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -150,7 +150,6 @@ static int Create( vlc_object_t *p_this )
{
{
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_RIPPLE
;
p_vout
->
p_sys
->
i_mode
=
DISTORT_MODE_RIPPLE
;
}
}
else
else
{
{
msg_Err
(
p_vout
,
"no valid distort mode provided, "
msg_Err
(
p_vout
,
"no valid distort mode provided, "
...
@@ -160,10 +159,10 @@ static int Create( vlc_object_t *p_this )
...
@@ -160,10 +159,10 @@ static int Create( vlc_object_t *p_this )
}
}
}
}
free
(
psz_method_tmp
);
free
(
psz_method_tmp
);
return
(
0
)
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
* Init: initialize Distort video thread output method
* Init: initialize Distort video thread output method
*****************************************************************************/
*****************************************************************************/
...
@@ -192,7 +191,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -192,7 +191,7 @@ static int Init( vout_thread_t *p_vout )
{
{
msg_Err
(
p_vout
,
"cannot open vout, aborting"
);
msg_Err
(
p_vout
,
"cannot open vout, aborting"
);
return
(
0
)
;
return
VLC_EGENERIC
;
}
}
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
...
@@ -200,7 +199,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -200,7 +199,7 @@ static int Init( vout_thread_t *p_vout )
p_vout
->
p_sys
->
f_angle
=
0
.
0
;
p_vout
->
p_sys
->
f_angle
=
0
.
0
;
p_vout
->
p_sys
->
last_date
=
0
;
p_vout
->
p_sys
->
last_date
=
0
;
return
(
0
)
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -290,8 +289,8 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -290,8 +289,8 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
for
(
i_index
=
0
;
i_index
<
p_inpic
->
i_planes
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_inpic
->
i_planes
;
i_index
++
)
{
{
int
i_line
,
i_num_lines
,
i_offset
;
int
i_line
,
i_num_lines
,
i_offset
;
u
8
black_pixel
;
u
int8_t
black_pixel
;
u
8
*
p_in
,
*
p_out
;
u
int8_t
*
p_in
,
*
p_out
;
p_in
=
p_inpic
->
p
[
i_index
].
p_pixels
;
p_in
=
p_inpic
->
p
[
i_index
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
...
@@ -304,7 +303,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -304,7 +303,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
for
(
i_line
=
0
;
i_line
<
i_num_lines
;
i_line
++
)
for
(
i_line
=
0
;
i_line
<
i_num_lines
;
i_line
++
)
{
{
/* Calculate today's offset, don't go above 1/20th of the screen */
/* Calculate today's offset, don't go above 1/20th of the screen */
i_offset
=
(
int
)(
(
double
)(
p_inpic
->
p
[
i_index
].
i_pitch
)
i_offset
=
(
int
)(
(
double
)(
p_inpic
->
p
[
i_index
].
i_
visible_
pitch
)
*
sin
(
f_angle
+
10
.
0
*
(
double
)
i_line
*
sin
(
f_angle
+
10
.
0
*
(
double
)
i_line
/
(
double
)
i_num_lines
)
/
(
double
)
i_num_lines
)
/
20
.
0
);
/
20
.
0
);
...
@@ -314,7 +313,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -314,7 +313,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
if
(
i_offset
<
0
)
if
(
i_offset
<
0
)
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
-
i_offset
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
-
i_offset
,
p_inpic
->
p
[
i_index
].
i
_pitch
+
i_offset
);
p_inpic
->
p
[
i_index
].
i_visible
_pitch
+
i_offset
);
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
...
@@ -322,7 +321,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -322,7 +321,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
else
else
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_inpic
->
p
[
i_index
].
i
_pitch
-
i_offset
);
p_inpic
->
p
[
i_index
].
i_visible
_pitch
-
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
...
@@ -331,7 +330,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -331,7 +330,7 @@ static void DistortWave( vout_thread_t *p_vout, picture_t *p_inpic,
else
else
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_inpic
->
p
[
i_index
].
i_pitch
);
p_inpic
->
p
[
i_index
].
i_
visible_
pitch
);
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
}
}
...
@@ -357,8 +356,8 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -357,8 +356,8 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
for
(
i_index
=
0
;
i_index
<
p_inpic
->
i_planes
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_inpic
->
i_planes
;
i_index
++
)
{
{
int
i_line
,
i_first_line
,
i_num_lines
,
i_offset
;
int
i_line
,
i_first_line
,
i_num_lines
,
i_offset
;
u
8
black_pixel
;
u
int8_t
black_pixel
;
u
8
*
p_in
,
*
p_out
;
u
int8_t
*
p_in
,
*
p_out
;
black_pixel
=
(
i_index
==
Y_PLANE
)
?
0x00
:
0x80
;
black_pixel
=
(
i_index
==
Y_PLANE
)
?
0x00
:
0x80
;
...
@@ -369,11 +368,13 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -369,11 +368,13 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
p_in
=
p_inpic
->
p
[
i_index
].
p_pixels
;
p_in
=
p_inpic
->
p
[
i_index
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
for
(
i_line
=
0
;
i_line
<
i_first_line
;
i_line
++
)
i_first_line
*
p_inpic
->
p
[
i_index
].
i_pitch
);
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_in
+=
i_first_line
*
p_inpic
->
p
[
i_index
].
i_pitch
;
p_inpic
->
p
[
i_index
].
i_visible_pitch
);
p_out
+=
i_first_line
*
p_outpic
->
p
[
i_index
].
i_pitch
;
p_in
+=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
}
/* Ok, we do 3 times the sin() calculation for each line. So what ? */
/* Ok, we do 3 times the sin() calculation for each line. So what ? */
for
(
i_line
=
i_first_line
;
i_line
<
i_num_lines
;
i_line
++
)
for
(
i_line
=
i_first_line
;
i_line
<
i_num_lines
;
i_line
++
)
...
@@ -392,7 +393,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -392,7 +393,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
if
(
i_offset
<
0
)
if
(
i_offset
<
0
)
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
-
i_offset
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
-
i_offset
,
p_inpic
->
p
[
i_index
].
i
_pitch
+
i_offset
);
p_inpic
->
p
[
i_index
].
i_visible
_pitch
+
i_offset
);
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
memset
(
p_out
+
i_offset
,
black_pixel
,
-
i_offset
);
...
@@ -400,7 +401,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -400,7 +401,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
else
else
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
+
i_offset
,
p_in
,
p_inpic
->
p
[
i_index
].
i
_pitch
-
i_offset
);
p_inpic
->
p
[
i_index
].
i_visible
_pitch
-
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
memset
(
p_out
,
black_pixel
,
i_offset
);
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
...
@@ -409,7 +410,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -409,7 +410,7 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
else
else
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_inpic
->
p
[
i_index
].
i_pitch
);
p_inpic
->
p
[
i_index
].
i_
visible_
pitch
);
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_in
-=
p_inpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
;
}
}
...
...
modules/video_filter/invert.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* invert.c : Invert video plugin for vlc
* invert.c : Invert video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: invert.c,v 1.
3 2002/11/28 17:35:00
sam Exp $
* $Id: invert.c,v 1.
4 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -119,7 +119,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -119,7 +119,7 @@ static int Init( vout_thread_t *p_vout )
return
(
0
);
return
(
0
);
}
}
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
return
(
0
);
return
(
0
);
...
@@ -146,7 +146,7 @@ static void End( vout_thread_t *p_vout )
...
@@ -146,7 +146,7 @@ static void End( vout_thread_t *p_vout )
* Terminate an output method created by InvertCreateOutputMethod
* Terminate an output method created by InvertCreateOutputMethod
*****************************************************************************/
*****************************************************************************/
static
void
Destroy
(
vlc_object_t
*
p_this
)
static
void
Destroy
(
vlc_object_t
*
p_this
)
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_Destroy
(
p_vout
->
p_sys
->
p_vout
);
vout_Destroy
(
p_vout
->
p_sys
->
p_vout
);
...
@@ -175,40 +175,49 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -175,40 +175,49 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
return
;
return
;
}
}
msleep
(
VOUT_OUTMEM_SLEEP
);
msleep
(
VOUT_OUTMEM_SLEEP
);
}
}
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
);
vout_DatePicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
,
p_pic
->
date
);
vout_LinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
vout_LinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
for
(
i_index
=
0
;
i_index
<
p_pic
->
i_planes
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_pic
->
i_planes
;
i_index
++
)
{
{
u
8
*
p_in
,
*
p_in
_end
,
*
p_out
;
u
int8_t
*
p_in
,
*
p_in_end
,
*
p_line
_end
,
*
p_out
;
p_in
=
p_pic
->
p
[
i_index
].
p_pixels
;
p_in
=
p_pic
->
p
[
i_index
].
p_pixels
;
p_in_end
=
p_in
-
64
+
p_pic
->
p
[
i_index
].
i_lines
p_in_end
=
p_in
+
p_pic
->
p
[
i_index
].
i_lines
*
p_pic
->
p
[
i_index
].
i_pitch
;
*
p_pic
->
p
[
i_index
].
i_pitch
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_index
].
p_pixels
;
for
(
;
p_in
<
p_in_end
;
)
for
(
;
p_in
<
p_in_end
;
)
{
{
/* Do 64 pixels at a time */
p_line_end
=
p_in
+
p_pic
->
p
[
i_index
].
i_visible_pitch
-
64
;
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
for
(
;
p_in
<
p_line_end
;
)
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
{
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
/* Do 64 pixels at a time */
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
*
((
u64
*
)
p_out
)
++
=
~
(
*
((
u64
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
}
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
p_in_end
+=
64
;
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
*
((
uint64_t
*
)
p_out
)
++
=
~
(
*
((
uint64_t
*
)
p_in
)
++
);
for
(
;
p_in
<
p_in_end
;
)
}
{
/* Do 1 pixel at a time */
p_line_end
+=
64
;
*
p_out
++
=
~
(
*
p_in
++
);
for
(
;
p_in
<
p_line_end
;
)
{
*
p_out
++
=
~
(
*
p_in
++
);
}
p_in
+=
p_pic
->
p
[
i_index
].
i_pitch
-
p_pic
->
p
[
i_index
].
i_visible_pitch
;
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
-
p_outpic
->
p
[
i_index
].
i_visible_pitch
;
}
}
}
}
...
...
modules/video_filter/motionblur.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* motion_blur.c : motion blur filter for vlc
* motion_blur.c : motion blur filter for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: motionblur.c,v 1.
4 2002/11/28 17:35:00
sam Exp $
* $Id: motionblur.c,v 1.
5 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -83,7 +83,7 @@ struct vout_sys_t
...
@@ -83,7 +83,7 @@ struct vout_sys_t
* This function allocates and initializes a Deinterlace vout method.
* This function allocates and initializes a Deinterlace vout method.
*****************************************************************************/
*****************************************************************************/
static
int
Create
(
vlc_object_t
*
p_this
)
static
int
Create
(
vlc_object_t
*
p_this
)
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
/* Allocate structure */
/* Allocate structure */
...
@@ -91,7 +91,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -91,7 +91,7 @@ static int Create( vlc_object_t *p_this )
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
return
1
;
return
VLC_ENOMEM
;
}
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
...
@@ -105,7 +105,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -105,7 +105,7 @@ static int Create( vlc_object_t *p_this )
p_vout
->
p_sys
->
last_date
=
0
;
p_vout
->
p_sys
->
last_date
=
0
;
p_vout
->
p_sys
->
p_lastpic
=
NULL
;
p_vout
->
p_sys
->
p_lastpic
=
NULL
;
return
0
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -115,7 +115,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -115,7 +115,7 @@ static int Init( vout_thread_t *p_vout )
{
{
int
i_index
;
int
i_index
;
picture_t
*
p_pic
;
picture_t
*
p_pic
;
I_OUTPUTPICTURES
=
0
;
I_OUTPUTPICTURES
=
0
;
/* Initialize the output structure, full of directbuffers since we want
/* Initialize the output structure, full of directbuffers since we want
...
@@ -133,7 +133,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -133,7 +133,7 @@ static int Init( vout_thread_t *p_vout )
break
;
break
;
default:
default:
return
0
;
/* unknown chroma */
return
VLC_EGENERIC
;
/* unknown chroma */
break
;
break
;
}
}
...
@@ -157,12 +157,12 @@ static int Init( vout_thread_t *p_vout )
...
@@ -157,12 +157,12 @@ static int Init( vout_thread_t *p_vout )
{
{
msg_Err
(
p_vout
,
"cannot open vout, aborting"
);
msg_Err
(
p_vout
,
"cannot open vout, aborting"
);
return
0
;
return
VLC_EGENERIC
;
}
}
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
return
0
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -214,7 +214,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -214,7 +214,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
msleep
(
VOUT_OUTMEM_SLEEP
);
msleep
(
VOUT_OUTMEM_SLEEP
);
}
}
vout_DatePicture
(
p_vout
,
p_outpic
,
p_pic
->
date
);
vout_DatePicture
(
p_vout
,
p_outpic
,
p_pic
->
date
);
if
(
p_vout
->
p_sys
->
p_lastpic
==
NULL
)
if
(
p_vout
->
p_sys
->
p_lastpic
==
NULL
)
{
{
/* Get a new picture */
/* Get a new picture */
...
@@ -252,28 +252,44 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -252,28 +252,44 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
}
}
CopyPicture
(
p_vout
,
p_vout
->
p_sys
->
p_lastpic
,
p_outpic
);
CopyPicture
(
p_vout
,
p_vout
->
p_sys
->
p_lastpic
,
p_outpic
);
vout_DisplayPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
vout_DisplayPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
}
}
static
void
CopyPicture
(
vout_thread_t
*
p_vout
,
/* FIXME: this is a verbatim copy from src/video_output/vout_pictures.c */
picture_t
*
p_dest
,
picture_t
*
p_source
)
/* XXX: the order is fucked up!! */
static
void
CopyPicture
(
vout_thread_t
*
p_vout
,
picture_t
*
p_dest
,
picture_t
*
p_src
)
{
{
int
i
_plane
;
int
i
;
for
(
i
_plane
=
0
;
i_plane
<
p_dest
->
i_planes
;
i_plane
++
)
for
(
i
=
0
;
i
<
p_src
->
i_planes
;
i
++
)
{
{
u8
*
p_in
,
*
p_out
;
if
(
p_src
->
p
[
i
].
i_pitch
==
p_dest
->
p
[
i
].
i_pitch
)
{
p_in
=
p_source
->
p
[
i_plane
].
p_pixels
;
/* There are margins, but with the same width : perfect ! */
p_vout
->
p_vlc
->
pf_memcpy
(
p_dest
->
p
[
i
].
p_pixels
,
p_src
->
p
[
i
].
p_pixels
,
p_src
->
p
[
i
].
i_pitch
*
p_src
->
p
[
i
].
i_lines
);
}
else
{
/* We need to proceed line by line */
uint8_t
*
p_in
=
p_src
->
p
[
i
].
p_pixels
;
uint8_t
*
p_out
=
p_dest
->
p
[
i
].
p_pixels
;
int
i_line
;
p_out
=
p_dest
->
p
[
i_plane
].
p_pixels
;
for
(
i_line
=
p_src
->
p
[
i
].
i_lines
;
i_line
--
;
)
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
{
p_dest
->
p
[
i_plane
].
i_pitch
*
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
p_dest
->
p
[
i_plane
].
i_lines
);
p_src
->
p
[
i
].
i_visible_pitch
);
p_in
+=
p_src
->
p
[
i
].
i_pitch
;
p_out
+=
p_dest
->
p
[
i
].
i_pitch
;
}
}
}
}
}
}
/*****************************************************************************
/*****************************************************************************
* RenderB
ob: renders a bob
picture
* RenderB
lur: renders a blurred
picture
*****************************************************************************/
*****************************************************************************/
static
void
RenderBlur
(
vout_thread_t
*
p_vout
,
picture_t
*
p_oldpic
,
static
void
RenderBlur
(
vout_thread_t
*
p_vout
,
picture_t
*
p_oldpic
,
picture_t
*
p_newpic
,
picture_t
*
p_outpic
)
picture_t
*
p_newpic
,
picture_t
*
p_outpic
)
...
@@ -283,19 +299,31 @@ static void RenderBlur( vout_thread_t *p_vout, picture_t *p_oldpic,
...
@@ -283,19 +299,31 @@ static void RenderBlur( vout_thread_t *p_vout, picture_t *p_oldpic,
int
i_newfactor
=
128
-
p_vout
->
p_sys
->
i_factor
;
int
i_newfactor
=
128
-
p_vout
->
p_sys
->
i_factor
;
for
(
i_plane
=
0
;
i_plane
<
p_outpic
->
i_planes
;
i_plane
++
)
for
(
i_plane
=
0
;
i_plane
<
p_outpic
->
i_planes
;
i_plane
++
)
{
{
u
8
*
p_old
,
*
p_new
,
*
p_out
,
*
p_out
_end
;
u
int8_t
*
p_old
,
*
p_new
,
*
p_out
,
*
p_out_end
,
*
p_out_line
_end
;
p_out
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
p_out
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
p_new
=
p_newpic
->
p
[
i_plane
].
p_pixels
;
p_new
=
p_newpic
->
p
[
i_plane
].
p_pixels
;
p_old
=
p_oldpic
->
p
[
i_plane
].
p_pixels
;
p_old
=
p_oldpic
->
p
[
i_plane
].
p_pixels
;
p_out_end
=
p_out
+
p_outpic
->
p
[
i_plane
].
i_pitch
*
p_out_end
=
p_out
+
p_outpic
->
p
[
i_plane
].
i_pitch
*
p_outpic
->
p
[
i_plane
].
i_lines
;
p_outpic
->
p
[
i_plane
].
i_lines
;
while
(
p_out
<
p_out_end
)
while
(
p_out
<
p_out_end
)
{
{
*
p_out
++
=
(((
*
p_old
++
)
*
i_oldfactor
)
+
p_out_line_end
=
p_out
+
p_outpic
->
p
[
i_plane
].
i_visible_pitch
;
((
*
p_new
++
)
*
i_newfactor
))
>>
7
;
while
(
p_out
<
p_out_line_end
)
// *p_out++ = (*p_old++ >> 1) + (*p_new++ >> 1);
{
*
p_out
++
=
(((
*
p_old
++
)
*
i_oldfactor
)
+
((
*
p_new
++
)
*
i_newfactor
))
>>
7
;
// *p_out++ = (*p_old++ >> 1) + (*p_new++ >> 1);
}
p_old
+=
p_oldpic
->
p
[
i_plane
].
i_pitch
-
p_oldpic
->
p
[
i_plane
].
i_visible_pitch
;
p_new
+=
p_newpic
->
p
[
i_plane
].
i_pitch
-
p_newpic
->
p
[
i_plane
].
i_visible_pitch
;
p_out
+=
p_outpic
->
p
[
i_plane
].
i_pitch
-
p_outpic
->
p
[
i_plane
].
i_visible_pitch
;
}
}
}
}
}
}
modules/video_filter/transform.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* transform.c : transform image plugin for vlc
* transform.c : transform image plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: transform.c,v 1.
5 2003/01/09 14:00:00
sam Exp $
* $Id: transform.c,v 1.
6 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -288,7 +288,6 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -288,7 +288,6 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
break
;
break
;
case
TRANSFORM_MODE_180
:
case
TRANSFORM_MODE_180
:
/* FIXME: we should use i_visible_pitch here */
for
(
i_index
=
0
;
i_index
<
p_pic
->
i_planes
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
p_pic
->
i_planes
;
i_index
++
)
{
{
uint8_t
*
p_in
=
p_pic
->
p
[
i_index
].
p_pixels
;
uint8_t
*
p_in
=
p_pic
->
p
[
i_index
].
p_pixels
;
...
@@ -299,7 +298,17 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -299,7 +298,17 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
for
(
;
p_in
<
p_in_end
;
)
for
(
;
p_in
<
p_in_end
;
)
{
{
*
p_out
++
=
*
(
--
p_in_end
);
uint8_t
*
p_line_start
=
p_in
-
p_pic
->
p
[
i_index
].
i_pitch
;
p_in_end
-=
p_pic
->
p
[
i_index
].
i_pitch
-
p_pic
->
p
[
i_index
].
i_visible_pitch
;
for
(
;
p_line_start
<
p_in_end
;
)
{
*
p_out
++
=
*
(
--
p_in_end
);
}
p_out
+=
p_outpic
->
p
[
i_index
].
i_pitch
-
p_outpic
->
p
[
i_index
].
i_visible_pitch
;
}
}
}
}
break
;
break
;
...
...
modules/video_filter/wall.c
View file @
00a30b7b
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
* wall.c : Wall video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.
4 2002/11/28 17:35:00
sam Exp $
* $Id: wall.c,v 1.
5 2003/01/09 17:47:05
sam Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...
@@ -106,7 +106,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -106,7 +106,7 @@ static int Create( vlc_object_t *p_this )
if
(
p_vout
->
p_sys
==
NULL
)
if
(
p_vout
->
p_sys
==
NULL
)
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
return
(
1
)
;
return
VLC_ENOMEM
;
}
}
p_vout
->
pf_init
=
Init
;
p_vout
->
pf_init
=
Init
;
...
@@ -132,7 +132,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -132,7 +132,7 @@ static int Create( vlc_object_t *p_this )
{
{
msg_Err
(
p_vout
,
"out of memory"
);
msg_Err
(
p_vout
,
"out of memory"
);
free
(
p_vout
->
p_sys
);
free
(
p_vout
->
p_sys
);
return
(
1
)
;
return
VLC_ENOMEM
;
}
}
psz_method_tmp
=
psz_method
=
config_GetPsz
(
p_vout
,
"wall-active"
);
psz_method_tmp
=
psz_method
=
config_GetPsz
(
p_vout
,
"wall-active"
);
...
@@ -185,7 +185,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -185,7 +185,7 @@ static int Create( vlc_object_t *p_this )
free
(
psz_method_tmp
);
free
(
psz_method_tmp
);
return
(
0
)
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -195,7 +195,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -195,7 +195,7 @@ static int Init( vout_thread_t *p_vout )
{
{
int
i_index
,
i_row
,
i_col
,
i_width
,
i_height
;
int
i_index
,
i_row
,
i_col
,
i_width
,
i_height
;
picture_t
*
p_pic
;
picture_t
*
p_pic
;
I_OUTPUTPICTURES
=
0
;
I_OUTPUTPICTURES
=
0
;
/* Initialize the output structure */
/* Initialize the output structure */
...
@@ -258,7 +258,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -258,7 +258,7 @@ static int Init( vout_thread_t *p_vout )
msg_Err
(
p_vout
,
"failed to get %ix%i vout threads"
,
msg_Err
(
p_vout
,
"failed to get %ix%i vout threads"
,
p_vout
->
p_sys
->
i_col
,
p_vout
->
p_sys
->
i_row
);
p_vout
->
p_sys
->
i_col
,
p_vout
->
p_sys
->
i_row
);
RemoveAllVout
(
p_vout
);
RemoveAllVout
(
p_vout
);
return
0
;
return
VLC_EGENERIC
;
}
}
p_vout
->
p_sys
->
i_vout
++
;
p_vout
->
p_sys
->
i_vout
++
;
...
@@ -267,7 +267,7 @@ static int Init( vout_thread_t *p_vout )
...
@@ -267,7 +267,7 @@ static int Init( vout_thread_t *p_vout )
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
ALLOCATE_DIRECTBUFFERS
(
VOUT_MAX_PICTURES
);
return
(
0
)
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -363,9 +363,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -363,9 +363,10 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
{
u
8
*
p_in
,
*
p_in_end
,
*
p_out
;
u
int8_t
*
p_in
,
*
p_in_end
,
*
p_out
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_in_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
int
i_out_pitch
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
int
i_copy_pitch
=
p_outpic
->
p
[
i_plane
].
i_visible_pitch
;
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
p_in
=
p_pic
->
p
[
i_plane
].
p_pixels
+
pi_top_skip
[
i_plane
]
+
pi_left_skip
[
i_plane
];
+
pi_top_skip
[
i_plane
]
+
pi_left_skip
[
i_plane
];
...
@@ -377,7 +378,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -377,7 +378,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
while
(
p_in
<
p_in_end
)
while
(
p_in
<
p_in_end
)
{
{
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_
out
_pitch
);
p_vout
->
p_vlc
->
pf_memcpy
(
p_out
,
p_in
,
i_
copy
_pitch
);
p_in
+=
i_in_pitch
;
p_in
+=
i_in_pitch
;
p_out
+=
i_out_pitch
;
p_out
+=
i_out_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