Commit 93ae604c authored by Felix Abecassis's avatar Felix Abecassis Committed by Jean-Baptiste Kempf

Win32: use visible dimensions for all vouts

Close #9645
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8b6da64a
......@@ -213,7 +213,7 @@ int CommonUpdatePicture(picture_t *picture, picture_t **fallback,
/* fill in buffer info in first plane */
picture->p->p_pixels = data;
picture->p->i_pitch = pitch;
picture->p->i_lines = picture->format.i_height;
picture->p->i_lines = picture->format.i_visible_height;
/* Fill chroma planes for planar YUV */
if (picture->format.i_chroma == VLC_CODEC_I420 ||
......@@ -226,7 +226,7 @@ int CommonUpdatePicture(picture_t *picture, picture_t **fallback,
p->p_pixels = o->p_pixels + o->i_lines * o->i_pitch;
p->i_pitch = pitch / 2;
p->i_lines = picture->format.i_height / 2;
p->i_lines = picture->format.i_visible_height / 2;
}
/* The dx/d3d buffer is always allocated as YV12 */
if (vlc_fourcc_AreUVPlanesSwapped(picture->format.i_chroma, VLC_CODEC_YV12)) {
......@@ -403,8 +403,8 @@ void UpdateRects(vout_display_t *vd,
/* src image dimensions */
rect_src.left = 0;
rect_src.top = 0;
rect_src.right = source->i_width;
rect_src.bottom = source->i_height;
rect_src.right = source->i_visible_width;
rect_src.bottom = source->i_visible_height;
/* Clip the source image */
rect_src_clipped.left = source->i_x_offset +
......
......@@ -347,8 +347,8 @@ static int D2D_CreateRenderTarget(vout_display_t *vd)
};
D2D1_SIZE_U bitmap_size = {
vd->fmt.i_width,
vd->fmt.i_height
vd->fmt.i_visible_width,
vd->fmt.i_visible_height
};
hr = ID2D1HwndRenderTarget_CreateBitmap(sys->d2_render_target,
......
......@@ -972,8 +972,8 @@ static int Direct3DCreatePool(vout_display_t *vd, video_format_t *fmt)
/* Create a surface */
LPDIRECT3DSURFACE9 surface;
HRESULT hr = IDirect3DDevice9_CreateOffscreenPlainSurface(d3ddev,
fmt->i_width,
fmt->i_height,
fmt->i_visible_width,
fmt->i_visible_height,
d3dfmt->format,
D3DPOOL_DEFAULT,
&surface,
......@@ -996,7 +996,7 @@ static int Direct3DCreatePool(vout_display_t *vd, video_format_t *fmt)
picture_resource_t resource = { .p_sys = picsys };
for (int i = 0; i < PICTURE_PLANE_MAX; i++)
resource.p[i].i_lines = fmt->i_height / (i > 0 ? 2 : 1);
resource.p[i].i_lines = fmt->i_visible_height / (i > 0 ? 2 : 1);
picture_t *picture = picture_NewFromResource(fmt, &resource);
if (!picture) {
......@@ -1055,8 +1055,8 @@ static int Direct3DCreateScene(vout_display_t *vd, const video_format_t *fmt)
*/
LPDIRECT3DTEXTURE9 d3dtex;
hr = IDirect3DDevice9_CreateTexture(d3ddev,
fmt->i_width,
fmt->i_height,
fmt->i_visible_width,
fmt->i_visible_height,
1,
D3DUSAGE_RENDERTARGET,
sys->d3dpp.BackBufferFormat,
......
......@@ -850,8 +850,8 @@ static int DirectXCreateSurface(vout_display_t *vd,
ddsd.dwSize = sizeof(ddsd);
ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat);
ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH;
ddsd.dwWidth = fmt->i_width;
ddsd.dwHeight = fmt->i_height;
ddsd.dwWidth = fmt->i_visible_width;
ddsd.dwHeight = fmt->i_visible_height;
if (fourcc) {
ddsd.dwFlags |= DDSD_PIXELFORMAT;
ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment