[vlc-devel] [vlc-commits] swscale: scale the whole picture (fixes #12085)

Hannes Domani ssbssa at yahoo.de
Sun Nov 16 20:18:49 CET 2014


Rémi Denis-Courmont <git at videolan.org> schrieb am 14:39 Samstag, 25.Oktober 2014:
> Le samedi 25 octobre 2014, 11:51:54 Rémi Denis-Courmont a écrit :
> > Le mercredi 22 octobre 2014, 17:51:37 Hannes Domani a écrit :
> > > http://streams.videolan.org/issues/6860/10s.rgb-rgb.matrix-bgr.cfr18.mp4
> > 
> > That does not crash here.
> > 
> > > http://streams.videolan.org/issues/11351/Chrono%20Trigger%20-%20Ending%201
> > > .
> > > mov
> > 
> > That crashes even before the commit inside libavcodec.
> 
> And with a fixed libavcodec, I see no crash just like the first stream.

It looks like some video outputs for windows don't create a buffer big
enough to hold the whole picture.

I tested all output modules (Chrono-Trigger example, with a fixed libavcodec),
both Direct3D and DirectX crashed.
After these changes, the crashes were gone:

diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index 6e141f4..c9fbe0d 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -970,8 +970,8 @@ static int Direct3DCreatePool(vout_display_t *vd, video_format_t *fmt)
     /* Create a surface */
     LPDIRECT3DSURFACE9 surface;
     HRESULT hr = IDirect3DDevice9_CreateOffscreenPlainSurface(d3ddev,



-                                                              fmt->i_visible_width,
-                                                              fmt->i_visible_height,
+                                                              fmt->i_width,
+                                                              fmt->i_height,
                                                               d3dfmt->format,
                                                               D3DPOOL_DEFAULT,
                                                               &surface,
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index 0de33f2..8b8e3fb 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -851,8 +851,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_visible_width;
-    ddsd.dwHeight = fmt->i_visible_height;
+    ddsd.dwWidth  = fmt->i_width;
+    ddsd.dwHeight = fmt->i_height;
     if (fourcc) {
         ddsd.dwFlags |= DDSD_PIXELFORMAT;
         ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC;


But then there are still problems left:
- DirectX / Direct2D / GDI have a small green line at the bottom
  (vlcsnap.png)
- with Direct3D the problem area is much bigger (direct3d.png),
  but the snapshot taken with VLC looks still like vlcsnap.png

Only OpenGL seems completely fine.


If someone knows how to continue here, I would really appreciate some help.


Regards
Domani Hannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlcsnap.png
Type: image/png
Size: 111706 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141116/47b14299/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: direct3d.png
Type: image/png
Size: 142165 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20141116/47b14299/attachment-0001.png>


More information about the vlc-devel mailing list