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
b33c3bc1
Commit
b33c3bc1
authored
Mar 27, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sepia: cleanups
Remove tabs, trailing spaces, and write-only variables
parent
964fc34b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
modules/video_filter/sepia.c
modules/video_filter/sepia.c
+7
-9
No files found.
modules/video_filter/sepia.c
View file @
b33c3bc1
...
...
@@ -31,9 +31,9 @@
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <assert.h>
#include <vlc_filter.h>
#include "filter_picture.h"
/*****************************************************************************
...
...
@@ -229,7 +229,7 @@ static void PlanarI420Sepia( picture_t *p_pic, picture_t *p_outpic,
const
int
i_du_line_start
=
(
y
/
2
)
*
p_outpic
->
p
[
U_PLANE
].
i_pitch
;
const
int
i_dv_line_start
=
(
y
/
2
)
*
p_outpic
->
p
[
V_PLANE
].
i_pitch
;
/* iterate for every two visible line in the frame */
for
(
int
x
=
0
;
x
<
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
-
1
;
x
+=
2
)
for
(
int
x
=
0
;
x
<
p_pic
->
p
[
Y_PLANE
].
i_visible_pitch
-
1
;
x
+=
2
)
{
uint8_t
sy1
,
sy2
,
sy3
,
sy4
,
su
,
sv
;
uint8_t
dy1
,
dy2
,
dy3
,
dy4
,
du
,
dv
;
...
...
@@ -242,8 +242,8 @@ static void PlanarI420Sepia( picture_t *p_pic, picture_t *p_outpic,
sy2
=
p_pic
->
p
[
Y_PLANE
].
p_pixels
[
i_sy_line1_offset
+
1
];
sy3
=
p_pic
->
p
[
Y_PLANE
].
p_pixels
[
i_sy_line2_offset
];
sy4
=
p_pic
->
p
[
Y_PLANE
].
p_pixels
[
i_sy_line2_offset
+
1
];
su
=
p_pic
->
p
[
U_PLANE
].
p_pixels
[
i_su_line_start
+
(
x
/
2
)];
sv
=
p_pic
->
p
[
V_PLANE
].
p_pixels
[
i_sv_line_start
+
(
x
/
2
)];
su
=
p_pic
->
p
[
U_PLANE
].
p_pixels
[
i_su_line_start
+
(
x
/
2
)];
sv
=
p_pic
->
p
[
V_PLANE
].
p_pixels
[
i_sv_line_start
+
(
x
/
2
)];
/* calculate sepia values */
YuvSepia4
(
&
dy1
,
&
dy2
,
&
dy3
,
&
dy4
,
&
du
,
&
dv
,
sy1
,
sy2
,
sy3
,
sy4
,
su
,
sv
,
i_intensity
);
...
...
@@ -254,7 +254,7 @@ static void PlanarI420Sepia( picture_t *p_pic, picture_t *p_outpic,
p_outpic
->
p
[
Y_PLANE
].
p_pixels
[
i_dy_line2_offset
+
1
]
=
dy4
;
p_outpic
->
p
[
U_PLANE
].
p_pixels
[
i_du_line_start
+
(
x
/
2
)]
=
du
;
p_outpic
->
p
[
V_PLANE
].
p_pixels
[
i_dv_line_start
+
(
x
/
2
)]
=
dv
;
}
}
}
}
...
...
@@ -268,7 +268,7 @@ static void PlanarI420Sepia( picture_t *p_pic, picture_t *p_outpic,
static
void
PackedYUVSepia
(
picture_t
*
p_pic
,
picture_t
*
p_outpic
,
int
i_intensity
)
{
uint8_t
*
p_in
,
*
p_in_end
,
*
p_line_
start
,
*
p_line_
end
,
*
p_out
;
uint8_t
*
p_in
,
*
p_in_end
,
*
p_line_end
,
*
p_out
;
int
i_yindex
=
1
,
i_uindex
=
2
,
i_vindex
=
0
;
GetPackedYuvOffsets
(
p_outpic
->
format
.
i_chroma
,
...
...
@@ -281,7 +281,6 @@ static void PackedYUVSepia( picture_t *p_pic, picture_t *p_outpic,
while
(
p_in
<
p_in_end
)
{
p_line_start
=
p_in
;
p_line_end
=
p_in
+
p_pic
->
p
[
0
].
i_visible_pitch
;
while
(
p_in
<
p_line_end
)
{
...
...
@@ -307,7 +306,7 @@ static void PackedYUVSepia( picture_t *p_pic, picture_t *p_outpic,
*****************************************************************************/
static
void
RVSepia
(
picture_t
*
p_pic
,
picture_t
*
p_outpic
,
int
i_intensity
)
{
uint8_t
*
p_in
,
*
p_in_end
,
*
p_line_
start
,
*
p_line_
end
,
*
p_out
;
uint8_t
*
p_in
,
*
p_in_end
,
*
p_line_end
,
*
p_out
;
int
i_r
,
i_g
,
i_b
;
bool
b_isRV32
=
p_pic
->
format
.
i_chroma
==
VLC_CODEC_RGB32
;
int
i_rindex
=
0
,
i_gindex
=
1
,
i_bindex
=
2
;
...
...
@@ -321,7 +320,6 @@ static void RVSepia( picture_t *p_pic, picture_t *p_outpic, int i_intensity )
while
(
p_in
<
p_in_end
)
{
p_line_start
=
p_in
;
p_line_end
=
p_in
+
p_pic
->
p
[
0
].
i_visible_pitch
;
while
(
p_in
<
p_line_end
)
{
...
...
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