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
da065dee
Commit
da065dee
authored
Mar 31, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scale.c: implement RGBA scaling.
vout_subpictures.c: enable scaling for RGBA subpictures.
parent
67e8b0e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
12 deletions
+43
-12
modules/video_filter/scale.c
modules/video_filter/scale.c
+42
-10
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+1
-2
No files found.
modules/video_filter/scale.c
View file @
da065dee
...
...
@@ -66,7 +66,8 @@ static int OpenFilter( vlc_object_t *p_this )
filter_sys_t
*
p_sys
;
if
(
(
p_filter
->
fmt_in
.
video
.
i_chroma
!=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
&&
p_filter
->
fmt_in
.
video
.
i_chroma
!=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
)
)
||
p_filter
->
fmt_in
.
video
.
i_chroma
!=
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
)
&&
p_filter
->
fmt_in
.
video
.
i_chroma
!=
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
)
)
||
p_filter
->
fmt_in
.
video
.
i_chroma
!=
p_filter
->
fmt_out
.
video
.
i_chroma
)
{
return
VLC_EGENERIC
;
...
...
@@ -109,7 +110,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
int
i_plane
,
i
,
j
,
k
,
l
;
if
(
!
p_pic
)
return
NULL
;
/* Request output picture */
p_pic_dst
=
p_filter
->
pf_vout_buffer_new
(
p_filter
);
if
(
!
p_pic_dst
)
...
...
@@ -120,14 +121,44 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
return
NULL
;
}
for
(
i_plane
=
0
;
i_plane
<
p_pic_dst
->
i_planes
;
i_plane
++
)
if
(
p_filter
->
fmt_in
.
video
.
i_chroma
==
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
||
p_filter
->
fmt_in
.
video
.
i_chroma
==
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'A'
)
)
{
uint8_t
*
p_src
=
p_pic
->
p
[
i_plane
].
p_pixels
;
uint8_t
*
p_dst
=
p_pic_dst
->
p
[
i_plane
].
p_pixels
;
int
i_src_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_dst_pitch
=
p_pic_dst
->
p
[
i_plane
].
i_pitch
;
for
(
i_plane
=
0
;
i_plane
<
p_pic_dst
->
i_planes
;
i_plane
++
)
{
uint8_t
*
p_src
=
p_pic
->
p
[
i_plane
].
p_pixels
;
uint8_t
*
p_dst
=
p_pic_dst
->
p
[
i_plane
].
p_pixels
;
int
i_src_pitch
=
p_pic
->
p
[
i_plane
].
i_pitch
;
int
i_dst_pitch
=
p_pic_dst
->
p
[
i_plane
].
i_pitch
;
for
(
i
=
0
;
i
<
p_pic_dst
->
p
[
i_plane
].
i_visible_lines
;
i
++
)
{
l
=
(
p_filter
->
fmt_in
.
video
.
i_height
*
i
+
p_filter
->
fmt_out
.
video
.
i_height
/
2
)
/
p_filter
->
fmt_out
.
video
.
i_height
;
l
=
__MIN
(
(
int
)
p_filter
->
fmt_in
.
video
.
i_height
-
1
,
l
);
for
(
j
=
0
;
j
<
p_pic_dst
->
p
[
i_plane
].
i_visible_pitch
;
j
++
)
{
k
=
(
p_filter
->
fmt_in
.
video
.
i_width
*
j
+
p_filter
->
fmt_out
.
video
.
i_width
/
2
)
/
p_filter
->
fmt_out
.
video
.
i_width
;
for
(
i
=
0
;
i
<
p_pic_dst
->
p
[
i_plane
].
i_visible_lines
;
i
++
)
k
=
__MIN
(
(
int
)
p_filter
->
fmt_in
.
video
.
i_width
-
1
,
k
);
p_dst
[
i
*
i_dst_pitch
+
j
]
=
p_src
[
l
*
i_src_pitch
+
k
];
}
}
}
}
else
/* RGBA */
{
uint8_t
*
p_src
=
p_pic
->
p
->
p_pixels
;
uint8_t
*
p_dst
=
p_pic_dst
->
p
->
p_pixels
;
int
i_src_pitch
=
p_pic
->
p
->
i_pitch
;
int
i_dst_pitch
=
p_pic_dst
->
p
->
i_pitch
;
for
(
i
=
0
;
i
<
p_pic_dst
->
p
->
i_visible_lines
;
i
++
)
{
l
=
(
p_filter
->
fmt_in
.
video
.
i_height
*
i
+
p_filter
->
fmt_out
.
video
.
i_height
/
2
)
/
...
...
@@ -135,7 +166,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
l
=
__MIN
(
(
int
)
p_filter
->
fmt_in
.
video
.
i_height
-
1
,
l
);
for
(
j
=
0
;
j
<
p_pic_dst
->
p
[
i_plane
].
i_visible_pitch
;
j
++
)
for
(
j
=
0
;
j
<
p_pic_dst
->
p
->
i_visible_pitch
/
4
;
j
++
)
{
k
=
(
p_filter
->
fmt_in
.
video
.
i_width
*
j
+
p_filter
->
fmt_out
.
video
.
i_width
/
2
)
/
...
...
@@ -143,7 +174,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
k
=
__MIN
(
(
int
)
p_filter
->
fmt_in
.
video
.
i_width
-
1
,
k
);
p_dst
[
i
*
i_dst_pitch
+
j
]
=
p_src
[
l
*
i_src_pitch
+
k
];
*
(
uint32_t
*
)(
&
p_dst
[
i
*
i_dst_pitch
+
4
*
j
])
=
*
(
uint32_t
*
)(
&
p_src
[
l
*
i_src_pitch
+
4
*
k
]);
}
}
}
...
...
src/video_output/vout_subpictures.c
View file @
da065dee
...
...
@@ -673,8 +673,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
if
(
(
i_scale_width
!=
1000
||
i_scale_height
!=
1000
)
&&
p_spu
->
p_scale
&&
!
p_region
->
p_cache
&&
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
)
!=
p_region
->
fmt
.
i_chroma
/* FIXME */
)
p_spu
->
p_scale
&&
!
p_region
->
p_cache
)
{
picture_t
*
p_pic
;
...
...
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