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
f4d42932
Commit
f4d42932
authored
Nov 09, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FreeType: optimize FillARGB() a little
parent
e9f42c6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+16
-9
No files found.
modules/text_renderer/freetype.c
View file @
f4d42932
...
@@ -1008,16 +1008,23 @@ static inline void BlendRGBAPixel( picture_t *p_picture,
...
@@ -1008,16 +1008,23 @@ static inline void BlendRGBAPixel( picture_t *p_picture,
static
void
FillARGBPicture
(
picture_t
*
pic
,
int
a
,
int
r
,
int
g
,
int
b
)
static
void
FillARGBPicture
(
picture_t
*
pic
,
int
a
,
int
r
,
int
g
,
int
b
)
{
{
for
(
int
dy
=
0
;
dy
<
pic
->
p
->
i_visible_lines
;
dy
++
)
if
(
a
==
0
)
r
=
g
=
b
=
0
;
if
(
a
==
r
&&
a
==
b
&&
a
==
g
)
{
/* fast path */
memset
(
pic
->
p
->
p_pixels
,
a
,
pic
->
p
->
i_visible_lines
*
pic
->
p
->
i_pitch
);
return
;
}
uint_fast32_t
pixel
=
VLC_FOURCC
(
a
,
r
,
g
,
b
);
uint8_t
*
line
=
pic
->
p
->
p_pixels
;
for
(
unsigned
lines
=
pic
->
p
->
i_visible_lines
;
lines
>
0
;
lines
--
)
{
{
for
(
int
dx
=
0
;
dx
<
pic
->
p
->
i_visible_pitch
;
dx
+=
4
)
uint32_t
*
pixels
=
(
uint32_t
*
)
line
;
{
for
(
unsigned
cols
=
pic
->
p
->
i_visible_pitch
;
cols
>
0
;
cols
-=
4
)
uint8_t
*
rgba
=
&
pic
->
p
->
p_pixels
[
dy
*
pic
->
p
->
i_pitch
+
dx
];
*
(
pixels
++
)
=
pixel
;
rgba
[
0
]
=
a
;
line
+=
pic
->
p
->
i_pitch
;
rgba
[
1
]
=
r
;
rgba
[
2
]
=
g
;
rgba
[
3
]
=
b
;
}
}
}
}
}
...
...
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