Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b7529857
Commit
b7529857
authored
Jan 09, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/video_filter/adjust.c: properly fixed margin handling (partially
closes #30).
parent
4c4c4e48
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
34 deletions
+70
-34
modules/video_filter/adjust.c
modules/video_filter/adjust.c
+70
-34
No files found.
modules/video_filter/adjust.c
View file @
b7529857
...
@@ -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.
6 2003/01/09 15:38:09
sam Exp $
* $Id: adjust.c,v 1.
7 2003/01/09 16:26:14
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,7 +195,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -195,7 +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_out
,
*
p_in_u
,
*
p_in_v
,
*
p_in_end
,
*
p_out_u
,
*
p_out_v
;
uint8_t
*
p_in
,
*
p_in_u
,
*
p_in_v
,
*
p_in_end
,
*
p_line_end
;
uint8_t
*
p_out
,
*
p_out_u
,
*
p_out_v
;
double
f_hue
;
double
f_hue
;
int32_t
i_cont
,
i_lum
;
int32_t
i_cont
,
i_lum
;
...
@@ -232,13 +233,20 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -232,13 +233,20 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
pi_luma
[
i
]
=
clip
(
i_lum
+
i_cont
*
i
/
256
);
pi_luma
[
i
]
=
clip
(
i_lum
+
i_cont
*
i
/
256
);
}
}
/* Do the Y plane */
/*
* Do the Y plane
*/
p_in
=
p_pic
->
p
[
0
].
p_pixels
;
p_in
=
p_pic
->
p
[
0
].
p_pixels
;
p_in_end
=
p_in
+
p_pic
->
p
[
0
].
i_lines
*
p_pic
->
p
[
0
].
i_pitch
-
8
;
p_in_end
=
p_in
+
p_pic
->
p
[
0
].
i_lines
*
p_pic
->
p
[
0
].
i_pitch
-
8
;
p_out
=
p_outpic
->
p
[
0
].
p_pixels
;
p_out
=
p_outpic
->
p
[
0
].
p_pixels
;
for
(
;
p_in
<
p_in_end
;
)
for
(
;
p_in
<
p_in_end
;
)
{
p_line_end
=
p_in
+
p_pic
->
p
[
0
].
i_visible_pitch
-
8
;
for
(
;
p_in
<
p_line_end
;
)
{
{
/* Do 8 pixels at a time */
/* Do 8 pixels at a time */
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
...
@@ -247,14 +255,20 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -247,14 +255,20 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
}
}
p_in
_end
+=
8
;
p_line
_end
+=
8
;
for
(
;
p_in
<
p_in
_end
;
)
for
(
;
p_in
<
p_line
_end
;
)
{
{
*
p_out
++
=
pi_luma
[
*
p_in
++
];
*
p_out
++
=
pi_luma
[
*
p_in
++
];
}
}
/* Do the U and V planes */
p_in
+=
p_pic
->
p
[
0
].
i_pitch
-
p_pic
->
p
[
0
].
i_visible_pitch
;
}
/*
* Do the U and V planes
*/
p_in_u
=
p_pic
->
p
[
1
].
p_pixels
;
p_in_u
=
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_u
+
p_pic
->
p
[
1
].
i_lines
*
p_pic
->
p
[
1
].
i_pitch
-
8
;
...
@@ -280,18 +294,30 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -280,18 +294,30 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
uint8_t
i_u
,
i_v
;
uint8_t
i_u
,
i_v
;
for
(
;
p_in_u
<
p_in_end
;
)
for
(
;
p_in_u
<
p_in_end
;
)
{
p_line_end
=
p_in_u
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
for
(
;
p_in_u
<
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
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
WRITE_UV_CLIP
();
}
}
p_in
_end
+=
8
;
p_line
_end
+=
8
;
for
(
;
p_in_u
<
p_in
_end
;
)
for
(
;
p_in_u
<
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_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_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
}
}
}
else
else
{
{
...
@@ -305,18 +331,28 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -305,18 +331,28 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
uint8_t
i_u
,
i_v
;
uint8_t
i_u
,
i_v
;
for
(
;
p_in_u
<
p_in_end
;
)
for
(
;
p_in_u
<
p_in_end
;
)
{
p_line_end
=
p_in
+
p_pic
->
p
[
1
].
i_visible_pitch
-
8
;
for
(
;
p_in_u
<
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
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
WRITE_UV
();
}
}
p_in
_end
+=
8
;
p_line
_end
+=
8
;
for
(
;
p_in_u
<
p_in
_end
;
)
for
(
;
p_in_u
<
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_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_v
+=
p_pic
->
p
[
2
].
i_pitch
-
p_pic
->
p
[
2
].
i_visible_pitch
;
}
}
}
vout_UnlinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
vout_UnlinkPicture
(
p_vout
->
p_sys
->
p_vout
,
p_outpic
);
...
...
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