[vlc-devel] [PATCH] Direct2D video output module
David Kaplan
david at 2of1.org
Sun Jul 25 14:28:53 CEST 2010
On 25 July 2010 14:19, Laurent Aimar <fenrir at elivagar.org> wrote:
> It seems that it is not needed to store d2_dpi_x/d2_dpi_y into the
> private
> context.
>
You're correct.
> +#ifndef WS_NONAVDONEBUTTON
> +# define WS_NONAVDONEBUTTON 0
> +#endif
> Is it needed ?
>
Nope.
> I wonder what its priority should be. If it is better/faster than gdi (and
> it should be when d2d support is present), I think it should have a
> priority
> a bit higher.
>
Yes it's better than GDI. I'll increase the priority.
> + if (sys->d2_render_target && sys->d2_bitmap)
> + {
> Bad { placement.
>
Good spot.
> Have you tested with crop(yes), zoom, auto-scale, aspect ratio, and
> various
> combination of them? (All in the Video menu).
>
I tested a WHOLE bunch but it was quite random so no sure if i missed stuff
out. Will test more.
About our previous discussion, it seems that pitch != width * 4 is fine.
> From msdn:
> "pitch
> UINT32
> The stride, or pitch, of the source bitmap stored in srcData. The stride
> is the byte count of a scanline (one row of pixels in memory). The stride
> can be computed from the following formula:
> pixel width * bytes per pixel + memory padding."
>
Yes it seems that way (I'm already using i_pitch) :)
From msdn I see
> "Your application should create render targets once and hold onto them for
> the
> life of the application or until the render target's EndDraw method
> returns the
> D2DERR_RECREATE_TARGET error. When you receive this error, you need to
> recreate
> the render target (and any resources it created)."
>
> So it seems that you need to check for EndDraw error code and recreate the
> resources when needed. You can see how d3d does it.
>
I'm not sure what would cause D2DERR_RECREATE_TARGET but I suppose we should
handle it.
> + D2D1_PIXEL_FORMAT pf = {
> > + DXGI_FORMAT_B8G8R8A8_UNORM,
> > + D2D1_ALPHA_MODE_IGNORE
> > + };
> As you now only require RGB32, is it possible to set a correct RGB mask
> in Open() ?
>
What do you mean? Have I set it incorrectly?
(An aside: I also hope to add some YUV->RGB DirectCompute support which
should speed things up nicely. At least until Microsoft sort out native YUV
support for D2D).
Thanks as always!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100725/afc687aa/attachment.html>
More information about the vlc-devel
mailing list