Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
440
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
838e1ecd
Commit
838e1ecd
authored
2 years ago
by
François Cartegnie
Committed by
Steve Lhomme
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
codec: aribcaption: use planeCopyPixels and check format
parent
5b1a0562
No related branches found
Branches containing commit
No related tags found
1 merge request
!2553
codec: aribcaption: use planeCopyPixels and check format
Pipeline
#263020
passed with stage
in 24 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/codec/arib/libaribcaption.c
+11
-10
11 additions, 10 deletions
modules/codec/arib/libaribcaption.c
with
11 additions
and
10 deletions
modules/codec/arib/libaribcaption.c
+
11
−
10
View file @
838e1ecd
...
...
@@ -134,17 +134,18 @@ static int SubpictureValidate(subpicture_t *p_subpic,
static
void
CopyImageToRegion
(
subpicture_region_t
*
p_region
,
const
aribcc_image_t
*
image
)
{
const
plane_t
*
p
=
&
p_region
->
p_picture
->
p
[
0
];
const
int
i_height
=
p_region
->
fmt
.
i_height
;
const
uint32_t
copy_line_size
=
__MIN
(
image
->
stride
,
p
->
i_pitch
);
memset
(
p
->
p_pixels
,
0
,
p
->
i_pitch
*
p
->
i_visible_lines
);
if
(
image
->
pixel_format
!=
ARIBCC_PIXELFORMAT_RGBA8888
)
return
;
for
(
int
y
=
0
;
y
<
i_height
;
y
++
)
{
const
uint8_t
*
src_line_begin
=
image
->
bitmap
+
y
*
image
->
stride
;
uint8_t
*
dst_line_begin
=
p
->
p_pixels
+
y
*
p
->
i_pitch
;
memcpy
(
dst_line_begin
,
src_line_begin
,
copy_line_size
);
}
plane_t
*
p_dstplane
=
&
p_region
->
p_picture
->
p
[
0
];
plane_t
srcplane
;
srcplane
.
i_lines
=
image
->
height
;
srcplane
.
i_pitch
=
image
->
stride
;
srcplane
.
i_pixel_pitch
=
p_dstplane
->
i_pixel_pitch
;
srcplane
.
i_visible_lines
=
image
->
height
;
srcplane
.
i_visible_pitch
=
image
->
width
/* in pixels */
*
p_dstplane
->
i_pixel_pitch
;
srcplane
.
p_pixels
=
image
->
bitmap
;
plane_CopyPixels
(
p_dstplane
,
&
srcplane
);
}
static
void
SubpictureUpdate
(
subpicture_t
*
p_subpic
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment