[vlc-devel] [PATCH] Direct2D video output module

Laurent Aimar fenrir at elivagar.org
Thu Jul 22 22:26:30 CEST 2010


On Thu, Jul 22, 2010 at 11:17:02PM +0300, David Kaplan wrote:
> 
> On Thu, Jul 22, 2010 at 11:09 PM, Laurent Aimar <fenrir at elivagar.org> wrote:
> 
>      picture_pool_NewFromFormat creates pictures using picture_New().
>     picture_New() will allocates pictures with suitable width/height/pitch so
>     that
>     they works nicely with MMX/SSEx.
>      If you have specific constraints about the pitch, you will have to use
>     picture_pool_New() and picture_NewFromResource() where you can provides the
>     memory/pitches to use.
> 
> 
> Oh I see. So as long as the fmt is correct, _NewFromFormat() should provide
> pictures with the correct pitch?
> I definately had some sort of issue with this when i was developing the patch
> (hence the *4 thingy) but le tme try again.
>  
> 
>      Do the D2D API allows to only copy/display part of a picture?
> 
> 
> I believe we can do anything we want here (part/full/etc.). Why?
 Because, you need to do it when calling ID2D1HwndRenderTarget_DrawBitmap
(not sure it's the right place) using rect_src_clipped. Otherwise the
cropping won't work. Also, it means you can simply declare a picture of
width equals to picture->p[0].i_pitch/4 for the above issue but copy only
the real size.

-- 
fenrir




More information about the vlc-devel mailing list