[vlc-commits] Win32: use visible dimensions for all vouts
Felix Abecassis
git at videolan.org
Thu Feb 27 16:13:47 CET 2014
vlc | branch: master | Felix Abecassis <felix.abecassis at gmail.com> | Wed Feb 26 17:33:38 2014 +0000| [93ae604cedff323a5d6ed33548fd53a36b3ab9e6] | committer: Jean-Baptiste Kempf
Win32: use visible dimensions for all vouts
Close #9645
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=93ae604cedff323a5d6ed33548fd53a36b3ab9e6
---
modules/video_output/msw/common.c | 8 ++++----
modules/video_output/msw/direct2d.c | 4 ++--
modules/video_output/msw/direct3d.c | 10 +++++-----
modules/video_output/msw/directx.c | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index f4954b1..529db39 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -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 +
diff --git a/modules/video_output/msw/direct2d.c b/modules/video_output/msw/direct2d.c
index 6f5b28a..6fad178 100644
--- a/modules/video_output/msw/direct2d.c
+++ b/modules/video_output/msw/direct2d.c
@@ -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,
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index ff0f601..059c6d6 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -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,
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index b65b145..4832fd0 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -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;
More information about the vlc-commits
mailing list