Rémi Denis-Courmont pushed to branch 3.0.x at VideoLAN / VLC
Commits:
34d3341b by Rémi Denis-Courmont at 2022-06-07T19:12:34+03:00
vdpau/display: fix SPU blending offsets
(cherry picked from commit 329bd3c8a3d73b77263b5d98e4e0d2a9e3f9e638)
- - - - -
1 changed file:
- modules/hw/vdpau/display.c
Changes:
=====================================
modules/hw/vdpau/display.c
=====================================
@@ -179,8 +179,8 @@ static void RenderRegion(vout_display_t *vd,
VdpOutputSurface target,
/* Create GPU surface for sub-picture */
err = vdp_bitmap_surface_create(sys->vdp, sys->device, fmt,
- reg->fmt.i_visible_width, reg->fmt.i_visible_height, VDP_FALSE,
- &surface);
+ reg->fmt.i_width, reg->fmt.i_height,
+ VDP_FALSE, &surface);
if (err != VDP_STATUS_OK)
{
msg_Err(vd, "%s creation failure: %s", "bitmap surface",
@@ -203,7 +203,7 @@ static void RenderRegion(vout_display_t *vd,
VdpOutputSurface target,
}
/* Render onto main surface */
- VdpRect area = {
+ VdpRect dst_area = {
reg->i_x * vd->fmt.i_visible_width
/ subpic->i_original_picture_width,
reg->i_y * vd->fmt.i_visible_height
@@ -213,6 +213,12 @@ static void RenderRegion(vout_display_t *vd,
VdpOutputSurface target,
(reg->i_y + reg->fmt.i_visible_height) * vd->fmt.i_visible_height
/ subpic->i_original_picture_height,
};
+ VdpRect src_area = {
+ reg->fmt.i_x_offset,
+ reg->fmt.i_y_offset,
+ reg->fmt.i_x_offset + reg->fmt.i_visible_width,
+ reg->fmt.i_y_offset + reg->fmt.i_visible_height,
+ };
VdpColor color = { 1.f, 1.f, 1.f,
reg->i_alpha * subpic->i_alpha / 65535.f };
VdpOutputSurfaceRenderBlendState state = {
@@ -230,8 +236,9 @@ static void RenderRegion(vout_display_t *vd,
VdpOutputSurface target,
.blend_constant = { 0.f, 0.f, 0.f, 0.f },
};
- err = vdp_output_surface_render_bitmap_surface(sys->vdp, target, &area,
- surface, NULL, &color, &state, 0);
+ err = vdp_output_surface_render_bitmap_surface(sys->vdp, target, &dst_area,
+ surface, &src_area, &color,
+ &state, 0);
if (err != VDP_STATUS_OK)
msg_Err(vd, "blending failure: %s",
vdp_get_error_string(sys->vdp, err));
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/34d3341b7998f6c72e4bb6b2f4b86fbdb8a24c18
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/34d3341b7998f6c72e4bb6b2f4b86fbdb8a24c18
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits