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
de33443d
Commit
de33443d
authored
Sep 23, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/video_output/vout_subpictures.c: fixed recent dvd menu breakage.
parent
bb90b153
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
45 deletions
+43
-45
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+43
-45
No files found.
src/video_output/vout_subpictures.c
View file @
de33443d
...
...
@@ -605,54 +605,14 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
}
}
/* Force cropping if requested */
if
(
p_spu
->
b_force_crop
)
{
video_format_t
*
p_fmt
=
&
p_spu
->
p_blend
->
fmt_in
.
video
;
/* Find the intersection */
if
(
p_spu
->
i_crop_x
+
p_spu
->
i_crop_width
<=
i_x_offset
||
i_x_offset
+
(
int
)
p_fmt
->
i_visible_width
<
p_spu
->
i_crop_x
||
p_spu
->
i_crop_y
+
p_spu
->
i_crop_height
<=
i_y_offset
||
i_y_offset
+
(
int
)
p_fmt
->
i_visible_height
<
p_spu
->
i_crop_y
)
{
/* No intersection */
p_fmt
->
i_visible_width
=
p_fmt
->
i_visible_height
=
0
;
}
else
{
int
i_x
,
i_y
,
i_x_end
,
i_y_end
;
i_x
=
__MAX
(
p_spu
->
i_crop_x
,
i_x_offset
);
i_y
=
__MAX
(
p_spu
->
i_crop_y
,
i_y_offset
);
i_x_end
=
__MIN
(
p_spu
->
i_crop_x
+
p_spu
->
i_crop_width
,
i_x_offset
+
(
int
)
p_fmt
->
i_visible_width
);
i_y_end
=
__MIN
(
p_spu
->
i_crop_y
+
p_spu
->
i_crop_height
,
i_y_offset
+
(
int
)
p_fmt
->
i_visible_height
);
p_fmt
->
i_x_offset
=
i_x
-
i_x_offset
;
p_fmt
->
i_y_offset
=
i_y
-
i_y_offset
;
p_fmt
->
i_visible_width
=
i_x_end
-
i_x
;
p_fmt
->
i_visible_height
=
i_y_end
-
i_y
;
i_x_offset
=
i_x
;
i_y_offset
=
i_y
;
}
}
/* Force palette if requested */
if
(
p_spu
->
b_force_alpha
&&
VLC_FOURCC
(
'Y'
,
'U'
,
'V'
,
'P'
)
==
p_
spu
->
p_blend
->
fmt_in
.
video
.
i_chroma
)
p_
region
->
fmt
.
i_chroma
)
{
p_spu
->
p_blend
->
fmt_in
.
video
.
p_palette
->
palette
[
0
][
3
]
=
p_spu
->
pi_alpha
[
0
];
p_spu
->
p_blend
->
fmt_in
.
video
.
p_palette
->
palette
[
1
][
3
]
=
p_spu
->
pi_alpha
[
1
];
p_spu
->
p_blend
->
fmt_in
.
video
.
p_palette
->
palette
[
2
][
3
]
=
p_spu
->
pi_alpha
[
2
];
p_spu
->
p_blend
->
fmt_in
.
video
.
p_palette
->
palette
[
3
][
3
]
=
p_spu
->
pi_alpha
[
3
];
p_region
->
fmt
.
p_palette
->
palette
[
0
][
3
]
=
p_spu
->
pi_alpha
[
0
];
p_region
->
fmt
.
p_palette
->
palette
[
1
][
3
]
=
p_spu
->
pi_alpha
[
1
];
p_region
->
fmt
.
p_palette
->
palette
[
2
][
3
]
=
p_spu
->
pi_alpha
[
2
];
p_region
->
fmt
.
p_palette
->
palette
[
3
][
3
]
=
p_spu
->
pi_alpha
[
3
];
}
/* Scale SPU if necessary */
...
...
@@ -721,6 +681,44 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_spu
->
p_blend
->
fmt_in
.
video
=
p_region
->
fmt
;
/* Force cropping if requested */
if
(
p_spu
->
b_force_crop
)
{
video_format_t
*
p_fmt
=
&
p_spu
->
p_blend
->
fmt_in
.
video
;
int
i_crop_x
=
p_spu
->
i_crop_x
*
i_scale_width
/
1000
;
int
i_crop_y
=
p_spu
->
i_crop_y
*
i_scale_height
/
1000
;
int
i_crop_width
=
p_spu
->
i_crop_width
*
i_scale_width
/
1000
;
int
i_crop_height
=
p_spu
->
i_crop_height
*
i_scale_height
/
1000
;
/* Find the intersection */
if
(
i_crop_x
+
i_crop_width
<=
i_x_offset
||
i_x_offset
+
(
int
)
p_fmt
->
i_visible_width
<
i_crop_x
||
i_crop_y
+
i_crop_height
<=
i_y_offset
||
i_y_offset
+
(
int
)
p_fmt
->
i_visible_height
<
i_crop_y
)
{
/* No intersection */
p_fmt
->
i_visible_width
=
p_fmt
->
i_visible_height
=
0
;
}
else
{
int
i_x
,
i_y
,
i_x_end
,
i_y_end
;
i_x
=
__MAX
(
i_crop_x
,
i_x_offset
);
i_y
=
__MAX
(
i_crop_y
,
i_y_offset
);
i_x_end
=
__MIN
(
i_crop_x
+
i_crop_width
,
i_x_offset
+
(
int
)
p_fmt
->
i_visible_width
);
i_y_end
=
__MIN
(
i_crop_y
+
i_crop_height
,
i_y_offset
+
(
int
)
p_fmt
->
i_visible_height
);
p_fmt
->
i_x_offset
=
i_x
-
i_x_offset
;
p_fmt
->
i_y_offset
=
i_y
-
i_y_offset
;
p_fmt
->
i_visible_width
=
i_x_end
-
i_x
;
p_fmt
->
i_visible_height
=
i_y_end
-
i_y
;
i_x_offset
=
i_x
;
i_y_offset
=
i_y
;
}
}
/* Update the output picture size */
p_spu
->
p_blend
->
fmt_out
.
video
.
i_width
=
p_spu
->
p_blend
->
fmt_out
.
video
.
i_visible_width
=
...
...
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