Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
ef1c999b
Commit
ef1c999b
authored
Jul 06, 2007
by
Jérome Decoodt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to optimize a bit the antialiasing thing
parent
ef2a6d1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
+27
-24
modules/video_filter/rotate.c
modules/video_filter/rotate.c
+27
-24
No files found.
modules/video_filter/rotate.c
View file @
ef1c999b
...
@@ -189,39 +189,42 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
...
@@ -189,39 +189,42 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
{
{
const
int
i_line_orig
=
(
i_line_orig0
>>
12
)
+
i_line_center
;
const
int
i_line_orig
=
(
i_line_orig0
>>
12
)
+
i_line_center
;
const
int
i_col_orig
=
(
i_col_orig0
>>
12
)
+
i_col_center
;
const
int
i_col_orig
=
(
i_col_orig0
>>
12
)
+
i_col_center
;
int
i_line_percent
=
(
i_line_orig0
>>
4
)
&
255
;
const
uint8_t
*
p_orig_offset
=
p_in
+
i_line_orig
*
i_pitch
int
i_col_percent
=
(
i_col_orig0
>>
4
)
&
255
;
+
i_col_orig
;
const
uint8_t
i_line_percent
=
(
i_line_orig0
>>
4
)
&
255
;
const
uint8_t
i_col_percent
=
(
i_col_orig0
>>
4
)
&
255
;
if
(
-
1
<=
i_line_orig
&&
i_line_orig
<
i_visible_lines
if
(
-
1
<=
i_line_orig
&&
i_line_orig
<
i_visible_lines
&&
-
1
<=
i_col_orig
&&
i_col_orig
<
i_visible_pitch
)
&&
-
1
<=
i_col_orig
&&
i_col_orig
<
i_visible_pitch
)
{
{
uint8_t
i_curpix
=
black_pixel
;
uint8_t
i_colpix
=
black_pixel
;
uint8_t
i_linpix
=
black_pixel
;
uint8_t
i_nexpix
=
black_pixel
;
if
(
(
0
<=
i_line_orig
)
&&
(
0
<=
i_col_orig
)
)
i_curpix
=
p_in
[
i_line_orig
*
i_pitch
+
i_col_orig
];
if
(
(
i_line_orig
<
i_visible_lines
-
1
)
&&
(
i_col_orig
>=
0
)
)
{
i_linpix
=
p_in
[(
i_line_orig
+
1
)
*
i_pitch
+
i_col_orig
];
}
if
(
(
i_col_orig
<
i_visible_pitch
-
1
)
&&
(
i_line_orig
>=
0
)
)
{
i_colpix
=
p_in
[
i_line_orig
*
i_pitch
+
i_col_orig
+
1
];
}
if
(
(
i_line_orig
<
i_visible_lines
-
1
)
&&
(
i_col_orig
<
i_visible_pitch
-
1
)
)
i_nexpix
=
p_in
[(
i_line_orig
+
1
)
*
i_pitch
+
i_col_orig
+
1
];
#define test 1
#define test 1
#undef test
#undef test
#ifdef test
#ifdef test
if
(
(
i_col_orig
>
i_visible_pitch
/
2
)
)
if
(
(
i_col_orig
>
i_visible_pitch
/
2
)
)
#endif
#endif
{
{
uint8_t
i_curpix
=
black_pixel
;
uint8_t
i_colpix
=
black_pixel
;
uint8_t
i_linpix
=
black_pixel
;
uint8_t
i_nexpix
=
black_pixel
;
if
(
(
0
<=
i_line_orig
)
&&
(
0
<=
i_col_orig
)
)
i_curpix
=
*
p_orig_offset
;
p_orig_offset
++
;
if
(
(
i_col_orig
<
i_visible_pitch
-
1
)
&&
(
i_line_orig
>=
0
)
)
i_colpix
=*
p_orig_offset
;
p_orig_offset
+=
i_pitch
;
if
(
(
i_line_orig
<
i_visible_lines
-
1
)
&&
(
i_col_orig
<
i_visible_pitch
-
1
)
)
i_nexpix
=*
p_orig_offset
;
p_orig_offset
--
;
if
(
(
i_line_orig
<
i_visible_lines
-
1
)
&&
(
i_col_orig
>=
0
)
)
i_linpix
=*
p_orig_offset
;
unsigned
int
temp
=
0
;
unsigned
int
temp
=
0
;
temp
+=
i_curpix
*
temp
+=
i_curpix
*
(
256
-
i_line_percent
)
*
(
256
-
i_col_percent
);
(
256
-
i_line_percent
)
*
(
256
-
i_col_percent
);
...
@@ -238,7 +241,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
...
@@ -238,7 +241,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
{
*
p_out
=
black_pixel
;
{
*
p_out
=
black_pixel
;
}
}
else
else
*
p_out
=
p_in
[
i_line_orig
*
i_pitch
+
i_col_orig
]
;
*
p_out
=
*
p_orig_offset
;
#endif
#endif
#undef test
#undef test
}
}
...
...
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