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
6456512f
Commit
6456512f
authored
Jul 26, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved pre-blending in ssa decoder.
parent
1e1269ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
modules/codec/libass.c
modules/codec/libass.c
+25
-10
No files found.
modules/codec/libass.c
View file @
6456512f
...
@@ -569,26 +569,41 @@ static void RegionDraw( subpicture_region_t *p_region, ass_image_t *p_img )
...
@@ -569,26 +569,41 @@ static void RegionDraw( subpicture_region_t *p_region, ass_image_t *p_img )
p_img
->
dst_y
<
i_y
||
p_img
->
dst_y
+
p_img
->
h
>
i_y
+
i_height
)
p_img
->
dst_y
<
i_y
||
p_img
->
dst_y
+
p_img
->
h
>
i_y
+
i_height
)
continue
;
continue
;
const
int
r
=
(
p_img
->
color
>>
24
)
&
0xff
;
const
unsigned
r
=
(
p_img
->
color
>>
24
)
&
0xff
;
const
int
g
=
(
p_img
->
color
>>
16
)
&
0xff
;
const
unsigned
g
=
(
p_img
->
color
>>
16
)
&
0xff
;
const
int
b
=
(
p_img
->
color
>>
8
)
&
0xff
;
const
unsigned
b
=
(
p_img
->
color
>>
8
)
&
0xff
;
const
int
a
=
(
p_img
->
color
)
&
0xff
;
const
unsigned
a
=
(
p_img
->
color
)
&
0xff
;
int
x
,
y
;
int
x
,
y
;
for
(
y
=
0
;
y
<
p_img
->
h
;
y
++
)
for
(
y
=
0
;
y
<
p_img
->
h
;
y
++
)
{
{
for
(
x
=
0
;
x
<
p_img
->
w
;
x
++
)
for
(
x
=
0
;
x
<
p_img
->
w
;
x
++
)
{
{
const
int
alpha
=
p_img
->
bitmap
[
y
*
p_img
->
stride
+
x
];
const
unsigned
alpha
=
p_img
->
bitmap
[
y
*
p_img
->
stride
+
x
];
const
int
an
=
(
255
-
a
)
*
alpha
/
255
;
const
unsigned
an
=
(
255
-
a
)
*
alpha
/
255
;
uint8_t
*
p_rgba
=
&
p
->
p_pixels
[(
y
+
p_img
->
dst_y
-
i_y
)
*
p
->
i_pitch
+
4
*
(
x
+
p_img
->
dst_x
-
i_x
)];
uint8_t
*
p_rgba
=
&
p
->
p_pixels
[(
y
+
p_img
->
dst_y
-
i_y
)
*
p
->
i_pitch
+
4
*
(
x
+
p_img
->
dst_x
-
i_x
)];
const
unsigned
ao
=
p_rgba
[
3
];
/* Native endianness, but RGBA ordering */
/* Native endianness, but RGBA ordering */
p_rgba
[
0
]
=
(
p_rgba
[
0
]
*
(
255
-
an
)
+
r
*
an
)
/
255
;
if
(
ao
==
0
)
p_rgba
[
1
]
=
(
p_rgba
[
1
]
*
(
255
-
an
)
+
g
*
an
)
/
255
;
{
p_rgba
[
2
]
=
(
p_rgba
[
2
]
*
(
255
-
an
)
+
b
*
an
)
/
255
;
/* Optimized but the else{} will produce the same result */
p_rgba
[
0
]
=
r
;
p_rgba
[
1
]
=
g
;
p_rgba
[
2
]
=
b
;
p_rgba
[
3
]
=
an
;
}
else
{
p_rgba
[
3
]
=
255
-
(
255
-
p_rgba
[
3
]
)
*
(
255
-
an
)
/
255
;
p_rgba
[
3
]
=
255
-
(
255
-
p_rgba
[
3
]
)
*
(
255
-
an
)
/
255
;
if
(
p_rgba
[
3
]
!=
0
)
{
p_rgba
[
0
]
=
(
p_rgba
[
0
]
*
ao
*
(
255
-
an
)
/
255
+
r
*
an
)
/
p_rgba
[
3
];
p_rgba
[
1
]
=
(
p_rgba
[
1
]
*
ao
*
(
255
-
an
)
/
255
+
g
*
an
)
/
p_rgba
[
3
];
p_rgba
[
2
]
=
(
p_rgba
[
2
]
*
ao
*
(
255
-
an
)
/
255
+
b
*
an
)
/
p_rgba
[
3
];
}
}
}
}
}
}
}
}
...
...
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